开发者

Run single cucubmer scenario via cuke4duke and maven

I'm using maven and cuke4duke-maven-pluign to开发者_开发技巧 run cucumber features. Is it possible to run a single cucumber scenario?


Yes, its sure possible like this: https://github.com/aslakhellesoy/cucumber/tree/master/examples/i18n/en In this example you can use only divide for example. For another example you want to test a calculator.java simply. In there thats possible, you can test only add.feature in this test skeleton.


One thing we do in our projects using cuke4duke is to create a property for cuke4duke arguments:

<project ...>
  <properties>
     <cukeArgs>--tags ~@wip --tags ~@benchmark --tags ~@html</cukeArgs>
  </properties>


  <build>
    <plugin>
      <groupId>cuke4duke</groupId>
      <artifactId>cuke4duke-maven-plugin</artifactId>
      <version>${cuke4duke.version}</version>
      <configuration>
        <cucumberArgs>
          ...
          <cucumberArg>${cukeArgs}</cucumberArg>
        </cucumberArgs>
      </configuration>
    </plugin>
  </build>
</project>

Using that you can do the following:

mvn cuke4duke:cucumber -DcukeArgs="-n cooking"

to run features that have cooking in their name.


Use cucumber.features property on the command line, for example:

mvn cuke4duke:cucumber -Dcucumber.features=features/self-registered-login.feature
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜