简体   繁体   English

cucumber-junit-platform 中缺少步骤通知

[英]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)?如何使用 Cucumber 和 JUnit 5(cucumber-junit-platform-engine) 设置测试步骤的显示?

Previosly, with JUnit 4 it was possible by adding Cucumber Option stepNotifications = true以前,使用 JUnit 4 可以通过添加 Cucumber 选项 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强烈建议使用 JUnit 5 中的 junit-platform.properties,但我找不到相应的属性: https://github.com/cucumber/cucumber-jvm/tree/main/junit-platform-engine#configuration -选项

Unfortunately, as with JUnit 4, the domain of JUnit 5 does not have anything to express sub-test steps.不幸的是,与 JUnit 4 一样,JUnit 5 的域没有任何内容可以表达子测试步骤。

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.虽然理论上可以将步骤表示为单独的测试,但这会导致各种其他问题,例如错误计算已执行的测试、错误报告失败、并行执行的并发症等,如 JUnit 4 所示。

Detailed answer: https://github.com/cucumber/cucumber-jvm/issues/2471详细解答: https://github.com/cucumber/cucumber-jvm/issues/2471

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将 Cucumber JUnit 步骤标记为失败但继续 - How to mark Cucumber JUnit step as failed but continue cucumber.runtime.junit.UndefinedThrowable:步骤未定义 - cucumber.runtime.junit.UndefinedThrowable: The step is undefined @CucumberOptions 在cucumber-junit-platform-engine 中 - @CucumberOptions in cucumber-junit-platform-engine Cucumber JUnit 平台引擎。 控制台故障 - Cucumber JUnit platform engine. Console failure 如何检测cucumber-jvm junit 项目中未使用的步骤定义? - How to detect unused step definitions in cucumber-jvm junit project? Cucumber-junit-platform-engine 中的特征文件发现 - Feature files discovery in cucumber-junit-platform-engine 使用带有Java的cucumber-junit通过步骤定义文件执行黄瓜特征文件时的java.lang.NullPointerException - java.lang.NullPointerException when executing cucumber feature file through step definition file using cucumber-junit with Java 黄瓜JUnit:当场景步骤定义分布在各个类中时,如何截取屏幕截图? - Cucumber JUnit : How to take screenshot when scenario step definitions are spread across classes? Cucumber 使用基于 JUnit5 平台的外部运行器运行测试时出现 UndefinedStepException - Cucumber UndefinedStepException when running tests with external runner based on JUnit5 platform 黄瓜junit中的标签继承 - Tag inheritance in cucumber junit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM