In eclipse IDE, I have created a basic cucumber framework by using Maven project.
I have added all the dependencies required in pom.xml.For TestNG plugin added below dependencies.
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.5</version>
</dependency>
But 'TestNG Suite' option was not coming in preferences,so installed TestNG through Help->Install New Software.
Framework is having feature file(scenario is described),stepdefinitions(code/logic given) and runner class(To map feature with stepdefinitions file and run it).
Runner class :
package tests.report.runners;
import cucumber.api.CucumberOptions;
@CucumberOptions(features = "src/test/resources/features",glue= {"tests"},tags= {"@Report"})
public class ReportRunner {
}
Like this I have one runner class for each module(End to End scenario)
Ex :
Login, go to product page and logout
Login,generate report and logout
I am trying to run these runner class by testng.xml file
testng.xml file
<?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>
</classes>
</test>
</suite>
But its throwing below error