I have a really long, multi-step form, which gets validated at various points along the way, and certain answers can block submission. I'd like to end-to-end test that the various permissible routes through the form all allow the form to be submitted at the end. (In almost all cases the validity of a field's value is independent of the values of other fields.)
I believe my current options are:
- Just write separate scenarios for each possible way of going through the form.
- Write one big scenario outline using a gigantic table of examples with one row for every possible way of going through the form.
- Several scenario outlines each with a large table of examples with one row for every possible way of going through the form given the scope of the individual scenario outline.
- Maybe something to do with inline tables? Although as I understand it, that would mean just one scenario with each step passed a selection of values, which sounds really difficult to turn into isolated browser-based tests.
- Accept that comprehensive scenario coverage isn't going to happen and only write tests for a subset of the possible routes through the form.
Ideally I'd be able to define a set of example values for each of several fields, and a separate scenario would run for each combination.
For example with something like this in a feature file (I have no opinions about syntax btw):
Scenario Outline Multidimensional:
Given an [animal]
When I [action] the animal
Then [result] happens
And I feel [feeling]
Examples: Animals
| animal |
| zebra |
| fox |
| eagle |
Examples: Actions
| action |
| talk to |
| befriend |
Examples: Consequences
| result | feeling |
| nothing much | nonplussed |
| something amazing | over the moon |
yadda would run 3 x 2 x 2 = 12 scenarios.
I have a really long, multi-step form, which gets validated at various points along the way, and certain answers can block submission. I'd like to end-to-end test that the various permissible routes through the form all allow the form to be submitted at the end. (In almost all cases the validity of a field's value is independent of the values of other fields.)
I believe my current options are:
Ideally I'd be able to define a set of example values for each of several fields, and a separate scenario would run for each combination.
For example with something like this in a feature file (I have no opinions about syntax btw):
yadda would run 3 x 2 x 2 = 12 scenarios.