Skip to content

Commit

Permalink
added test with rule and scenario outline (cucumber#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
dumpsterfireproject committed Jun 10, 2022
1 parent 39a9a36 commit c639f6a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 6 deletions.
44 changes: 44 additions & 0 deletions features/formatter/pretty.feature
Expand Up @@ -504,3 +504,47 @@ Feature: pretty formatter
2 steps (2 passed)
0s
"""

Scenario: Support of Feature Plus Rule with Scenario Outline
Given a feature "features/simple.feature" file:
"""
Feature: simple feature with a rule with Scenario Outline
simple feature description
Rule: simple rule
simple rule description
Scenario Outline: simple scenario
simple scenario description
Given <status> step
Examples: simple examples
| status |
| passing |
| failing |
"""
When I run feature suite with formatter "pretty"
Then the rendered output will be as follows:
"""
Feature: simple feature with a rule with Scenario Outline
simple feature description
Scenario Outline: simple scenario # features/simple.feature:5
Given <status> step # suite_context.go:0 -> SuiteContext.func2
Examples: simple examples
| status |
| passing |
| failing |
intentional failure
--- Failed steps:
Scenario Outline: simple scenario # features/simple.feature:5
Given failing step # features/simple.feature:8
Error: intentional failure
2 scenarios (1 passed, 1 failed)
2 steps (1 passed, 1 failed)
0s
"""
12 changes: 6 additions & 6 deletions run_test.go
Expand Up @@ -432,11 +432,11 @@ func Test_AllFeaturesRun(t *testing.T) {
...................................................................... 140
...................................................................... 210
...................................................................... 280
.............................................. 326
................................................. 329
85 scenarios (85 passed)
326 steps (326 passed)
86 scenarios (86 passed)
329 steps (329 passed)
0s
`

Expand All @@ -459,11 +459,11 @@ func Test_AllFeaturesRunAsSubtests(t *testing.T) {
...................................................................... 140
...................................................................... 210
...................................................................... 280
.............................................. 326
................................................. 329
85 scenarios (85 passed)
326 steps (326 passed)
86 scenarios (86 passed)
329 steps (329 passed)
0s
`

Expand Down

0 comments on commit c639f6a

Please sign in to comment.