I have created a basic Cucumber framework with the help of Maven project in Eclipse IDE.
I am trying to execute all runner classes by using TestNG suite. In order to do that, I have to add all the dependencies required for Cucumber and TestNG integration in pom.xml file.
Runner class 1
package tests.report.runners;
import cucumber.api.CucumberOptions;
@CucumberOptions(features = "src/test/resources/features",glue= {"tests"},tags= {"@Report"})
public class ReportRunner {
}
Runner class 2
package tests.dashboard.runners;
import cucumber.api.CucumberOptions;
@CucumberOptions(features = "src/test/resources/features",glue= {"tests"},tags= {"@Report"})
public class DashboardRunner {
}
testng.xml
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="First Suite" parallel="classes">
<test name="Chrome Test" parallel="classes">
<classes>
<class name ="tests.report.runners.ReportRunner"></class>
<class name ="tests.dashboard.runners.DashboardRunner"></class>
</classes>
</test>
</suite>
Package structure is here:
However, I am getting this error:
Cannot find class in classpath:\src\test\java\tests\report\runners\ReportRunner.java
How can I debug this?