Why does scalatest mix up the output?

前端 未结 2 830
鱼传尺愫
鱼传尺愫 2021-01-17 10:51

I run my scalatest from sbt, and the output gets mixed up - scalatest prints all the test run, and comments to them, and somewhere in the middle it prints the statistics:

2条回答
  •  庸人自扰
    2021-01-17 11:19

    It looks to me the reason for that is that SBT by default executes the tests in parallel, the same way maven-surefire-plugin does.

    As it is explained in ScalaTest wiki, this can be solved by:

    Disable Parallel Execution of Tests By default, sbt runs all tasks in parallel. Because each test is mapped to a task, tests are also run in parallel by default. To disable parallel execution of tests:

    parallelExecution in Test := false
    

提交回复
热议问题