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

feat: add Karate runner argument to ignore JUnit 5 no scenarios assertion #2532

Conversation

dustinsand
Copy link

Description

add Karate runner argument ignore no scenarios assertion

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

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
@dustinsand
Copy link
Author

Is there a documentation file I should update with the usage for this new field, failWhenNoScenariosFound ?

@ptrthomas
Copy link
Member

@dustinsand not essential but you could add a line where we talk about the builder in the readme: https://github.com/karatelabs/karate#parallel-execution

Renamed ignoreJunitNoScenariosAssertion to failWhenNoScenariosFound.

Refs: karatelabs#2531
@dustinsand
Copy link
Author

@ptrthomas Since not essential, I won't update the readme.

@ptrthomas ptrthomas merged commit fdc684e into karatelabs:develop Mar 13, 2024
1 check passed
@dustinsand dustinsand deleted the feat/2531-ignoreJunitNoScenariosAssertion branch March 15, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants