How to configure sbt test / ScalaTest to only show failures?

后端 未结 4 543
野的像风
野的像风 2021-02-05 07:29

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,

4条回答
  •  不要未来只要你来
    2021-02-05 08:00

    After adding the following to build.sbt, scalaTest will show a fail summary after the standart report:

    testOptions in Test += Tests.Argument("-oI") 
    
    I - show reminder of failed and canceled tests without stack traces
    T - show reminder of failed and canceled tests with short stack traces
    G - show reminder of failed and canceled tests with full stack traces
    

    There is also a "drop TestSucceeded events" flag, but I have failed to use it: http://www.scalatest.org/user_guide/using_the_runner

提交回复
热议问题