Is there a way to truncate the test results to only show result text for unit tests only when the unit test has failed? I\'m working on a Scala project that has 850 unit tests,
Updated answer for Scalatest 3.
Here's the new syntax for your build.sbt
file to reprint all the failures at the bottom of the test suite run:
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-oI")
You might also want to suppress the info notifications, so it's easier to see the failures.
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-oNCXELOPQRM")
Here's what all the options represent:
"-oI"
prints the error notifications again at the end of the test suite run whereas "-oNCXELOPQRM"
only shows the tests that fail.
See the configuring reporters section on the ScalaTest website for more detail.