Cucumber Combinatorial Testing

I have a script scheme that has two different variables. One variable has about 20 different values, and the other has 3.

I need to be able to test each combination, and I need each in a separate scenario, since they must be tested independently.

Currently, I'm just writing this manually (they are integers in the example, but not in my test):

Scenario Outline: Test my stuff
Given first var is <var_a>
And second var is <var_b>
When I do stuff
Then good stuff should happen

Examples:
| var_a | var_b |
| 1     | 1     |
| 1     | 2     |
| 1     | 3     |
| 2     | 1     |
| 2     | 2     |
etc...

Question: Is there a way to start this when each combination should not be written out? Subsequently, the variables will change in size and content, and I would prefer to have a single data structure.

+5
source share
3 answers
Scenario: Test my stuff
Given first var combinations is @var_a_combos
Given second var combinations is @var_b_combos
When I run every combination
Then good stuff should happen
  • @var_a_combos @var_b_combos , .
  • When I run every combination , . , , @results (String), .
  • Then good stuff should happen @results.should eql "", , case / .

String ( ) , , , .

, , . , , .

- , , , .

+1

, , QUnit ( javascript, ). QUnit , Capybara

0

? - ?

In any case, regarding your request to run everything in a separate script, a script script with examples is what you need. See Cucumber Docs.

-1
source

All Articles