-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2532 from dustinsand/feat/2531-ignoreJunitNoScena…
…riosAssertion feat: add Karate runner argument to ignore JUnit 5 no scenarios assertion
- Loading branch information
Showing
5 changed files
with
45 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
karate-junit5/src/test/java/karate/NoFeatureNoScenarioTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package karate; | ||
|
||
import com.intuit.karate.junit5.Karate; | ||
|
||
class NoFeatureNoScenarioTest { | ||
|
||
@Karate.Test | ||
Karate testHasScenariosWithFailWhenNoScenariosFound() { | ||
return Karate.run("noFeatureNoScenario") | ||
.tags("@smoke") | ||
.failWhenNoScenariosFound(true) | ||
.relativeTo(getClass()); | ||
} | ||
|
||
@Karate.Test | ||
Karate testNoScenarios() { | ||
return Karate.run("noFeatureNoScenario") | ||
.tags("@tagnotexist") | ||
.failWhenNoScenariosFound(false) | ||
.relativeTo(getClass()); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
karate-junit5/src/test/java/karate/noFeatureNoScenario.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Feature: ignoreJunitNoScenariosAssertion argument for Karate runner | ||
|
||
@smoke | ||
Scenario: smoke | ||
* print 'smoke' |