title: cucumber junit runner java.lang.NoSuchMethodError:
body: <p>Trying to implement cucumber to do some automated tests. jUnit tests. I've created 2 files and edited pom.xml that comes with maven project to add dependencies. Content is shown below. The first of two files are cucumber .feature files, which is a gherkin of plain language. The other is CukesRunner.java</p>
  
  <p>When I run my tests using <code>Project -&gt; Run as ... -&gt; Maven test</code> it works as expected.</p>
  
  <p>However when I ran the CukesRunner.java file using Eclipse the Eclipse JUnit GUI, I get an error:</p>
  
  <pre><code>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:77)
      at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:41)
      at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:226)
      ... 
  </code></pre>
  
  <p>pom.xml: <br></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;com.bdd&lt;/groupId&gt;
    &lt;artifactId&gt;airportparking&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;airportparking&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;/properties&gt;
  
    &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt;
              &lt;version&gt;1.1.5&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;info.cukes&lt;/groupId&gt;
              &lt;artifactId&gt;cucumber-junit&lt;/artifactId&gt;
              &lt;version&gt;1.1.5&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.rubiconproject.oss&lt;/groupId&gt;
              &lt;artifactId&gt;jchronic&lt;/artifactId&gt;
              &lt;version&gt;0.2.6&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.8.2&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><br>
  CukesRunner.java: <br></p>
  
  <pre><code>package com.bdd.airportparking;
  
  import cucumber.api.junit.*;
  import org.junit.runner.RunWith;
  
  @RunWith(Cucumber.class)
  @Cucumber.Options(
          format={"pretty", "html:target/cucumber"},
          features="src/test/resources"
          )
  public class CukesRunner {
  
  }
  </code></pre>
  
  <p><br>
  ValetParking.feature:</p>
  
  <pre><code>Feature: Valet Parking
      As a traveler
      In order to determine where to park my car
      I want to know the cost of valet parking
  
  Scenario: Calculate valet parking cost for half an hour
      When I park my car in the Valet Parking Lot for 30 minutes
      Then I will have to pay $12
  </code></pre>
  
  <p><br>
  Output when running <code>CukesRunner.java</code> as a <code>Junit Test</code>: </p>
  
  <pre><code>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:77)
      at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:41)
      at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:226)
      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:487)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:455)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  </code></pre>
  
  <p><br>
  <strong>How I structured my project in eclipse:</strong> 
  <a href="http://postimg.org/image/vf6tlw7el/full/" rel="noreferrer">http://postimg.org/image/vf6tlw7el/full/</a></p>