Reputation: 78
I was able to run Cucumber-JVM tests using @RunWith & @CucumberOptions tags.But I am unable to execute the tests using Maven. Can somebody point me in the right direction ?
I am trying to use maven sure fire plugin, after scouring the internet.I do think, I am making a mistake, which I dont't know abt.
Upvotes: 1
Views: 196
Reputation: 78
The directory structure is :
src\test\
--config\
--resources\ (has the .feature files)
--steps\ (classes for the steps)
===================maven POM file=======================
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Project</groupId>
<artifactId>Project</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<cucumber.options>--format pretty</cucumber.options>
<testsrc>src/test/</testsrc>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.0</version>
</dependency>
<dependency> <!-- External Dependency -->
<groupId>ojdbc6</groupId>
<artifactId>ojdbc6</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>E:\work\test\Project\libs\ojdbc6dms.jar</systemPath>
</dependency>
<dependency> <!-- External Dependency -->
<groupId>sqljdbc</groupId>
<artifactId>ojdbc6</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>E:\work\test\Project\libs\sqljdbc4.jar</systemPath>
</dependency>
</dependencies>
<build>
<testSourceDirectory>${testsrc}</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<parallel>classes</parallel>
<threadCount>1</threadCount>
<includes>
<include>**/RunCukeTests.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
Upvotes: 1