Issue
I have a question about cucumber, I'm integrating cucumber into an existing java project. In the past many modules are defined in the project. The steps are defined in the "testApi" module. The test classes and the feature file are defined in the "integrationTest" module.
example:
->project
->testApi
->src
->test
->java
->com
->apiXyz
myTestSteps.java
->integrationTest
->src
->test
->java
->com
->cucumber
myTestClass.java
->resources
->cucumber
myTest.feature
How do I specify the path to the step definition (myTestSteps.java) in myTestClass.java? With "glue" I can only specify steps in the same src path.
Solution
Hey You can Integrate Your Test Cases Module Wise:
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxx.awsam</groupId>
<artifactId>AW-END-TO-END-TESTS</artifactId>
<version>1.0.0.1034-SNAPSHOT</version>
<packaging>pom</packaging>
<name>AW-END-TO_END_TESTS</name>
<modules>
<module>Module1</module>
<module>Module1</module>
</modules>
For Runner Class:
features = "classpath:cucumber/myTest.feature",
glue = {"YourStepDefPackage:com.apiXyz"}
Answered By - Kiran Yadav