如果您在SBT项目中定义了2个测试:
class Spec1 extends Specification {
def is =
"Tests for specification 1" ^
p ^
"Test case 1" ! todo ^
end
}和
class Spec2 extends Specification {
def is =
"Tests for specification 2" ^
p ^
"Test case 2" ! todo ^
end
}然后,从SBT内部运行test将执行这两个测试。只运行其中一个测试的最简单方法是什么?
发布于 2012-12-10 17:49:54
使用test-only sbt命令。
sbt> test-only com.example.MySpec您甚至可以使用通配符来运行一系列测试。请参阅How to execute tests that match a regular expression only?
https://stackoverflow.com/questions/13798193
复制相似问题