sri sri - 1 year ago 172
Java Question

execute multiple cucumber feature files

When I submit a single feature file it works perfectly. I want to pass features folder path which has multiple feature files into runner script. Can anyone help to execute multiple feature files?

All feature files have same steps but data is different and file name is different.


@CucumberOptions(format = {"pretty"}, features =

public class CucumberTest {


I appreciate you help.

Answer Source

You can also use Cucumber Command-Line Interface Runner (CLI Runner) cucumber.api.cli.Main and pass the path to the folder containing feature files as command line option.


java cucumber.api.cli.Main --glue --plugin html:C:\testreports C:\features\ is the package having the cucumber step definitions

C:\features\ is the folder containing the feature files

C:\testreports is the folder where the cucumber html report will be generated.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download