Reputation: 510
I have an Selenium Automation Framework integrated with Maven and Cucumber. I want to run my cucumber test using jenkins.
I am following steps to run it:
The cucumber tests are not running after executing these steps, however Build is successful.
Upvotes: 2
Views: 10128
Reputation: 601
You need the following libraries in your pom.xml, within
<pluginManagement></pluginManagement>
Build the project again, and then execute at the directory of your pom.xml - "maven clean", "maven test"
Upvotes: 0
Reputation: 1108
Your pom.xml should have runner scripted like below.
Also Goal and options in jenkins should be -Dtest=Runnerclass test incase you are running single test
<profiles>
<profile>
<id>integration-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<parallel>none</parallel>
<threadCount>1</threadCount>
<disableXmlReport>true</disableXmlReport>
</configuration>
<executions>
<execution>
<id>Runnerclass</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
id in the above plugin is your runner. then you can run your tests in jenkins.
Upvotes: 2