7

I'm keen to get thoughts on a reasonable number of scenarios per feature in Gherkin.

At what point do you start to thing about re-organising the feature to keep the number of scenarios at a manageable level?

1
  • My current thinking is that too many scenarios is telling me that I should be using more examples via Scenario Outlines. Commented Jun 17, 2015 at 10:34

2 Answers 2

4

'In general if there are more than about five or six scenarios, a story can probably be broken down by grouping similar scenarios together.'

Dan North (http://dannorth.net/whats-in-a-story/)

3

Like in all testing, it depends on what you are testing. Complex features, which require lots of steps and preperations for example, will need multiple scenarios to be tested thoroughly, where a simple calculation feature may do with only the happy flow and two erroneous scenarios.

If you find yourself writing too many scenarios for one feature, it may be an indication that the feature is too big.

But in the end, there isn't a "Golden Number" of tests before you can say: "Jup, I've reached my amount, it should be all right", it depends on multiple factors (Complexity, amount of possibilities, the person writing the tests etc).

If you start losing track of your scenarios, its probably a good time to re-organise :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.