I have multiple projects using similar step definition across the different projects. Hence using all step definition in single project and added as dependency jar in maven. When I run using maven command it says :
You can implement missing steps with the snippets below:
@When("^Import a canvas from \"(.*?)\" to project \"(.*?)\"$")
public void import_a_canvas_from_to_project(String arg1, String arg2) throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
but when I add package in same project it works fine. (Even in eclipse from different projects works). Is there any way to run such scenarios from maven and jenkins?
I am using eclipse IDE. maven command I used is : mvn -DprofileTest=cucumberID clean -P cucumberID test
cucumberID is my profile name.
Following profile I added in pom.xml
<profile>
<id>cucumberID</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>2.11</version>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<includes>
<include>step_definitions/LoginTest.java</include>
</includes>
<parallel>classes</parallel>
<threadCount>3</threadCount>
<useFile>true</useFile>
</configuration>
</plugin>
</plugins>
</build>
</profile>