У меня есть следующий файл junit-platform.properties, который управляет выполнением тестов огурца:
Код: Выделить всё
cucumber.execution.parallel.enabled=true
cucumber.execution.parallel.config.strategy=dynamic
cucumber.execution.parallel.config.dynamic.factor=1
cucumber.plugin=formatters.SummaryFormatter,pretty,junit:target/junitreport.xml,json:target/cucumber-report/cucumber.json
cucumber.execution.exclusive-resources.isolated.read-write=org.junit.platform.engine.support.hierarchical.ExclusiveResource.GLOBAL_KEY
cucumber.junit-platform.naming-strategy=long
Код: Выделить всё
@Suite
@IncludeEngines("cucumber")
@SelectClasspathResource("features")
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "stepdefinitions")
@SuppressWarnings({"java:S2187", "checkstyle:AbbreviationAsWordInName"})
public class CucumberRunnerIT {
private CucumberRunnerIT() {
}
}
1: Использование аннотации @Timeout и добавление ее в мой CucumberRunnerIT
Код: Выделить всё
@Timeout(value = 10, unit = TimeUnit.MINUTES)
Код: Выделить всё
junit.jupiter.execution.timeout.default=10m
Код: Выделить всё
org.apache.maven.plugins
maven-surefire-plugin
3.0.0-M5
10m
Подробнее здесь: https://stackoverflow.com/questions/790 ... ith-junit5