如何在 sbt 中命令执行测试? [英] How to order execution of tests in sbt?
本文介绍了如何在 sbt 中命令执行测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请提出如何控制 sbt 中测试/规范执行顺序的最佳方法?
Please suggest best approach how to control order of test/spec execution in sbt?
是否有类似 runOrder in maven-sirefire 的选项-插件
推荐答案
当然,对于并行执行,它不能明确地完成,但对于顺序执行它可以解决:
Sure, it cannot be done clearly for parallel execution, but it solvable for sequential:
parallelExecution in test := false
testGrouping <<= definedTests in Test map { tests =>
tests.map { test =>
import Tests._
new Group(
name = test.name,
tests = Seq(test),
runPolicy = InProcess)
}.sortWith(_.name < _.name)
}
这篇关于如何在 sbt 中命令执行测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文