TestNg runner class | Appium Forum
S
Suresh Patil Posted on 05/05/2019

Hi Aditya,

 

Please explain cucumber TestNG runner class,  As you have coppied pasted code from execisting class.

This would help to solve many problems.

Thanks,

Suresh

 

private TestNGCucumberRunner tcr;

@BeforeClass(alwaysRun = true)
public void setUpClass() throws Exception
{
tcr=new TestNGCucumberRunner(this.getClass());

}
@Test(dataProvider = "features")
public void feature(CucumberFeatureWrapper cucumberFeatureWrapper)
{
tcr.runCucumber(cucumberFeatureWrapper.getCucumberFeature());


}
@DataProvider
public Object[][] features()
{
return tcr.provideFeatures();
}
@AfterClass(alwaysRun = true)
public void tearDownClass()
{
tcr.finish();
}


A
aditya Replied on 07/05/2019

What is the main concern in this class, I mean which method is not clear to you.

i will be happy to explain.