Search code examples
scalaunit-testingsbtscalatestscalacheck

How to have SBT re-run only failed tests


Is there a way to have SBT re-run only the tests that have failed in the last run of the test suite? For example, if I run sbt test and 3 out of the 20 tests I run fail, is there any command I can run to have SBT just re-run those 3 tests that fail?

Specifically I am using Scala Test and Scala Check for the tests I am running through SBT.


Solution

  • If you are using the latest version of sbt simply run sbt testQuick.

    http://www.scala-sbt.org/0.13/docs/Testing.html