Search code examples
javatestingcommand-linecucumbercucumber-jvm

CucumberOptions Java command line


I am trying to filter what features in my test suite.

I need to specify what features/folders with features cucumber should run.

I am running that with command line, specifying single feature path works fine:

-D cucumber.options="features/Login.feature"

but I am unable to pass multiple features/paths, I tried with many ways, ex:

-D cucumber.options="features/Login.feature, features/sub_folder"

but it fails, I am well aware of tags to filter what scenarios to run or not, but it would greatly benefit my particular case if I could pass what features/folders with features cucumber should take, thank you.


Solution

  • Found answer with trial and error approach:

    there is no need for a comma (',') between paths to the features of folders.

    Working example:

    -D cucumber.options="features/Login.feature features/sub_folder"