-
-
Notifications
You must be signed in to change notification settings - Fork 220
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 #7335 from murdos/clean-cucumber-setup
Run Cucumber tests with JUnit5
- Loading branch information
Showing
9 changed files
with
61 additions
and
67 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
23 changes: 13 additions & 10 deletions
23
src/main/resources/generator/server/springboot/cucumber/CucumberTest.java.mustache
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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
package {{packageName}}.cucumber; | ||
|
||
import io.cucumber.junit.Cucumber; | ||
import io.cucumber.junit.CucumberOptions; | ||
import org.junit.runner.RunWith; | ||
import static io.cucumber.junit.platform.engine.Constants.*; | ||
|
||
import org.junit.platform.suite.api.ConfigurationParameter; | ||
import org.junit.platform.suite.api.IncludeEngines; | ||
import org.junit.platform.suite.api.Suite; | ||
import {{packageName}}.ComponentTest; | ||
|
||
@Suite(failIfNoTests = false) | ||
@ComponentTest | ||
@RunWith(Cucumber.class) | ||
@CucumberOptions( | ||
glue = "{{packageName}}", | ||
plugin = { | ||
"pretty", "json:target/cucumber/cucumber.json", "html:target/cucumber/cucumber.htm", "junit:target/cucumber/TEST-cucumber.xml", | ||
}, | ||
features = "src/test/features" | ||
@IncludeEngines("cucumber") | ||
@SuppressWarnings("java:S2187") | ||
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "{{packageName}}") | ||
@ConfigurationParameter( | ||
key = PLUGIN_PROPERTY_NAME, | ||
value = "pretty, json:target/cucumber/cucumber.json, html:target/cucumber/cucumber.htm, junit:target/cucumber/TEST-cucumber.xml" | ||
) | ||
@ConfigurationParameter(key = FEATURES_PROPERTY_NAME, value = "src/test/features") | ||
public class CucumberTest {} |
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
23 changes: 13 additions & 10 deletions
23
src/main/resources/generator/server/springboot/custom-jhlite/CucumberTest.java.mustache
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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
package {{packageName}}.cucumber; | ||
|
||
import io.cucumber.junit.Cucumber; | ||
import io.cucumber.junit.CucumberOptions; | ||
import org.junit.runner.RunWith; | ||
import static io.cucumber.junit.platform.engine.Constants.*; | ||
|
||
import org.junit.platform.suite.api.ConfigurationParameter; | ||
import org.junit.platform.suite.api.IncludeEngines; | ||
import org.junit.platform.suite.api.Suite; | ||
import {{packageName}}.ComponentTest; | ||
|
||
@Suite(failIfNoTests = false) | ||
@ComponentTest | ||
@RunWith(Cucumber.class) | ||
@CucumberOptions( | ||
glue = { "{{packageName}}", "tech.jhipster.lite.module.infrastructure.primary" }, | ||
plugin = { | ||
"pretty", "json:target/cucumber/cucumber.json", "html:target/cucumber/cucumber.htm", "junit:target/cucumber/TEST-cucumber.xml", | ||
}, | ||
features = "src/test/features" | ||
@IncludeEngines("cucumber") | ||
@SuppressWarnings("java:S2187") | ||
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "{{packageName}}, tech.jhipster.lite.module.infrastructure.primary") | ||
@ConfigurationParameter( | ||
key = PLUGIN_PROPERTY_NAME, | ||
value = "pretty, json:target/cucumber/cucumber.json, html:target/cucumber/cucumber.htm, junit:target/cucumber/TEST-cucumber.xml" | ||
) | ||
@ConfigurationParameter(key = FEATURES_PROPERTY_NAME, value = "src/test/features") | ||
public class CucumberTest {} |
23 changes: 13 additions & 10 deletions
23
src/test/java/tech/jhipster/lite/cucumber/CucumberTest.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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
package tech.jhipster.lite.cucumber; | ||
|
||
import io.cucumber.junit.Cucumber; | ||
import io.cucumber.junit.CucumberOptions; | ||
import org.junit.runner.RunWith; | ||
import static io.cucumber.junit.platform.engine.Constants.*; | ||
|
||
import org.junit.platform.suite.api.ConfigurationParameter; | ||
import org.junit.platform.suite.api.IncludeEngines; | ||
import org.junit.platform.suite.api.Suite; | ||
import tech.jhipster.lite.ComponentTest; | ||
|
||
@Suite | ||
@ComponentTest | ||
@RunWith(Cucumber.class) | ||
@CucumberOptions( | ||
glue = "tech.jhipster.lite", | ||
plugin = { | ||
"pretty", "json:target/cucumber/cucumber.json", "html:target/cucumber/cucumber.htm", "junit:target/cucumber/TEST-cucumber.xml", | ||
}, | ||
features = "src/test/features" | ||
@IncludeEngines("cucumber") | ||
@SuppressWarnings("java:S2187") | ||
@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "tech.jhipster.lite") | ||
@ConfigurationParameter( | ||
key = PLUGIN_PROPERTY_NAME, | ||
value = "pretty, json:target/cucumber/cucumber.json, html:target/cucumber/cucumber.htm, junit:target/cucumber/TEST-cucumber.xml" | ||
) | ||
@ConfigurationParameter(key = FEATURES_PROPERTY_NAME, value = "src/test/features") | ||
public class CucumberTest {} |
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