Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>(I'm assuming you're using Cucumber-JVM)</p> <p>Instead of using <strong>SpringJUnit4ClassRunner</strong>, you should use the <strong>Cucumber</strong> runner instead.</p> <pre><code>@RunWith(Cucumber.class) </code></pre> <p>To use this you will need the following dependencies:</p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;info.cukes&lt;/groupId&gt; &lt;artifactId&gt;cucumber-java&lt;/artifactId&gt; &lt;version&gt;${info.cukes.version}&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;${info.cukes.version}&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-spring&lt;/artifactId&gt; &lt;version&gt;${info.cukes.version}&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; </code></pre> <p>This will look for <strong>cucumber.xml</strong> in your class path. This XML is simply a spring bean configuration XML. Mine is pretty straight forward and contains:</p> <pre><code>&lt;context:component-scan base-package="cucumber.runtime.java.spring"/&gt; &lt;context:annotation-config/&gt; &lt;!-- wire beans required for testing --&gt; &lt;import resource="classpath*:/context.xml"/&gt; </code></pre> <p>When you run your tests you should see Spring load <strong>cucumber.xml</strong> and then import <strong>context.xml</strong>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload