All features in package classpath are reported to reportportal when using tags from command line.
Closed this issue · 3 comments
Describe the bug
When using tags from the command line to run Karate tests, all feature files in the package classpath are reported to the report portal. Karate internally filters out the feature files to run and only runs the filtered features and scenarios, but it seems like the report portal karate agent is not able to do so and reports all feature files in the package.
Steps to Reproduce
-
Use hook to run the test with tags(), so that karate will pick the tags from command line parameters
Results results = Runner.path("classpath: pathToPackageHavingAllFeatureFiles").hook(new ReportPortalHook()).tags().outputCucumberJson(true).parallel(threadCountValue);
-
Run test from command line using mvn test command with the tag option like '-Dkarate.options=--tags=@mytag'
Expected behavior
Only tests that karate runs should be reported to ReportPortal.
Actual behavior
All feature files in the classpath package are showing up under the Reportportal launch. The files that are not actually run by Karate are just showing with the status "Run interrupted" and no tests.
Dependency versions
client-java: 5.2.5
agent-java-karate: 5.0.4
karate: 1.4.0
Hello @mainak-basu22 . We will put your propose to our backlog. Later, when we will have more time, we will return this propose.
@HardNorth Working as expected now, thank you for the quick fix.