temyers / cucumber-jvm-parallel-plugin

Maven plugin to help running Cucumber features in parallel
Apache License 2.0
129 stars 121 forks source link

Run a single feature file from Maven command Line #152

Closed mechingineer closed 6 years ago

mechingineer commented 6 years ago

Requirement: To be able to execute a single feature file from Maven Command Line after implementation of Cucumber-JVM-Parallel-Plugin.

As of now, we are not able to execute a single feature file from Maven Command Line after implementation of Cucumber-JVm-Parallel-Plugin. I am using below command: mvn test -Dcucumber.options="src/test/Features/Episode2.0/PatientTopNavigation/expandPatientCard.feature"

It gives me error: [ERROR] Failed to execute goal com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners (generateRunners) on project Remedy2Application: Execution generateRunners of goal com.github.temyers:cucumber-jvm-parallel-plugin:4.2.0:generateRunners failed: Parameter 'directory' is not a directory -> [Help 1]

Please help me fixing this one.

mpkorstanje commented 6 years ago

Can you provide a stacktrace? You may need to run maven with --debug.

mechingineer commented 6 years ago

Hi @mpkorstanje ,

I executed the below command: "mvn test -Dcucumber.options="src/test/Features/Episode2.0/PatientTopNavigation/expandPatientCard.feature" --debug >> out.txt"

This command ignored the Dcucumber.options that I have passed from the above command line argument and instead executed the feature files (in parallel) present in tag under Cucumber-JVM-Parallel-Plugin in pom.xml.

Refer attached verbose output of the same. out.txt

mpkorstanje commented 6 years ago

This trace does not contain the original problem...

Keep in mind this plugin generates runners. It does not execute cucumber tests. If you don't clean you'll keep the old runners.

mechingineer commented 6 years ago

I even tried below command:

"mvn clean install test verify -Dcucumber.options="src/test/Features/Episode2.0/PatientTopNavigation/expandPatientCard.feature" --debug >> out.txt"

It still executes the feature files (in parallel) present in tag under Cucumber-JVM-Parallel-Plugin in pom.xml.

Also, instead of making the changes in the pom.xml every time, can this plugin be tweaked to pass the featureDirectory path from maven command line ?

mpkorstanje commented 6 years ago

The user propery for the features directory is featuresDir. You can use that to pass it to maven.

I am having some issues reproducing the problem from just your description. Can you provide a PR with a failing integration test? They are in the it folder. Alternatively a github project with mcve would help.

https://stackoverflow.com/help/mcve