Details of the RunCuckesTest file
RunCukesTest.java
This file
acts as the configuration for Cucumber.
ü The Cucumber thread
initialization is done in this configuration file.
ü In this file we can invoke the TestRunner
using cucumber
By using the keyword @RunWith(Cucumber.class)
ü Also, we can define the path of the cucumber feature files to be
used.
@CucumberOptions can be used to
configure default path to the feature files
ü No other code or configurations are required in this file
Finally, RunCukesTest.java looks like below:
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(monochrome = true, features =
"src/test/resources/features")
public class RunCukesTest {}

No comments:
Post a Comment