What is the significance of the TestRunner class in Cucumber?

724    Asked by FreemanPacifico in QA Testing , Asked on Jan 13, 2020
Answered by Ashish Mishra

TestRunner class is utilized to give the connection between the feature file and step definition file. The following is the example portrayal of how TestRunner class will resemble. A TestRunner class is commonly an unfilled class with no class definition.

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

{

}



Your Answer

Interviews

Parent Categories