0

I'm looking for the way how I can manage ruby cucumber scenarios in runtime. I'd like to filter some scenarios out having some information about SUT which I can gather in runtime.

For instance, I've the following scenarios

@automated
Scenario: As a customer I want to run ... scenario 1
Given ...

@automated @debug
Scenario: As a debugger I want to run ... scenario 2
Given ...

@automated
Scenario: As a customer I want to run ... scenario 3
Given ...

@automated @release
Scenario: As a releaser I want to run ... scenario 4
Given ...

I'm able to determine whether a debug or release application is testing now. And for the debug one I want to see scenarios 1,2,3 to be run but for the release app I want to see 1,3,4 to be run.

I know how to do it using rake or any other wrapper script but it'd be better to find solution without such wrapper scripts.

Also, cucumber profiles might not be a good choice here because there are several parameters each with a number of values. So it might require some crazy number of their combinations.

  • Have you tried `cucumber --tags @automated`? about tags you can read here: https://github.com/cucumber/cucumber/wiki/Tags – Малъ Скрылевъ Apr 22 '14 at 08:03
  • Sure, we are using tags. The question is about how to do it in runtime but not in command line. For the example above I need two command lines first one should contain ~@release and second one ~@debug. Now imagine that we have a number of such parameters: device/emulator; has camera/does not have camera and so on. – Alexey Lyanguzov Apr 22 '14 at 15:28
  • I understood your point, but actually you'll need only one command line and you can include multiple tags in a single command line. Btw, have you considered using cucumber.yml file? I know you mentioned about profiles so I assume you're already familiar, if not already used, with cucumber.yml file. – Parva Thakkar Apr 22 '14 at 19:14

0 Answers0