Google News
logo
Cucumber - Interview Questions
What do you understand by the TestRunner class in the Cucumber testing approach? Explain with example.
In the Cucumber testing approach, the TestRunner class provides the link between the feature file and the step definition file. The TestRunner class is generally an empty class with no class definition.
 
Example of a TestRunner class in Cucumber :
Package com.sample.TestRunner  
importorg.junit.runner.RunWith;   
importcucumber.api.CucumberOptions;   
importcucumber.api.junit.Cucumber;  
@RunWith(Cucumber.class)   
@CucumberOptions(features="Features",glue={"StepDefinition"})   
public class Runner   
{  
}  
Advertisement