temyers / cucumber-jvm-parallel-plugin

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

Cannot execute the test sequentially through JUnit post Cucumber JVM Parallel Plugin #154

Closed mechingineer closed 5 years ago

mechingineer commented 6 years ago

Hi,

I have successfully implemented the Cucumber-JVM-Parallel-Plugin in my project and it does it's job perfectly. However I have a peculiar problem where in I need to run the cucumber test through mvn command line just like the way we used to run before parallel execution.

So my requirement basically is to be able to run the cucumber test using the below command: mvn test -Dcucumber.options="src/test/Features/Episode2.0/PatientTopNavigation/"

In addition to the above command, I should also be able to run the test parallely by providing fork count in pom.xml.

Problem is, as soon as I add Cucumber-JVM-Parallel-Plugin, my command "mvn test -Dcucumber.options="src/test/Features/Episode2.0/PatientTopNavigation/"" fails giving below 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]

I need this as business is using the command line to execute the test parallely as well as old fashioned JUnit way sequentially.

Please help me in finding a solution for this.

mpkorstanje commented 6 years ago

Can you run with --error so it includes the stack trace?

naveedriay commented 6 years ago

I think your command require slight tweaking. With cucumber.options in command line, you need to mention which option you are opting for. see example below.

mvn clean test "-Dcucumber.options=--tags @tag-name"
mvn clean test "-Dcucumber.options=--glue com.test.step_defs"

I hope it will resolve your problem.