temyers / cucumber-jvm-parallel-plugin

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

How to set glue dynamically when tests are executed using Jenkins #170

Closed Jazzyekim closed 6 years ago

Jazzyekim commented 6 years ago

Previously plugin had a possibility to set glue in pom like this: <glue>${glue}</glue> It worked fine. Now I am trying to use newer version (5.0.0) since I want to get parallelizm-by-feature option, but I am forced to set glue like this: <glue><package>glue1</package><package>glue2</package></glue> Which doesn't allow to set glue dynamically. If I set it like I did previously I am getting Unable to parse configuration of mojo com.github.temyers:cucumber-jvm-parallel-plugin:5.0.0:generateRunners for parameter glue: Cannot assign configuration entry 'glue' with value 'steps.advisor.general,steps.advisor.insurance,steps.advisor.loan,hooks' of type java.lang.String to property of type java.util.List Is there a way how I can set glue as an option from the command line? I can not set all the glues in pom since I would get duplication of step definition errors in this case. So each test suite defines its own set of glues to use

lega-land commented 6 years ago

have you tried to set cucumber.options with --glue glue1,glue2 ?

mpkorstanje commented 6 years ago

The goal of maven is to make builds portable and repeatable. Setting parts of the configuration dynamically goes against this.

You can either configure different executions of the cucumber-jvm-parallel-plugin in different maven profiles. These can then be activated from the command line by using -Pmy-tests or -Pmy-other-tests.

Or you can configure multiple executions of the cucumber-jvm-parallel-plugin with different configurations. This will generate runners for each configuration. All generated runners will then be executed in the test phase.

zdenek-jonas commented 6 years ago

Launch with maven paramater -Dcucumber.glue="glue1,glue2" will not work?

Jazzyekim commented 6 years ago

it looks like -Dcucumber.glue="glue1,glue2" works. Thank you @johny2000uwb