Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All features in package classpath are reported to reportportal when using tags from command line. #30

Closed
mainak-basu22 opened this issue Apr 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mainak-basu22
Copy link

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

  1. 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);

  2. 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

@mainak-basu22 mainak-basu22 added the bug Something isn't working label Apr 8, 2024
@Pink-Bumblebee
Copy link

Hello @mainak-basu22 . We will put your propose to our backlog. Later, when we will have more time, we will return this propose.

@HardNorth
Copy link
Member

@mainak-basu22
Copy link
Author

@HardNorth Working as expected now, thank you for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants