考虑下面的测试套件:
class ParallelizeMe extends FunSuite with BeforeAndAfterAll {
override def beforeAll() = println("before")
override def afterAll() = println("after")
test("test 1") {
println("1a")
Thread.sleep(3000)
println("1b")
}
test("test 2") {
println("2a")
Thread.sleep(1000)
println("2b")
}
}
我怎么能(通过SBT)并行运行的测试? 理想情况下,我想执行的顺序产生在标准输出的情况如下:
before
1a
2a
2b
1b
after