I have some scenarios which call a stepdef from a jar included as a dependency.
Now, I want to maintain 2 separate versions for the same stepdef into 2 different jars. Since I need few scenarios to use version 1 and others to use version 2 of the stepdef.
How do I do this with @CucumberOptions
, specifically mentioning jar source in the glue
?
I solved this problem using the following approach:
step.provider.pkg
property in @CucumberOptions
glue
specification for both the runners.Note regarding maven:
I had to include both the runners in maven failsafe
plugin to run tests during integration-test
phase. Also had to provide 2 separate executions
in failsafe
plugin to enable ordered execution of mentioned runners.