|
| 1 | +Feature: Scenario Outline |
| 2 | + |
| 3 | + Scenario: Scenario outline with one examples table |
| 4 | + Given feature definition |
| 5 | + """ |
| 6 | + Feature: Scenario Outline |
| 7 | +
|
| 8 | + Scenario Outline: Scenario outline with one examples table |
| 9 | + Given simple passed step with param "<user>" |
| 10 | +
|
| 11 | + Examples: examples table |
| 12 | + | user | |
| 13 | + | Alice | |
| 14 | + | Bob | |
| 15 | + """ |
| 16 | + When I run behave with allure formatter |
| 17 | + |
| 18 | + Then allure report has a scenario with name "Scenario outline with one examples table" |
| 19 | + And scenario contains step "Given simple passed step with param "Alice"" |
| 20 | + And this scenario has parameter "user" with value "Alice" |
| 21 | + |
| 22 | + Then allure report has a scenario with name "Scenario outline with one examples table" |
| 23 | + And scenario contains step "Given simple passed step with param "Bob"" |
| 24 | + And this scenario has parameter "user" with value "Bob" |
| 25 | + |
| 26 | + Scenario: Scenario outline with many examples table |
| 27 | + Given feature definition |
| 28 | + """ |
| 29 | + Feature: Scenario Outline |
| 30 | +
|
| 31 | + Scenario Outline: Scenario outline with many examples table |
| 32 | + Given simple passed step with params "<parameter one> <parameter two>" |
| 33 | +
|
| 34 | + Examples: first table |
| 35 | + | parameter one | parameter two | |
| 36 | + | Peter | I | |
| 37 | + | Catherine | II | |
| 38 | +
|
| 39 | + Examples: second table |
| 40 | + | parameter one | parameter two | |
| 41 | + | Richard | the Lionheart | |
| 42 | + | Alexander | the Great | |
| 43 | + """ |
| 44 | + When I run behave with allure formatter |
| 45 | + |
| 46 | + Then allure report has a scenario with name "Scenario outline with many examples table" |
| 47 | + And scenario contains step "Given simple passed step with params "Peter I"" |
| 48 | + And this scenario has parameter "parameter one" with value "Peter" |
| 49 | + And this scenario has parameter "parameter two" with value "I" |
| 50 | + |
| 51 | + Then allure report has a scenario with name "Scenario outline with many examples table" |
| 52 | + And scenario contains step "Given simple passed step with params "Catherine II"" |
| 53 | + And this scenario has parameter "parameter one" with value "Catherine" |
| 54 | + And this scenario has parameter "parameter two" with value "II" |
| 55 | + |
| 56 | + Then allure report has a scenario with name "Scenario outline with many examples table" |
| 57 | + And scenario contains step "Given simple passed step with params "Richard the Lionheart"" |
| 58 | + And this scenario has parameter "parameter one" with value "Richard" |
| 59 | + And this scenario has parameter "parameter two" with value "the Lionheart" |
| 60 | + |
| 61 | + Then allure report has a scenario with name "Scenario outline with many examples table" |
| 62 | + And scenario contains step "Given simple passed step with params "Alexander the Great"" |
| 63 | + And this scenario has parameter "parameter one" with value "Alexander" |
| 64 | + And this scenario has parameter "parameter two" with value "the Great" |
| 65 | + |
| 66 | + |
| 67 | + Scenario: Many scenario outlines with one examples table |
| 68 | + Given feature definition |
| 69 | + """ |
| 70 | + Feature: Scenario Outline |
| 71 | +
|
| 72 | + Scenario Outline: First scenario outline in feature |
| 73 | + Given simple passed step with param "<friend>" |
| 74 | +
|
| 75 | + Examples: examples table |
| 76 | + | friend | |
| 77 | + | Rick | |
| 78 | + | Morty | |
| 79 | +
|
| 80 | +
|
| 81 | + Scenario Outline: Second scenario outline in feature |
| 82 | + Given simple passed step with param "<hero>" |
| 83 | +
|
| 84 | + Examples: examples table |
| 85 | + | hero | |
| 86 | + | Finn | |
| 87 | + | Jack | |
| 88 | + """ |
| 89 | + When I run behave with allure formatter |
| 90 | + |
| 91 | + Then allure report has a scenario with name "First scenario outline in feature" |
| 92 | + And scenario contains step "Given simple passed step with param "Rick"" |
| 93 | + And this scenario has parameter "friend" with value "Rick" |
| 94 | + |
| 95 | + Then allure report has a scenario with name "First scenario outline in feature" |
| 96 | + And scenario contains step "Given simple passed step with param "Morty"" |
| 97 | + And this scenario has parameter "friend" with value "Morty" |
| 98 | + |
| 99 | + Then allure report has a scenario with name "Second scenario outline in feature" |
| 100 | + And scenario contains step "Given simple passed step with param "Finn"" |
| 101 | + And this scenario has parameter "hero" with value "Finn" |
| 102 | + |
| 103 | + Then allure report has a scenario with name "Second scenario outline in feature" |
| 104 | + And scenario contains step "Given simple passed step with param "Jack"" |
| 105 | + And this scenario has parameter "hero" with value "Jack" |
0 commit comments