diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a9910a..f613f20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ See also the [CHANGELOG](https://github.com/cucumber/cucumber-jvm/blob/main/CHAN ### Added ### Changed +* Upgrade to latest groovy version 4.0.11 and cucumber-jvm 7.11.2 +* Upgrading to Surefire v3 so we can use JUnit 5. +* Using Bills of Material to keep all the dependencies aligned (and remove all the explicit version numbers everywhere) +* Replacing JUnit 4 with JUnit 5. ### Deprecated diff --git a/examples/pom.xml b/examples/pom.xml index 87ed33a..6557b80 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -4,18 +4,13 @@ io.cucumber cucumber-jvm-groovy - 6.10.5-SNAPSHOT + 7.0.0-SNAPSHOT groovy-examples jar Cucumber Groovy Examples - - 1.8 - 5.6.0 - - io.cucumber @@ -23,19 +18,23 @@ test - io.cucumber - cucumber-junit + org.junit.platform + junit-platform-suite test org.junit.jupiter junit-jupiter - ${junit-jupiter.version} test - org.codehaus.groovy - groovy-all + io.cucumber + cucumber-junit-platform-engine + test + + + org.apache.groovy + groovy provided @@ -43,15 +42,15 @@ - org.codehaus.gmaven - gmaven-plugin + org.codehaus.gmavenplus + gmavenplus-plugin generateStubs compile generateTestStubs - testCompile + compileTests diff --git a/examples/src/test/groovy/calc/CalculatorSteps.groovy b/examples/src/test/groovy/calc/CalculatorSteps.groovy index ca33548..eada7d2 100644 --- a/examples/src/test/groovy/calc/CalculatorSteps.groovy +++ b/examples/src/test/groovy/calc/CalculatorSteps.groovy @@ -51,11 +51,6 @@ Given(~/^I have entered (\d+) into .* calculator$/) { int number -> calc.push number } -// Remember to still include "->" if there are no parameters. -Given(~/\d+ into the/) {-> - throw new RuntimeException("should never get here since we're running with --guess") -} - // This step calls a Calculator function specified in the step // and saves the result in the current world object. When(~/^I press (\w+)$/) { String opname -> diff --git a/examples/src/test/java/calc/RunCukesTest.java b/examples/src/test/java/calc/RunCukesTest.java index c74a78a..26c45f2 100644 --- a/examples/src/test/java/calc/RunCukesTest.java +++ b/examples/src/test/java/calc/RunCukesTest.java @@ -1,11 +1,16 @@ package calc; -import io.cucumber.junit.Cucumber; -import io.cucumber.junit.CucumberOptions; -import org.junit.runner.RunWith; +import org.junit.platform.suite.api.ConfigurationParameter; +import org.junit.platform.suite.api.IncludeEngines; +import org.junit.platform.suite.api.SelectClasspathResource; +import org.junit.platform.suite.api.Suite; -@RunWith(Cucumber.class) -@CucumberOptions(glue = {"calc"} ) +import static io.cucumber.core.options.Constants.GLUE_PROPERTY_NAME; + +@Suite +@IncludeEngines("cucumber") +@SelectClasspathResource("calc") +@ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "calc") public class RunCukesTest { } diff --git a/examples/src/test/resources/junit-platform.properties b/examples/src/test/resources/junit-platform.properties new file mode 100644 index 0000000..b48dd63 --- /dev/null +++ b/examples/src/test/resources/junit-platform.properties @@ -0,0 +1 @@ +cucumber.publish.quiet=true diff --git a/groovy/pom.xml b/groovy/pom.xml index 56dcfba..bad8f64 100644 --- a/groovy/pom.xml +++ b/groovy/pom.xml @@ -4,7 +4,7 @@ io.cucumber cucumber-jvm-groovy - 6.10.5-SNAPSHOT + 7.0.0-SNAPSHOT cucumber-groovy @@ -12,42 +12,67 @@ Cucumber Groovy - 1.8 2.14.2 - 5.9.2 + 5.3.1 + + + + com.fasterxml.jackson + jackson-bom + ${jackson.version} + import + pom + + + org.mockito + mockito-bom + ${mockito.version} + import + pom + + + + io.cucumber cucumber-core - org.codehaus.groovy - groovy-all + org.apache.groovy + groovy provided + + org.apache.groovy + groovy-test + test + com.fasterxml.jackson.datatype jackson-datatype-jsr310 - ${jackson.version} test com.fasterxml.jackson.core jackson-databind - ${jackson.version} test - io.cucumber - cucumber-junit + org.junit.jupiter + junit-jupiter test - org.junit.jupiter - junit-jupiter - ${junit-jupiter.version} + org.junit.platform + junit-platform-suite + test + + + io.cucumber + cucumber-junit-platform-engine test @@ -55,6 +80,11 @@ mockito-core test + + org.mockito + mockito-junit-jupiter + test + com.google.auto.service auto-service @@ -67,7 +97,6 @@ org.codehaus.gmavenplus gmavenplus-plugin - 2.1.0 @@ -167,14 +196,12 @@ - + - - - org.codehaus.gmaven - gmaven-plugin - 1.5 + org.codehaus.gmavenplus + gmavenplus-plugin + 2.1.0