Cucumbefeaturewrapper is not working in runner class | Appium Forum
S
Suresh Patil Posted 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 Replied on 07/05/2019

What is the error you are getting ?


S
Suresh Patil Replied on 07/05/2019

Responsive image


S
Suresh Patil Replied on 07/05/2019

image 2


S
Suresh Patil Replied on 07/05/2019

Responsive image