Replies: 1 comment
-
From what I see in code scenario outlines are rendered into particular scenarios (pickles) during features parsing. Then they are processed same way as standalone scenarios (shuffled with random and ran concurrently). I checked with such test and can see the scenarios running out of order.
Feature: Test Outline Ordering
Scenario Outline: Check case
When I have a case <case>
Then I should have a case <case>
Examples:
| case |
| 0 |
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 | package outline_test
import (
"github.com/cucumber/godog"
"testing"
)
func TestFeatures(t *testing.T) {
suite := godog.TestSuite{
ScenarioInitializer: func(s *godog.ScenarioContext) {
s.Step(`^I have a case (\d+)$`, func(c int) {
println("have", c)
})
s.Step(`^I should have a case (\d+)$`, func(c int) {
println("should have", c)
})
},
Options: &godog.Options{
Format: "pretty",
Paths: []string{"features/Outline.feature"},
TestingT: t,
Randomize: 1234,
Concurrency: 10,
},
}
if suite.Run() != 0 {
t.Fatal("non-zero status returned, failed to run feature tests")
}
} Maybe there is something internal to your application that synchronizes and enforces specific sequential order of scenarios? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Given a test suite that already enable random and concurrency
When we run the test, will the scenarios in a "scenario outline" mixed with other scenarios and run random?
From our observation, it seem they're running sequentially?
Beta Was this translation helpful? Give feedback.
All reactions