cucumber.runtime.CucumberException: Classes annotated with @RunWith(Cucumber.class) must not define any Step Definition or Hook methods. Their sole purpose is to serve as an entry point for JUnit. Step Definitions and Hooks should be defined in their own classes. This allows them to be reused across features. Offending class: class com.cucumber.learning.YoutubeTest at cucumber.runtime.junit.Assertions.assertNoCucumberAnnotatedMethods(Assertions.java:13)

Stack Overflow | Test admin | 6 months ago
  1. 1

    how to execute parallel testing in cucumber

    Stack Overflow | 6 months ago | Test admin
    cucumber.runtime.CucumberException: Classes annotated with @RunWith(Cucumber.class) must not define any Step Definition or Hook methods. Their sole purpose is to serve as an entry point for JUnit. Step Definitions and Hooks should be defined in their own classes. This allows them to be reused across features. Offending class: class com.cucumber.learning.YoutubeTest at cucumber.runtime.junit.Assertions.assertNoCucumberAnnotatedMethods(Assertions.java:13)
  2. 0

    Cucumber doesn't work with JUnit 4.12

    GitHub | 2 years ago | lbeuster
    cucumber.runtime.CucumberException: Failed to create scenario runner
  3. 0

    cucumber.runtime.CucumberException: You're not allowed to extend classes that define Step Definitio

    Google Groups | 2 weeks ago | Unknown author
    cucumber.runtime.CucumberException: You're not allowed to extend classes that define Step Definitions or hooks. class cucumber.setps.dashboard.DashboardPageSteps extends class automation.framework.BasePreconditionScript
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    August 2012 – Tamas Gyorfi

    tamasgyorfi.net | 4 months ago
    cucumber.runtime.CucumberException: You're not allowed to extend classes that define Step Definitions or hooks. class MyStepDefinitions extends class MyFixture</pre>
  6. 0

    GOSU: The type "block():void" cannot be converted to "block(java.lang.String):void" [line:-300 col:4

    Google Groups | 2 years ago | Mark Sayewich
    cucumber.runtime.CucumberException: Arity mismatch: Step Definition 'AddingStepdefs.gsp:13' with pattern [^the calculator is run$] is declared with 1 parameters. However, the gherkin step has 0 arguments []. Step: When the calculator is run

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. cucumber.runtime.CucumberException

      Classes annotated with @RunWith(Cucumber.class) must not define any Step Definition or Hook methods. Their sole purpose is to serve as an entry point for JUnit. Step Definitions and Hooks should be defined in their own classes. This allows them to be reused across features. Offending class: class com.cucumber.learning.YoutubeTest at cucumber.runtime.junit.Assertions.assertNoCucumberAnnotatedMethods(Assertions.java:13)

      at cucumber.api.junit.Cucumber.<init>()
    2. Cucumber-JVM: JUnit
      Cucumber.<init>
      1. cucumber.api.junit.Cucumber.<init>(Cucumber.java:55)
      1 frame
    3. Java RT
      Constructor.newInstance
      1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      4. java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      4 frames
    4. JUnit
      Request.classes
      1. org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
      2. org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
      3. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      4. org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
      5. org.junit.runner.Computer.getRunner(Computer.java:40)
      6. org.junit.runner.Computer$1.runnerForClass(Computer.java:31)
      7. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      8. org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:101)
      9. org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:87)
      10. org.junit.runners.Suite.<init>(Suite.java:80)
      11. org.junit.runner.Computer.getSuite(Computer.java:28)
      12. org.junit.runner.Request.classes(Request.java:75)
      12 frames
    5. SureFire JUnitCore Runner
      JUnitCoreProvider.invoke
      1. org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:97)
      2. org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:78)
      3. org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:54)
      4. org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:144)
      4 frames
    6. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
      2. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
      3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      3 frames