cucumber / cucumber-jvm

Cucumber for the JVM
https://cucumber.io
MIT License
2.69k stars 2.02k forks source link

Logs reported for no matching cucumber tag found after executing test #2892

Closed iamsethi closed 4 weeks ago

iamsethi commented 1 month ago

When running a cucumber test with existing scenario tag, using Cucumber-Junit runner file, after executing the test it displays 'cucumber.filter.tags=@11507893' did not match this scenario Steps to reproduce the behavior:

Create a runner file `@Suite @IncludeEngines("cucumber") @SelectClasspathResource("features") @ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "com.project.name") @ConfigurationParameter(key = Constants.PLUGIN_PROPERTY_NAME, value = "summary") @ConfigurationParameter(key = Constants.EXECUTION_DRY_RUN_PROPERTY_NAME,value = "false")

public class TestRunner {

} `

junit-platform-properties

cucumber.publish.quiet=true cucumber.execution.parallel.enabled=true cucumber.filter.tags=@11507893 cucumber.plugin=pretty,json:results/cucumber.json,junit:results/cucumber.xml

image
mpkorstanje commented 1 month ago

While Cucumber produces this information, it isn't logged by by Cucumber. Looking at your screenshot I would guess that this is done by IDEA.

As you are running Cucumber through JUnit 5, you may want to consider using one of the many options that JUnit 5 provides instead. These will not cause any logging. For example you can use the @IncludeTags or @ExcludeTags annotation. Note that when using JUnit Tag expressions the @ should not be included.

https://github.com/cucumber/cucumber-jvm/tree/main/cucumber-junit-platform-engine#tags