到目前为止,我能够通过使用多个运行器类并行运行cucumber-jvm测试,但随着我的项目的增加和新功能的增加,每次都很难优化执行时间
所以我的问题是优化执行时间的最佳方法是什么
- 是通过为每个功能添加新的runner类/限制某些线程并使用新标签更新runner类来执行
到目前为止,我使用线程数8,我已经运行类也是8
使用这种方法直到现在都很好,但是其中一个功能最近添加了更多的场景,并且需要更长的时间来完成:(那么如何在这里优化执行时间…
任何帮助非常感激!!
这对我有用:
Courgette-JVM
它增加了在功能级别或场景级别上并行运行黄瓜测试的功能。
它还提供了自动重新运行失败场景的选项。
使用@RunWith(Courgette.class)
@CourgetteOptions(
threads = 10,
runLevel = CourgetteRunLevel.SCENARIO,
rerunFailedScenarios = true,
showTestOutput = true,
cucumberOptions = @CucumberOptions(
features = "src/test/resources/features",
glue = "steps",
tags = {"@regression"},
plugin = {
"pretty",
"json:target/courgette-report/courgette.json",
"html:target/courgette-report/courgette.html"}
))
public class RegressionTestSuite {
}