How can i run cucumber features using testNG and selenium or cucumber-JVM i'm new in this but after my researsh i think that cucumber jvm doesn't work in paralell for me i added also the surefire plugin
now i try to test with TESTNG my testNg.xml :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="run test in parallel Suite" parallel="tests" verbose="1" configfailurepolicy="continue" thread-count="2">
<listeners>
<listener classname="com.driver.LocalWebDriverListener" />
</listeners>
<test name="Tests in FF">
<parameter name="browserName" value="firefox" />
<classes>
<class name="com.runner.RunnerTestInFirefox" />
</classes>
</test>
<test name="Tests in Chrome" >
<parameter name="browserName" value="chrome" />
<classes>
<class name="com.runner.RunnerTestInChrome"/>
</classes>
</test>
</suite> <!-- Suite -->
and i create 2 class runner one for chrome and the other for firefox:
package com.runner;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import cucumber.api.testng.AbstractTestNGCucumberTests;
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"/features"},
glue={"stepsdefinition"})
public class RunnerTestInChrome extends AbstractTestNGCucumberTests {
}
when i run my test the browser chrome is open and closed but i don't why it didn't take the url and the steps in the feature!