1

I am wondering if anyone's ever tried tagging scenarios on the fly.

Here's the use case: We have hundreds of scenarios for the regression tests, and some of the tests might fail because the API is down (which usually means that the next time it runs, this should pass), or the data changed (which means that either the scripts are not robust enough and we need to fix it, or we need to change the data), or the requirement changed (which means that we need to change the scripts).

For the latter 2 cases, the same scenario should fail multiple times.

We need to tag the ones that require human intervention (either rewrite the scripts or change data) with @quarantine, and take out the @regression tag so that it wouldn't be run over and over while we know it would fail anyways.

I've not seen anyone does this. Is this doable? Or is the only way to do this in Cucumber without resorting to complicated shell script?

Angel
  • 11
  • 3
  • What exactly do you mean by 'on the fly', are you looking for cucumber to automatically add or remove tags or looking to add tags to a currently running cucumber script? – Kyle Jun 15 '15 at 21:23
  • add/remove tags to a currently running scenario (or the scenario that just finished) based on the result. – Angel Jun 24 '15 at 20:28

1 Answers1

0

Right now, I ended up using the hooks, in the "after" scenario part, to modify the feature file directly. A bit crude, but it works for now.

I am still looking for a better resolution.

Angel
  • 11
  • 3