开发者

Detailed test reports in SBT using ScalaTest

how to let SBT generate more detailed outputs of tests? Now only thing I get is the name of method and stack trace - I would like to have some more control over it, to get rid of stack trace, and possibly have formatted 开发者_开发百科info e.g. expected, actual...

Thank you for help


Normally you should get some output. As an example:

class ATest extends FlatSpec with ShouldMatchers {
  "Some Object" should "do something and will fail" in {
    1 should be(2)
  }
}

will return:

[info] Some Object 
[info] - should do something and will fail *** FAILED *** (QuaternionSpec.scala:17)
[info]   org.scalatest.TestFailedException: 1 was not equal to 2

Can you show your test code?

To turn off the stacktrace you can use:

trace off
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜