Cucumbefeaturewrapper is not working in runner class | Appium Training|Appium tutorials

Appium Training Forum

cucumbefeaturewrapper is not working in runner class

S
Suresh Patil Post on 05/05/2019

package com.cucumber.lilly.runner;

import java.util.AbstractSet;
import java.util.function.Predicate;

import cucumber.api.testng.AbstractTestNGCucumberTests;
import cucumber.api.testng.CucumberFeatureWrapper;
import cucumber.api.testng.TestNGCucumberRunner;

import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import cucumber.runtime.CucumberException;
import cucumber.runtime.model.CucumberFeature;
import cucumber.api.CucumberOptions;
@CucumberOptions(features ="./features",glue ={"com.cucumber.lilly.stepdefination"}, tags ={"@Onboading.feature"}, plugin ={"pretty","html:target/site/cucumber-pretty","json:target/cucumber.json"}, monochrome =true)
public class MyRunner {
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();

A
aditya Reply on 07/05/2019

What is the error you are getting ?

S
Suresh Patil Reply on 07/05/2019