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

UndefinedStepException #79

Open
dewijones92 opened this issue Apr 13, 2023 · 2 comments
Open

UndefinedStepException #79

dewijones92 opened this issue Apr 13, 2023 · 2 comments

Comments

@dewijones92
Copy link

πŸ‘“ What did you see?

io.cucumber.junit.platform.engine.UndefinedStepException: The step 'I wait 1 hour' and 1 other step(s) are undefined.

βœ… What did you expect to see?

All steps to be defined

πŸ“¦ Which tool/library version are you using?

commit d262b8d refs/heads/main (HEAD -> main, origin/main, origin/HEAD)

πŸ”¬ How could we reproduce it?

./gradlew test --rerun-tasks --info

πŸ“š Any additional context?


dewi@dewiserver:~/code/cucumber-java-skeleton/gradle$ ./gradlew test --rerun-tasks --info
Initialized native services in: /home/dewi/.gradle/native
Initialized jansi services in: /home/dewi/.gradle/native
Received JVM installation metadata from '/home/dewi/.sdkman/candidates/java/19.0.2-open': {JAVA_HOME=/home/dewi/.sdkman/candidates/java/19.0.2-open, JAVA_VERSION=19.0.2, JAVA_VENDOR=Oracle Corporation, RUNTIME_NAME=OpenJDK Runtime Environment, RUNTIME_VERSION=19.0.2+7-44, VM_NAME=OpenJDK 64-Bit Server VM, VM_VERSION=19.0.2+7-44, VM_VENDOR=Oracle Corporation, OS_ARCH=amd64}
Found daemon DaemonInfo{pid=3911126, address=[612c5627-df8a-4b9d-8062-b56aac889544 port:43275, addresses:[/127.0.0.1]], state=Idle, lastBusy=1681388481979, context=DefaultDaemonContext[uid=fc814eab-4d65-4233-b3e6-24365107f7a9,javaHome=/home/dewi/.sdkman/candidates/java/17.0.6-tem,daemonRegistryDir=/home/dewi/.gradle/daemon,pid=3911126,idleTimeout=10800000,priority=NORMAL,applyInstrumentationAgent=true,daemonOpts=--add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=384m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=GB,-Duser.language=en,-Duser.variant]} however its context does not match the desired criteria.
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=/home/dewi/.sdkman/candidates/java/19.0.2-open,daemonRegistryDir=/home/dewi/.gradle/daemon,pid=3924974,idleTimeout=null,priority=NORMAL,applyInstrumentationAgent=true,daemonOpts=--add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=384m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=GB,-Duser.language=en,-Duser.variant]
Actual: DefaultDaemonContext[uid=fc814eab-4d65-4233-b3e6-24365107f7a9,javaHome=/home/dewi/.sdkman/candidates/java/17.0.6-tem,daemonRegistryDir=/home/dewi/.gradle/daemon,pid=3911126,idleTimeout=10800000,priority=NORMAL,applyInstrumentationAgent=true,daemonOpts=--add-opens=java.base/java.util=ALL-UNNAMED,--add-opens=java.base/java.lang=ALL-UNNAMED,--add-opens=java.base/java.lang.invoke=ALL-UNNAMED,--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens=java.base/java.nio.charset=ALL-UNNAMED,--add-opens=java.base/java.net=ALL-UNNAMED,--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=384m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=GB,-Duser.language=en,-Duser.variant]

  Looking for a different daemon...
The client will now receive all logging from the daemon (pid: 3914818). The daemon log file: /home/dewi/.gradle/daemon/8.1/daemon-3914818.out.log
Starting 3rd build in daemon [uptime: 5 mins 31.974 secs, performance: 99%, GC rate: 0.00/s, heap usage: 0% of 512 MiB, non-heap usage: 31% of 384 MiB]
Using 16 worker leases.
Now considering [/home/dewi/code/cucumber-java-skeleton/gradle] as hierarchies to watch
Watching the file system is configured to be enabled if available
File system watching is active
Starting Build
Settings evaluated using settings file '/home/dewi/code/cucumber-java-skeleton/gradle/settings.gradle'.
Projects loaded. Root project using build file '/home/dewi/code/cucumber-java-skeleton/gradle/build.gradle.kts'.
Included projects: [root project 'gradle']

> Configure project :
Evaluating root project 'gradle' using build file '/home/dewi/code/cucumber-java-skeleton/gradle/build.gradle.kts'.
The configuration :classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.
The configuration :classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.
The configuration :classpath is both resolvable and consumable. This is considered a legacy configuration and it will eventually only be possible to be one of these.
The configuration :classpath is both consumable and declarable. This combination is incorrect, only one of these flags should be set.
Caching disabled for Kotlin DSL accessors for root project 'gradle' because:
  Build cache is disabled
Skipping Kotlin DSL accessors for root project 'gradle' as it is up-to-date.
All projects evaluated.
Task name matched 'test'
Selected primary task 'test' from project :
The configuration :mainSourceElements is both consumable and declarable. This combination is incorrect, only one of these flags should be set.
Tasks to be executed: [task ':compileJava', task ':processResources', task ':classes', task ':compileTestJava', task ':processTestResources', task ':testClasses', task ':test']
Tasks that were excluded: []
Resolve mutations for :compileJava (Thread[#244,Execution worker,5,main]) started.
:compileJava (Thread[#244,Execution worker,5,main]) started.

> Task :compileJava
Caching disabled for task ':compileJava' because:
  Build cache is disabled
Task ':compileJava' is not up-to-date because:
  Executed with '--rerun-tasks'.
The input changes require a full rebuild for incremental task ':compileJava'.
Watching 30 directories to track changes
Watching 29 directories to track changes
Watching 28 directories to track changes
Watching 27 directories to track changes
Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
Compiling with toolchain '/home/dewi/.sdkman/candidates/java/19.0.2-open'.
Compiling with JDK Java compiler API.
Class dependency analysis for incremental compilation took 0.0 secs.
Created classpath snapshot for incremental compilation in 0.0 secs.
Watching 31 directories to track changes
Watching 32 directories to track changes
Watching 33 directories to track changes
Watching 34 directories to track changes
Resolve mutations for :processResources (Thread[#244,Execution worker,5,main]) started.
:processResources (Thread[#243,included builds,5,main]) started.

> Task :processResources NO-SOURCE
Skipping task ':processResources' as it has no source files and no previous output files.
Resolve mutations for :classes (Thread[#243,included builds,5,main]) started.
:classes (Thread[#248,Execution worker Thread 5,5,main]) started.

> Task :classes
Skipping task ':classes' as it has no actions.
Resolve mutations for :compileTestJava (Thread[#243,included builds,5,main]) started.
:compileTestJava (Thread[#243,included builds,5,main]) started.

> Task :compileTestJava
Caching disabled for task ':compileTestJava' because:
  Build cache is disabled
Task ':compileTestJava' is not up-to-date because:
  Executed with '--rerun-tasks'.
The input changes require a full rebuild for incremental task ':compileTestJava'.
Watching 30 directories to track changes
Watching 29 directories to track changes
Watching 28 directories to track changes
Watching 27 directories to track changes
Full recompilation is required because no incremental change information is available. This is usually caused by clean builds or changing compiler arguments.
Compiling with toolchain '/home/dewi/.sdkman/candidates/java/19.0.2-open'.
Compiling with JDK Java compiler API.
Class dependency analysis for incremental compilation took 0.0 secs.
Created classpath snapshot for incremental compilation in 0.004 secs.
Watching 31 directories to track changes
Watching 32 directories to track changes
Watching 33 directories to track changes
Watching 34 directories to track changes
Resolve mutations for :processTestResources (Thread[#243,included builds,5,main]) started.
:processTestResources (Thread[#243,included builds,5,main]) started.

> Task :processTestResources
Caching disabled for task ':processTestResources' because:
  Build cache is disabled
Task ':processTestResources' is not up-to-date because:
  Executed with '--rerun-tasks'.
Watching 30 directories to track changes
Watching 34 directories to track changes
Resolve mutations for :testClasses (Thread[#243,included builds,5,main]) started.
:testClasses (Thread[#248,Execution worker Thread 5,5,main]) started.

> Task :testClasses
Skipping task ':testClasses' as it has no actions.
Resolve mutations for :test (Thread[#243,included builds,5,main]) started.
:test (Thread[#243,included builds,5,main]) started.
Gradle Test Executor 3 started executing tests.
Gradle Test Executor 3 finished executing tests.

> Task :test FAILED
Watching 35 directories to track changes
Watching 40 directories to track changes
Watching 41 directories to track changes
Caching disabled for task ':test' because:
  Build cache is disabled
Task ':test' is not up-to-date because:
  Executed with '--rerun-tasks'.
Watching 40 directories to track changes
Watching 35 directories to track changes
Watching 34 directories to track changes
Starting process 'Gradle Test Executor 3'. Working directory: /home/dewi/code/cucumber-java-skeleton/gradle Command: /home/dewi/.sdkman/candidates/java/19.0.2-open/bin/java -Dcucumber.junit-platform.naming-strategy=long -Dorg.gradle.internal.worker.tmpdir=/home/dewi/code/cucumber-java-skeleton/gradle/build/tmp/test/work -Dorg.gradle.native=false @/home/dewi/.gradle/.tmp/gradle-worker-classpath10480301566310671512txt -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=GB -Duser.language=en -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Test Executor 3'
Successfully started process 'Gradle Test Executor 3'

RunCucumberTest > Cucumber > Belly > io.cucumber.skeleton.RunCucumberTest.Belly - a few cukes STANDARD_OUT

    Scenario: a few cukes               # io/cucumber/skeleton/belly.feature:3
      Given I have 42 cukes in my belly # io.cucumber.skeleton.StepDefinitions.I_have_cukes_in_my_belly(int)
      When I wait 1 hour
      Then my belly should growl

RunCucumberTest > Cucumber > Belly > io.cucumber.skeleton.RunCucumberTest.Belly - a few cukes FAILED
    io.cucumber.junit.platform.engine.UndefinedStepException: The step 'I wait 1 hour' and 1 other step(s) are undefined.
    You can implement these steps using the snippet(s) below:

    @When("I wait {int} hour")
    public void i_wait_hour(Integer int1) {
        // Write code here that turns the phrase above into concrete actions
        throw new io.cucumber.java.PendingException();
    }
    @Then("my belly should growl")
    public void my_belly_should_growl() {
        // Write code here that turns the phrase above into concrete actions
        throw new io.cucumber.java.PendingException();
    }
        at app//io.cucumber.core.runtime.TestCaseResultObserver.assertTestCasePassed(TestCaseResultObserver.java:69)
        at app//io.cucumber.junit.platform.engine.TestCaseResultObserver.assertTestCasePassed(TestCaseResultObserver.java:22)
        at app//io.cucumber.junit.platform.engine.CucumberEngineExecutionContext.lambda$runTestCase$4(CucumberEngineExecutionContext.java:114)
        at app//io.cucumber.core.runtime.CucumberExecutionContext.lambda$runTestCase$5(CucumberExecutionContext.java:130)
        at app//io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:23)
        at app//io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:130)
        at app//io.cucumber.junit.platform.engine.CucumberEngineExecutionContext.runTestCase(CucumberEngineExecutionContext.java:109)
        at app//io.cucumber.junit.platform.engine.NodeDescriptor$PickleDescriptor.execute(NodeDescriptor.java:168)
        at app//io.cucumber.junit.platform.engine.NodeDescriptor$PickleDescriptor.execute(NodeDescriptor.java:90)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
        at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
        at app//org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
        at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
        at java.base@19.0.2/java.util.ArrayList.forEach(ArrayList.java:1511)
        at app//org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
        at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
        at app//org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
        at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
        at java.base@19.0.2/java.util.ArrayList.forEach(ArrayList.java:1511)
        at app//org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
        at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
        at app//org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
        at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
        at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
        at app//org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
        at app//org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
        at app//org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:73)
        at app//org.junit.platform.suite.engine.SuiteLauncher.execute(SuiteLauncher.java:63)
        at app//org.junit.platform.suite.engine.SuiteTestDescriptor.execute(SuiteTestDescriptor.java:128)
        at app//org.junit.platform.suite.engine.SuiteTestEngine.lambda$execute$0(SuiteTestEngine.java:73)
        at java.base@19.0.2/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base@19.0.2/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base@19.0.2/java.util.Iterator.forEachRemaining(Iterator.java:133)
        at java.base@19.0.2/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1921)
        at java.base@19.0.2/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base@19.0.2/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base@19.0.2/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base@19.0.2/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base@19.0.2/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base@19.0.2/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at app//org.junit.platform.suite.engine.SuiteTestEngine.execute(SuiteTestEngine.java:73)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
        at app//org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
        at app//org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
        at app//org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
        at app//org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
        at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:110)
        at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:90)
        at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:85)
        at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)
        at java.base@19.0.2/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base@19.0.2/java.lang.reflect.Method.invoke(Method.java:578)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
        at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
        at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
        at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
        at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
        at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
        at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
        at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

1 test completed, 1 failed
Finished generating test XML results (0.0 secs) into: /home/dewi/code/cucumber-java-skeleton/gradle/build/test-results/test
Generating HTML test report...
Finished generating test html results (0.001 secs) into: /home/dewi/code/cucumber-java-skeleton/gradle/build/reports/tests/test
Watching 35 directories to track changes
Watching 40 directories to track changes
Watching 41 directories to track changes

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/dewi/code/cucumber-java-skeleton/gradle/build/reports/tests/test/index.html

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
4 actionable tasks: 4 executed
dewi@dewiserver:~/code/cucumber-java-skeleton/gradle$
@mpkorstanje
Copy link
Contributor

As the README says:

This is the simplest possible build script setup for Cucumber using Java.
There is nothing fancy like a webapp or browser testing. All this does is to show
you how to install and run Cucumber!
There is a single feature file with one scenario. The scenario has three steps,
two of them pending. See if you can make them all pass!

So this all is expected:

RunCucumberTest > Cucumber > Belly > io.cucumber.skeleton.RunCucumberTest.Belly - a few cukes FAILED
    io.cucumber.junit.platform.engine.UndefinedStepException: The step 'I wait 1 hour' and 1 other step(s) are undefined.
    You can implement these steps using the snippet(s) below:

    @When("I wait {int} hour")
    public void i_wait_hour(Integer int1) {
        // Write code here that turns the phrase above into concrete actions
        throw new io.cucumber.java.PendingException();
    }
    @Then("my belly should growl")
    public void my_belly_should_growl() {
        // Write code here that turns the phrase above into concrete actions
        throw new io.cucumber.java.PendingException();
    }

@mpkorstanje
Copy link
Contributor

I can see it getting a bit lost in the other output though, so it may be worth reconsidering the "failing test example" approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants