Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
7.6k views
by The go-to Tester (391 points)
retagged by

java.lang.NoSuchMethodError: org.junit.runner.Description.createSuiteDescription(Ljava/lang/String;Ljava/io/Serializable;[Ljava/lang/annotation/Annotation;)Lorg/junit/runner/Description;
    at cucumber.runtime.junit.FeatureRunner.getDescription(FeatureRunner.java:43)
    at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:90)
    at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:38)
    at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:290)
    at org.junit.runner.Runner.testCount(Runner.java:38)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.countTestCases(JUnit4TestClassReference.java:30)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.countTests(RemoteTestRunner.java:479)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:447)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

3 Answers

1 like 0 dislike
by
Your .feature file is supposed to be inside

src/test/resources

Move your file and let us know.
by Contributing Tester (32 points)
I think this is the reason
0 like 0 dislike
by
It looks like your code is not compiled properly. If you are using Eclipse IDE, you may have to build your code
by The go-to Tester (391 points)
I have build automatically option already set in Eclipse.
by The go-to Tester (181 points)
How are you executing your code?
by The go-to Tester (391 points)
I am running the code as junit test
0 like 0 dislike
by The go-to Tester (181 points)

Update your JUnit.

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>

and surefire plugin:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>
        </plugin>
    </plugins>
</build>
by The go-to Tester (391 points)
I have updated the JUnit and added the SureFire plugin to the POM file but I am still facing the same error.
by New User (10 points)
I had similar issue and adding cucumber-junit dependency helped

<dependency>
         <groupId>io.cucumber</groupId>
         <artifactId>cucumber-junit</artifactId>
         <version>7.2.3</version>
</dependency>


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...