-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add Karate configuration option to disable the "no features or scenarios found" assertion #2531
Comments
@dustinsand I do agree that throwing this error may be un-necessary - the original intent was in case user got the path wrong, the IDE would show a green bar even if zero tests were run. I'm ok to accept a PR to change this |
dustinsand
changed the title
Add Karate configuration option to disable the "no features or scenarios found" error
Add Karate configuration option to disable the "no features or scenarios found" assertion
Mar 12, 2024
dustinsand
pushed a commit
to dustinsand/karate
that referenced
this issue
Mar 13, 2024
If JUnit 5 is used to run a Karate feature file, but no scenarios are found that match the run criteria, this error is thrown: no features or scenarios found: [classpath:karate/features/helloworld/] For example, if Karate is run with these arguments and this feature file, the error will be thrown. -Dkarate.options="--tags @smoke" Feature: Hello World @prod Scenario: Hello to the world Refs: karatelabs#2531
5 tasks
dustinsand
pushed a commit
to dustinsand/karate
that referenced
this issue
Mar 13, 2024
Renamed ignoreJunitNoScenariosAssertion to failWhenNoScenariosFound. Refs: karatelabs#2531
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If JUnit 5 is used to run a Karate feature file, but no scenarios are found that match the run criteria, this error is thrown:
For example, if Karate is run with these arguments and this feature file, the error will be thrown.
-Dkarate.options="--tags @smoke"
Feature: Hello World
@prod
Scenario: Hello to the world
The workaround is to add a scenario that does nothing, for example,
Feature: Hello World
@prod
Scenario: Hello to the world
@smoke
Scenario: Do Nothing
Opened this issue to start a discussion for adding a Karate configuration option to disable this error in com.intuit.karate.junit5.Karate.java.
The text was updated successfully, but these errors were encountered: