简体   繁体   中英

Lack of step-notifications in cucumber-junit-platform

How can I set showing of test steps using Cucumber and JUnit 5(cucumber-junit-platform-engine)?

Previosly, with JUnit 4 it was possible by adding Cucumber Option stepNotifications = true

@CucumberOptions(
stepNotifications = true,
strict = true,
features="path to feature file",
glue="path to step definition file")

It is highly recomended to use junit-platform.properties in JUnit 5, but I was unable to find there corresponding property: https://github.com/cucumber/cucumber-jvm/tree/main/junit-platform-engine#configuration-options

Unfortunately, as with JUnit 4, the domain of JUnit 5 does not have anything to express sub-test steps.

While it would theoretically be possible to represent steps as individual tests this would result in various other issues such as miscounting executed tests, misreporting failures, complications executing in parallel, etc as seen with JUnit 4.

Detailed answer: https://github.com/cucumber/cucumber-jvm/issues/2471

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM