Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3ca7156

Browse files
committedMay 22, 2020
Moved the fmt tests to a godog_test pkg and restructured the fmt output tests
1 parent 7568b29 commit 3ca7156

23 files changed

+261
-496
lines changed
 

‎.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ commands:
3737
go_test:
3838
description: "Run go test"
3939
steps:
40+
- run: sed -i 's#github.com/cucumber/godog_test#_test#g' formatter-tests/*/*
4041
- run: go test -v -race -coverprofile=coverage.txt -covermode=atomic
4142
godog:
4243
description: "Run godog"
@@ -67,7 +68,6 @@ commands:
6768
- part1
6869
- part2
6970

70-
7171
jobs:
7272
go1_12:
7373
working_directory: /go/src/github.com/cucumber/godog

‎fmt.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919

2020
type registeredFormatter struct {
2121
name string
22-
fmt FormatterFunc
2322
description string
23+
fmt FormatterFunc
2424
}
2525

2626
var formatters []*registeredFormatter
@@ -34,6 +34,7 @@ func FindFmt(name string) FormatterFunc {
3434
return el.fmt
3535
}
3636
}
37+
3738
return nil
3839
}
3940

@@ -54,9 +55,11 @@ func Format(name, description string, f FormatterFunc) {
5455
// and description as value
5556
func AvailableFormatters() map[string]string {
5657
fmts := make(map[string]string, len(formatters))
58+
5759
for _, f := range formatters {
5860
fmts[f.name] = f.description
5961
}
62+
6063
return fmts
6164
}
6265

‎color_tag_test.go ‎fmt_color_tag_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package godog
1+
package godog_test
22

33
import (
44
"bytes"

‎fmt_junit_test.go

-176
This file was deleted.

‎fmt_output_test.go

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
package godog_test
2+
3+
import (
4+
"bytes"
5+
"fmt"
6+
"io/ioutil"
7+
"os"
8+
"path"
9+
"path/filepath"
10+
"strings"
11+
"testing"
12+
13+
"github.com/stretchr/testify/assert"
14+
"github.com/stretchr/testify/require"
15+
16+
"github.com/cucumber/godog"
17+
)
18+
19+
const fmtOutputTestsFeatureDir = "formatter-tests/features"
20+
21+
func Test_FmtOutput(t *testing.T) {
22+
pkg := os.Getenv("GODOG_TESTED_PACKAGE")
23+
os.Setenv("GODOG_TESTED_PACKAGE", "github.com/cucumber/godog")
24+
25+
featureFiles, err := listFmtOutputTestsFeatureFiles()
26+
require.Nil(t, err)
27+
28+
formatters := []string{"cucumber", "events", "junit", "pretty", "progress"}
29+
30+
for _, fmtName := range formatters {
31+
for _, featureFile := range featureFiles {
32+
testName := fmt.Sprintf("%s/%s", fmtName, featureFile)
33+
featureFilePath := fmt.Sprintf("%s/%s", fmtOutputTestsFeatureDir, featureFile)
34+
t.Run(testName, fmtOutputTest(fmtName, testName, featureFilePath))
35+
}
36+
}
37+
38+
os.Setenv("GODOG_TESTED_PACKAGE", pkg)
39+
}
40+
41+
func listFmtOutputTestsFeatureFiles() (featureFiles []string, err error) {
42+
err = filepath.Walk(fmtOutputTestsFeatureDir, func(path string, info os.FileInfo, err error) error {
43+
if err != nil {
44+
return err
45+
}
46+
47+
if !info.IsDir() {
48+
featureFiles = append(featureFiles, info.Name())
49+
return nil
50+
}
51+
52+
if info.Name() == "features" {
53+
return nil
54+
}
55+
56+
return filepath.SkipDir
57+
})
58+
59+
return
60+
}
61+
62+
func fmtOutputTest(fmtName, testName, featureFilePath string) func(*testing.T) {
63+
fmtOutputSuiteInitializer := func(s *godog.Suite) {
64+
s.Step(`^(?:a )?failing step`, failingStepDef)
65+
s.Step(`^(?:a )?pending step$`, pendingStepDef)
66+
s.Step(`^(?:a )?passing step$`, passingStepDef)
67+
s.Step(`^odd (\d+) and even (\d+) number$`, oddEvenStepDef)
68+
}
69+
70+
return func(t *testing.T) {
71+
expectOutputPath := strings.Replace(featureFilePath, "features", fmtName, 1)
72+
expectOutputPath = strings.TrimSuffix(expectOutputPath, path.Ext(expectOutputPath))
73+
if _, err := os.Stat(expectOutputPath); err != nil {
74+
t.Skipf("Couldn't find expected output file %q", expectOutputPath)
75+
}
76+
77+
expectedOutput, err := ioutil.ReadFile(expectOutputPath)
78+
require.NoError(t, err)
79+
80+
var buf bytes.Buffer
81+
out := &tagColorWriter{w: &buf}
82+
83+
opts := godog.Options{
84+
Format: fmtName,
85+
Paths: []string{featureFilePath},
86+
Output: out,
87+
}
88+
89+
godog.RunWithOptions(fmtName, fmtOutputSuiteInitializer, opts)
90+
91+
expected := string(expectedOutput)
92+
actual := buf.String()
93+
assert.Equalf(t, expected, actual, "path: %s", expectOutputPath)
94+
}
95+
}
96+
97+
func passingStepDef() error { return nil }
98+
99+
func oddEvenStepDef(odd, even int) error { return oddOrEven(odd, even) }
100+
101+
func oddOrEven(odd, even int) error {
102+
if odd%2 == 0 {
103+
return fmt.Errorf("%d is not odd", odd)
104+
}
105+
if even%2 != 0 {
106+
return fmt.Errorf("%d is not even", even)
107+
}
108+
return nil
109+
}
110+
111+
func pendingStepDef() error { return godog.ErrPending }
112+
113+
func failingStepDef() error { return fmt.Errorf("step failed") }

‎fmt_progress_test.go

+1-139
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package godog
22

33
import (
44
"bytes"
5-
"fmt"
65
"strings"
76
"testing"
87

@@ -22,73 +21,6 @@ Feature: basic
2221
Then two
2322
`
2423

25-
func TestProgressFormatterOutput(t *testing.T) {
26-
const path = "any.feature"
27-
28-
gd, err := gherkin.ParseGherkinDocument(strings.NewReader(sampleGherkinFeature), (&messages.Incrementing{}).NewId)
29-
require.NoError(t, err)
30-
31-
pickles := gherkin.Pickles(*gd, path, (&messages.Incrementing{}).NewId)
32-
33-
var buf bytes.Buffer
34-
w := colors.Uncolored(&buf)
35-
r := runner{
36-
fmt: progressFunc("progress", w),
37-
features: []*feature{{
38-
GherkinDocument: gd,
39-
pickles: pickles,
40-
Path: path,
41-
Content: []byte(sampleGherkinFeature),
42-
}},
43-
initializer: func(s *Suite) {
44-
s.Step(`^passing$`, func() error { return nil })
45-
s.Step(`^failing$`, func() error { return fmt.Errorf("errored") })
46-
s.Step(`^pending$`, func() error { return ErrPending })
47-
},
48-
}
49-
50-
expected := `...F-.P-.UU.....F..P..U 23
51-
52-
53-
--- Failed steps:
54-
55-
Scenario: failing scenario # any.feature:10
56-
When failing # any.feature:11
57-
Error: errored
58-
59-
Scenario Outline: outline # any.feature:22
60-
When failing # any.feature:24
61-
Error: errored
62-
63-
64-
8 scenarios (2 passed, 2 failed, 2 pending, 2 undefined)
65-
23 steps (14 passed, 2 failed, 2 pending, 3 undefined, 2 skipped)
66-
0s
67-
68-
You can implement step definitions for undefined steps with these snippets:
69-
70-
func nextUndefined() error {
71-
return godog.ErrPending
72-
}
73-
74-
func undefined() error {
75-
return godog.ErrPending
76-
}
77-
78-
func FeatureContext(s *godog.Suite) {
79-
s.Step(` + "`^next undefined$`" + `, nextUndefined)
80-
s.Step(` + "`^undefined$`" + `, undefined)
81-
}
82-
83-
`
84-
85-
failed := r.concurrent(1, func() Formatter { return progressFunc("progress", w) })
86-
require.True(t, failed)
87-
88-
actual := buf.String()
89-
assert.Equal(t, expected, actual)
90-
}
91-
9224
func TestProgressFormatterWhenStepPanics(t *testing.T) {
9325
const path = "any.feature"
9426

@@ -112,77 +44,7 @@ func TestProgressFormatterWhenStepPanics(t *testing.T) {
11244
require.True(t, failed)
11345

11446
actual := buf.String()
115-
assert.Contains(t, actual, "godog/fmt_progress_test.go:107")
116-
}
117-
118-
func TestProgressFormatterWithPassingMultisteps(t *testing.T) {
119-
const path = "any.feature"
120-
121-
gd, err := gherkin.ParseGherkinDocument(strings.NewReader(basicGherkinFeature), (&messages.Incrementing{}).NewId)
122-
require.NoError(t, err)
123-
124-
pickles := gherkin.Pickles(*gd, path, (&messages.Incrementing{}).NewId)
125-
126-
var buf bytes.Buffer
127-
w := colors.Uncolored(&buf)
128-
r := runner{
129-
fmt: progressFunc("progress", w),
130-
features: []*feature{{GherkinDocument: gd, pickles: pickles}},
131-
initializer: func(s *Suite) {
132-
s.Step(`^sub1$`, func() error { return nil })
133-
s.Step(`^sub-sub$`, func() error { return nil })
134-
s.Step(`^sub2$`, func() Steps { return Steps{"sub-sub", "sub1", "one"} })
135-
s.Step(`^one$`, func() error { return nil })
136-
s.Step(`^two$`, func() Steps { return Steps{"sub1", "sub2"} })
137-
},
138-
}
139-
140-
failed := r.concurrent(1, func() Formatter { return progressFunc("progress", w) })
141-
require.False(t, failed)
142-
}
143-
144-
func TestProgressFormatterWithFailingMultisteps(t *testing.T) {
145-
const path = "some.feature"
146-
147-
gd, err := gherkin.ParseGherkinDocument(strings.NewReader(basicGherkinFeature), (&messages.Incrementing{}).NewId)
148-
require.NoError(t, err)
149-
150-
pickles := gherkin.Pickles(*gd, path, (&messages.Incrementing{}).NewId)
151-
152-
var buf bytes.Buffer
153-
w := colors.Uncolored(&buf)
154-
r := runner{
155-
fmt: progressFunc("progress", w),
156-
features: []*feature{{GherkinDocument: gd, pickles: pickles, Path: path}},
157-
initializer: func(s *Suite) {
158-
s.Step(`^sub1$`, func() error { return nil })
159-
s.Step(`^sub-sub$`, func() error { return fmt.Errorf("errored") })
160-
s.Step(`^sub2$`, func() Steps { return Steps{"sub-sub", "sub1", "one"} })
161-
s.Step(`^one$`, func() error { return nil })
162-
s.Step(`^two$`, func() Steps { return Steps{"sub1", "sub2"} })
163-
},
164-
}
165-
166-
failed := r.concurrent(1, func() Formatter { return progressFunc("progress", w) })
167-
require.True(t, failed)
168-
169-
expected := `.F 2
170-
171-
172-
--- Failed steps:
173-
174-
Scenario: passing scenario # some.feature:4
175-
Then two # some.feature:6
176-
Error: sub2: sub-sub: errored
177-
178-
179-
1 scenarios (1 failed)
180-
2 steps (1 passed, 1 failed)
181-
0s
182-
`
183-
184-
actual := buf.String()
185-
assert.Equal(t, expected, actual)
47+
assert.Contains(t, actual, "godog/fmt_progress_test.go:39")
18648
}
18749

18850
func TestProgressFormatterWithPanicInMultistep(t *testing.T) {

‎fmt_test.go

+57-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,67 @@
1-
package godog
1+
package godog_test
22

3-
import "testing"
3+
import (
4+
"io"
5+
"testing"
46

5-
func TestShouldFindFormatter(t *testing.T) {
7+
"github.com/stretchr/testify/assert"
8+
"github.com/stretchr/testify/require"
9+
10+
"github.com/cucumber/godog"
11+
)
12+
13+
func Test_FindFmt(t *testing.T) {
614
cases := map[string]bool{
7-
"progress": true, // true means should be available
8-
"unknown": false,
9-
"junit": true,
1015
"cucumber": true,
11-
"pretty": true,
1216
"custom": true, // is available for test purposes only
17+
"events": true,
18+
"junit": true,
19+
"pretty": true,
20+
"progress": true,
21+
"unknown": false,
1322
"undef": false,
1423
}
1524

16-
for name, shouldFind := range cases {
17-
actual := FindFmt(name)
18-
if actual == nil && shouldFind {
19-
t.Fatalf("expected %s formatter should be available", name)
20-
}
21-
if actual != nil && !shouldFind {
22-
t.Fatalf("expected %s formatter should not be available", name)
23-
}
25+
for name, expected := range cases {
26+
t.Run(
27+
name,
28+
func(t *testing.T) {
29+
actual := godog.FindFmt(name)
30+
31+
if expected {
32+
assert.NotNilf(t, actual, "expected %s formatter should be available", name)
33+
} else {
34+
assert.Nilf(t, actual, "expected %s formatter should be available", name)
35+
}
36+
},
37+
)
2438
}
2539
}
40+
41+
func Test_AvailableFormatters(t *testing.T) {
42+
expected := map[string]string{
43+
"cucumber": "Produces cucumber JSON format output.",
44+
"custom": "custom format description", // is available for test purposes only
45+
"events": "Produces JSON event stream, based on spec: 0.1.0.",
46+
"junit": "Prints junit compatible xml to stdout",
47+
"pretty": "Prints every feature with runtime statuses.",
48+
"progress": "Prints a character per step.",
49+
}
50+
51+
actual := godog.AvailableFormatters()
52+
assert.Equal(t, expected, actual)
53+
}
54+
55+
func Test_Format(t *testing.T) {
56+
actual := godog.FindFmt("Test_Format")
57+
require.Nil(t, actual)
58+
59+
godog.Format("Test_Format", "...", testFormatterFunc)
60+
actual = godog.FindFmt("Test_Format")
61+
62+
assert.NotNil(t, actual)
63+
}
64+
65+
func testFormatterFunc(suiteName string, out io.Writer) godog.Formatter {
66+
return nil
67+
}

‎formatter-tests/cucumber/scenario_outline

+15-15
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"name": "passing step",
4949
"line": 13,
5050
"match": {
51-
"location": "formatters_print_test.go:63"
51+
"location": "fmt_output_test.go:97"
5252
},
5353
"result": {
5454
"status": "passed",
@@ -60,7 +60,7 @@
6060
"name": "passing step",
6161
"line": 13,
6262
"match": {
63-
"location": "formatters_print_test.go:63"
63+
"location": "fmt_output_test.go:97"
6464
},
6565
"result": {
6666
"status": "passed",
@@ -72,7 +72,7 @@
7272
"name": "odd 1 and even 2 number",
7373
"line": 13,
7474
"match": {
75-
"location": "formatters_print_test.go:65"
75+
"location": "fmt_output_test.go:99"
7676
},
7777
"result": {
7878
"status": "passed",
@@ -112,7 +112,7 @@
112112
"name": "passing step",
113113
"line": 14,
114114
"match": {
115-
"location": "formatters_print_test.go:63"
115+
"location": "fmt_output_test.go:97"
116116
},
117117
"result": {
118118
"status": "passed",
@@ -124,7 +124,7 @@
124124
"name": "passing step",
125125
"line": 14,
126126
"match": {
127-
"location": "formatters_print_test.go:63"
127+
"location": "fmt_output_test.go:97"
128128
},
129129
"result": {
130130
"status": "passed",
@@ -136,7 +136,7 @@
136136
"name": "odd 2 and even 0 number",
137137
"line": 14,
138138
"match": {
139-
"location": "formatters_print_test.go:65"
139+
"location": "fmt_output_test.go:99"
140140
},
141141
"result": {
142142
"status": "failed",
@@ -177,7 +177,7 @@
177177
"name": "passing step",
178178
"line": 15,
179179
"match": {
180-
"location": "formatters_print_test.go:63"
180+
"location": "fmt_output_test.go:97"
181181
},
182182
"result": {
183183
"status": "passed",
@@ -189,7 +189,7 @@
189189
"name": "passing step",
190190
"line": 15,
191191
"match": {
192-
"location": "formatters_print_test.go:63"
192+
"location": "fmt_output_test.go:97"
193193
},
194194
"result": {
195195
"status": "passed",
@@ -201,7 +201,7 @@
201201
"name": "odd 3 and even 11 number",
202202
"line": 15,
203203
"match": {
204-
"location": "formatters_print_test.go:65"
204+
"location": "fmt_output_test.go:99"
205205
},
206206
"result": {
207207
"status": "failed",
@@ -242,7 +242,7 @@
242242
"name": "passing step",
243243
"line": 20,
244244
"match": {
245-
"location": "formatters_print_test.go:63"
245+
"location": "fmt_output_test.go:97"
246246
},
247247
"result": {
248248
"status": "passed",
@@ -254,7 +254,7 @@
254254
"name": "passing step",
255255
"line": 20,
256256
"match": {
257-
"location": "formatters_print_test.go:63"
257+
"location": "fmt_output_test.go:97"
258258
},
259259
"result": {
260260
"status": "passed",
@@ -266,7 +266,7 @@
266266
"name": "odd 1 and even 14 number",
267267
"line": 20,
268268
"match": {
269-
"location": "formatters_print_test.go:65"
269+
"location": "fmt_output_test.go:99"
270270
},
271271
"result": {
272272
"status": "passed",
@@ -306,7 +306,7 @@
306306
"name": "passing step",
307307
"line": 21,
308308
"match": {
309-
"location": "formatters_print_test.go:63"
309+
"location": "fmt_output_test.go:97"
310310
},
311311
"result": {
312312
"status": "passed",
@@ -318,7 +318,7 @@
318318
"name": "passing step",
319319
"line": 21,
320320
"match": {
321-
"location": "formatters_print_test.go:63"
321+
"location": "fmt_output_test.go:97"
322322
},
323323
"result": {
324324
"status": "passed",
@@ -330,7 +330,7 @@
330330
"name": "odd 3 and even 9 number",
331331
"line": 21,
332332
"match": {
333-
"location": "formatters_print_test.go:65"
333+
"location": "fmt_output_test.go:99"
334334
},
335335
"result": {
336336
"status": "failed",

‎formatter-tests/cucumber/scenario_with_background

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"name": "passing step",
2121
"line": 4,
2222
"match": {
23-
"location": "formatters_print_test.go:63"
23+
"location": "fmt_output_test.go:97"
2424
},
2525
"result": {
2626
"status": "passed",
@@ -32,7 +32,7 @@
3232
"name": "passing step",
3333
"line": 5,
3434
"match": {
35-
"location": "formatters_print_test.go:63"
35+
"location": "fmt_output_test.go:97"
3636
},
3737
"result": {
3838
"status": "passed",
@@ -44,7 +44,7 @@
4444
"name": "passing step",
4545
"line": 8,
4646
"match": {
47-
"location": "formatters_print_test.go:63"
47+
"location": "fmt_output_test.go:97"
4848
},
4949
"result": {
5050
"status": "passed",
@@ -56,7 +56,7 @@
5656
"name": "passing step",
5757
"line": 9,
5858
"match": {
59-
"location": "formatters_print_test.go:63"
59+
"location": "fmt_output_test.go:97"
6060
},
6161
"result": {
6262
"status": "passed",

‎formatter-tests/cucumber/single_scenario_with_passing_step

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"name": "a passing step",
2121
"line": 7,
2222
"match": {
23-
"location": "formatters_print_test.go:63"
23+
"location": "fmt_output_test.go:97"
2424
},
2525
"result": {
2626
"status": "passed",

‎formatter-tests/cucumber/some_scenarions_including_failing

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"name": "passing step",
2121
"line": 4,
2222
"match": {
23-
"location": "formatters_print_test.go:63"
23+
"location": "fmt_output_test.go:97"
2424
},
2525
"result": {
2626
"status": "passed",
@@ -32,7 +32,7 @@
3232
"name": "failing step",
3333
"line": 5,
3434
"match": {
35-
"location": "formatters_print_test.go:79"
35+
"location": "fmt_output_test.go:113"
3636
},
3737
"result": {
3838
"status": "failed",
@@ -45,7 +45,7 @@
4545
"name": "passing step",
4646
"line": 6,
4747
"match": {
48-
"location": "formatters_print_test.go:63"
48+
"location": "fmt_output_test.go:97"
4949
},
5050
"result": {
5151
"status": "skipped"
@@ -77,7 +77,7 @@
7777
"name": "passing step",
7878
"line": 10,
7979
"match": {
80-
"location": "formatters_print_test.go:63"
80+
"location": "fmt_output_test.go:97"
8181
},
8282
"result": {
8383
"status": "skipped"
@@ -109,7 +109,7 @@
109109
"name": "passing step",
110110
"line": 14,
111111
"match": {
112-
"location": "formatters_print_test.go:63"
112+
"location": "fmt_output_test.go:97"
113113
},
114114
"result": {
115115
"status": "skipped"

‎formatter-tests/cucumber/two_scenarios_with_background_fail

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"name": "passing step",
2121
"line": 4,
2222
"match": {
23-
"location": "formatters_print_test.go:63"
23+
"location": "fmt_output_test.go:97"
2424
},
2525
"result": {
2626
"status": "passed",
@@ -32,7 +32,7 @@
3232
"name": "failing step",
3333
"line": 5,
3434
"match": {
35-
"location": "formatters_print_test.go:79"
35+
"location": "fmt_output_test.go:113"
3636
},
3737
"result": {
3838
"status": "failed",
@@ -45,7 +45,7 @@
4545
"name": "passing step",
4646
"line": 8,
4747
"match": {
48-
"location": "formatters_print_test.go:63"
48+
"location": "fmt_output_test.go:97"
4949
},
5050
"result": {
5151
"status": "skipped"
@@ -56,7 +56,7 @@
5656
"name": "passing step",
5757
"line": 9,
5858
"match": {
59-
"location": "formatters_print_test.go:63"
59+
"location": "fmt_output_test.go:97"
6060
},
6161
"result": {
6262
"status": "skipped"
@@ -77,7 +77,7 @@
7777
"name": "passing step",
7878
"line": 4,
7979
"match": {
80-
"location": "formatters_print_test.go:63"
80+
"location": "fmt_output_test.go:97"
8181
},
8282
"result": {
8383
"status": "passed",
@@ -89,7 +89,7 @@
8989
"name": "failing step",
9090
"line": 5,
9191
"match": {
92-
"location": "formatters_print_test.go:79"
92+
"location": "fmt_output_test.go:113"
9393
},
9494
"result": {
9595
"status": "failed",
@@ -102,7 +102,7 @@
102102
"name": "passing step",
103103
"line": 12,
104104
"match": {
105-
"location": "formatters_print_test.go:63"
105+
"location": "fmt_output_test.go:97"
106106
},
107107
"result": {
108108
"status": "skipped"

‎formatter-tests/events/scenario_outline

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
{"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"}
22
{"event":"TestSource","location":"formatter-tests/features/scenario_outline.feature:2","source":"@outline @tag\nFeature: outline\n\n @scenario\n Scenario Outline: outline\n Given passing step\n When passing step\n Then odd \u003codd\u003e and even \u003ceven\u003e number\n\n @tagged\n Examples: tagged\n | odd | even |\n | 1 | 2 |\n | 2 | 0 |\n | 3 | 11 |\n\n @tag2\n Examples:\n | odd | even |\n | 1 | 14 |\n | 3 | 9 |\n"}
33
{"event":"TestCaseStarted","location":"formatter-tests/features/scenario_outline.feature:13","timestamp":-6795364578871}
4-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
4+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
55
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871}
66
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871,"status":"passed"}
7-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
7+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
88
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871}
99
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871,"status":"passed"}
10-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"formatters_print_test.go:65 -\u003e oddEvenStepDef","arguments":[[4,5],[5,15]]}
10+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"fmt_output_test.go:99 -\u003e github.com/cucumber/godog_test.oddEvenStepDef","arguments":[[4,5],[5,15]]}
1111
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871}
1212
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871,"status":"passed"}
1313
{"event":"TestCaseFinished","location":"formatter-tests/features/scenario_outline.feature:13","timestamp":-6795364578871,"status":"passed"}
1414
{"event":"TestCaseStarted","location":"formatter-tests/features/scenario_outline.feature:14","timestamp":-6795364578871}
15-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
15+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
1616
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871}
1717
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871,"status":"passed"}
18-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
18+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
1919
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871}
2020
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871,"status":"passed"}
21-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"formatters_print_test.go:65 -\u003e oddEvenStepDef","arguments":[[4,5],[5,15]]}
21+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"fmt_output_test.go:99 -\u003e github.com/cucumber/godog_test.oddEvenStepDef","arguments":[[4,5],[5,15]]}
2222
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871}
2323
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871,"status":"failed","summary":"2 is not odd"}
2424
{"event":"TestCaseFinished","location":"formatter-tests/features/scenario_outline.feature:14","timestamp":-6795364578871,"status":"failed"}
2525
{"event":"TestCaseStarted","location":"formatter-tests/features/scenario_outline.feature:15","timestamp":-6795364578871}
26-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
26+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
2727
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871}
2828
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871,"status":"passed"}
29-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
29+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
3030
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871}
3131
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871,"status":"passed"}
32-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"formatters_print_test.go:65 -\u003e oddEvenStepDef","arguments":[[4,5],[5,15]]}
32+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"fmt_output_test.go:99 -\u003e github.com/cucumber/godog_test.oddEvenStepDef","arguments":[[4,5],[5,15]]}
3333
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871}
3434
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871,"status":"failed","summary":"11 is not even"}
3535
{"event":"TestCaseFinished","location":"formatter-tests/features/scenario_outline.feature:15","timestamp":-6795364578871,"status":"failed"}
3636
{"event":"TestCaseStarted","location":"formatter-tests/features/scenario_outline.feature:20","timestamp":-6795364578871}
37-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
37+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
3838
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871}
3939
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871,"status":"passed"}
40-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
40+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
4141
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871}
4242
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871,"status":"passed"}
43-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"formatters_print_test.go:65 -\u003e oddEvenStepDef","arguments":[[4,5],[5,15]]}
43+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"fmt_output_test.go:99 -\u003e github.com/cucumber/godog_test.oddEvenStepDef","arguments":[[4,5],[5,15]]}
4444
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871}
4545
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871,"status":"passed"}
4646
{"event":"TestCaseFinished","location":"formatter-tests/features/scenario_outline.feature:20","timestamp":-6795364578871,"status":"passed"}
4747
{"event":"TestCaseStarted","location":"formatter-tests/features/scenario_outline.feature:21","timestamp":-6795364578871}
48-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
48+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:6","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
4949
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871}
5050
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:6","timestamp":-6795364578871,"status":"passed"}
51-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
51+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:7","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
5252
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871}
5353
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:7","timestamp":-6795364578871,"status":"passed"}
54-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"formatters_print_test.go:65 -\u003e oddEvenStepDef","arguments":[[4,5],[5,15]]}
54+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_outline.feature:8","definition_id":"fmt_output_test.go:99 -\u003e github.com/cucumber/godog_test.oddEvenStepDef","arguments":[[4,5],[5,15]]}
5555
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871}
5656
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_outline.feature:8","timestamp":-6795364578871,"status":"failed","summary":"9 is not even"}
5757
{"event":"TestCaseFinished","location":"formatter-tests/features/scenario_outline.feature:21","timestamp":-6795364578871,"status":"failed"}

‎formatter-tests/events/scenario_with_background

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"}
22
{"event":"TestSource","location":"formatter-tests/features/scenario_with_background.feature:1","source":"Feature: single scenario with background\n\n Background: named\n Given passing step\n And passing step\n\n Scenario: scenario\n When passing step\n Then passing step\n"}
33
{"event":"TestCaseStarted","location":"formatter-tests/features/scenario_with_background.feature:7","timestamp":-6795364578871}
4-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_with_background.feature:4","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
4+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_with_background.feature:4","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
55
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_with_background.feature:4","timestamp":-6795364578871}
66
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_with_background.feature:4","timestamp":-6795364578871,"status":"passed"}
7-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_with_background.feature:5","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
7+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_with_background.feature:5","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
88
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_with_background.feature:5","timestamp":-6795364578871}
99
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_with_background.feature:5","timestamp":-6795364578871,"status":"passed"}
10-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_with_background.feature:8","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
10+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_with_background.feature:8","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
1111
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_with_background.feature:8","timestamp":-6795364578871}
1212
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_with_background.feature:8","timestamp":-6795364578871,"status":"passed"}
13-
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_with_background.feature:9","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
13+
{"event":"StepDefinitionFound","location":"formatter-tests/features/scenario_with_background.feature:9","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
1414
{"event":"TestStepStarted","location":"formatter-tests/features/scenario_with_background.feature:9","timestamp":-6795364578871}
1515
{"event":"TestStepFinished","location":"formatter-tests/features/scenario_with_background.feature:9","timestamp":-6795364578871,"status":"passed"}
1616
{"event":"TestCaseFinished","location":"formatter-tests/features/scenario_with_background.feature:7","timestamp":-6795364578871,"status":"passed"}

‎formatter-tests/events/single_scenario_with_passing_step

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"}
22
{"event":"TestSource","location":"formatter-tests/features/single_scenario_with_passing_step.feature:1","source":"Feature: single passing scenario\n describes\n a single scenario\n feature\n\n Scenario: one step passing\n Given a passing step\n"}
33
{"event":"TestCaseStarted","location":"formatter-tests/features/single_scenario_with_passing_step.feature:6","timestamp":-6795364578871}
4-
{"event":"StepDefinitionFound","location":"formatter-tests/features/single_scenario_with_passing_step.feature:7","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
4+
{"event":"StepDefinitionFound","location":"formatter-tests/features/single_scenario_with_passing_step.feature:7","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
55
{"event":"TestStepStarted","location":"formatter-tests/features/single_scenario_with_passing_step.feature:7","timestamp":-6795364578871}
66
{"event":"TestStepFinished","location":"formatter-tests/features/single_scenario_with_passing_step.feature:7","timestamp":-6795364578871,"status":"passed"}
77
{"event":"TestCaseFinished","location":"formatter-tests/features/single_scenario_with_passing_step.feature:6","timestamp":-6795364578871,"status":"passed"}

‎formatter-tests/events/some_scenarions_including_failing

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"}
22
{"event":"TestSource","location":"formatter-tests/features/some_scenarions_including_failing.feature:1","source":"Feature: some scenarios\n\n Scenario: failing\n Given passing step\n When failing step\n Then passing step\n\n Scenario: pending\n When pending step\n Then passing step\n\n Scenario: undefined\n When undefined\n Then passing step\n"}
33
{"event":"TestCaseStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:3","timestamp":-6795364578871}
4-
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:4","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
4+
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:4","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
55
{"event":"TestStepStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:4","timestamp":-6795364578871}
66
{"event":"TestStepFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:4","timestamp":-6795364578871,"status":"passed"}
7-
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:5","definition_id":"formatters_print_test.go:79 -\u003e failingStepDef","arguments":[]}
7+
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:5","definition_id":"fmt_output_test.go:113 -\u003e github.com/cucumber/godog_test.failingStepDef","arguments":[]}
88
{"event":"TestStepStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:5","timestamp":-6795364578871}
99
{"event":"TestStepFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:5","timestamp":-6795364578871,"status":"failed","summary":"step failed"}
10-
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:6","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
10+
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:6","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
1111
{"event":"TestStepStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:6","timestamp":-6795364578871}
1212
{"event":"TestStepFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:6","timestamp":-6795364578871,"status":"skipped"}
1313
{"event":"TestCaseFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:3","timestamp":-6795364578871,"status":"failed"}
1414
{"event":"TestCaseStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:8","timestamp":-6795364578871}
15-
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:9","definition_id":"formatters_print_test.go:77 -\u003e pendingStepDef","arguments":[]}
15+
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:9","definition_id":"fmt_output_test.go:111 -\u003e github.com/cucumber/godog_test.pendingStepDef","arguments":[]}
1616
{"event":"TestStepStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:9","timestamp":-6795364578871}
1717
{"event":"TestStepFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:9","timestamp":-6795364578871,"status":"pending"}
18-
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:10","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
18+
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:10","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
1919
{"event":"TestStepStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:10","timestamp":-6795364578871}
2020
{"event":"TestStepFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:10","timestamp":-6795364578871,"status":"skipped"}
2121
{"event":"TestCaseFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:8","timestamp":-6795364578871,"status":"pending"}
2222
{"event":"TestCaseStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:12","timestamp":-6795364578871}
2323
{"event":"TestStepStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:13","timestamp":-6795364578871}
2424
{"event":"TestStepFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:13","timestamp":-6795364578871,"status":"undefined"}
25-
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:14","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
25+
{"event":"StepDefinitionFound","location":"formatter-tests/features/some_scenarions_including_failing.feature:14","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
2626
{"event":"TestStepStarted","location":"formatter-tests/features/some_scenarions_including_failing.feature:14","timestamp":-6795364578871}
2727
{"event":"TestStepFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:14","timestamp":-6795364578871,"status":"skipped"}
2828
{"event":"TestCaseFinished","location":"formatter-tests/features/some_scenarions_including_failing.feature:12","timestamp":-6795364578871,"status":"undefined"}

‎formatter-tests/events/two_scenarios_with_background_fail

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{"event":"TestRunStarted","version":"0.1.0","timestamp":-6795364578871,"suite":"events"}
22
{"event":"TestSource","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:1","source":"Feature: two scenarios with background fail\n\n Background:\n Given passing step\n And failing step\n\n Scenario: one\n When passing step\n Then passing step\n\n Scenario: two\n Then passing step\n"}
33
{"event":"TestCaseStarted","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:7","timestamp":-6795364578871}
4-
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:4","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
4+
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:4","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
55
{"event":"TestStepStarted","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:4","timestamp":-6795364578871}
66
{"event":"TestStepFinished","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:4","timestamp":-6795364578871,"status":"passed"}
7-
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:5","definition_id":"formatters_print_test.go:79 -\u003e failingStepDef","arguments":[]}
7+
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:5","definition_id":"fmt_output_test.go:113 -\u003e github.com/cucumber/godog_test.failingStepDef","arguments":[]}
88
{"event":"TestStepStarted","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:5","timestamp":-6795364578871}
99
{"event":"TestStepFinished","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:5","timestamp":-6795364578871,"status":"failed","summary":"step failed"}
10-
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:8","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
10+
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:8","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
1111
{"event":"TestStepStarted","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:8","timestamp":-6795364578871}
1212
{"event":"TestStepFinished","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:8","timestamp":-6795364578871,"status":"skipped"}
13-
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:9","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
13+
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:9","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
1414
{"event":"TestStepStarted","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:9","timestamp":-6795364578871}
1515
{"event":"TestStepFinished","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:9","timestamp":-6795364578871,"status":"skipped"}
1616
{"event":"TestCaseFinished","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:7","timestamp":-6795364578871,"status":"failed"}
1717
{"event":"TestCaseStarted","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:11","timestamp":-6795364578871}
18-
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:4","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
18+
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:4","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
1919
{"event":"TestStepStarted","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:4","timestamp":-6795364578871}
2020
{"event":"TestStepFinished","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:4","timestamp":-6795364578871,"status":"passed"}
21-
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:5","definition_id":"formatters_print_test.go:79 -\u003e failingStepDef","arguments":[]}
21+
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:5","definition_id":"fmt_output_test.go:113 -\u003e github.com/cucumber/godog_test.failingStepDef","arguments":[]}
2222
{"event":"TestStepStarted","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:5","timestamp":-6795364578871}
2323
{"event":"TestStepFinished","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:5","timestamp":-6795364578871,"status":"failed","summary":"step failed"}
24-
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:12","definition_id":"formatters_print_test.go:63 -\u003e passingStepDef","arguments":[]}
24+
{"event":"StepDefinitionFound","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:12","definition_id":"fmt_output_test.go:97 -\u003e github.com/cucumber/godog_test.passingStepDef","arguments":[]}
2525
{"event":"TestStepStarted","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:12","timestamp":-6795364578871}
2626
{"event":"TestStepFinished","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:12","timestamp":-6795364578871,"status":"skipped"}
2727
{"event":"TestCaseFinished","location":"formatter-tests/features/two_scenarios_with_background_fail.feature:11","timestamp":-6795364578871,"status":"failed"}

‎formatter-tests/pretty/scenario_outline

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<bold-white>Feature:</bold-white> outline
22

33
<bold-white>Scenario Outline:</bold-white> outline <bold-black># formatter-tests/features/scenario_outline.feature:5</bold-black>
4-
<cyan>Given</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
5-
<cyan>When</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
6-
<cyan>Then</cyan> <cyan>odd </cyan><bold-cyan><odd></bold-cyan><cyan> and even </cyan><bold-cyan><even></bold-cyan><cyan> number</cyan> <bold-black># formatters_print_test.go:65 -> oddEvenStepDef</bold-black>
4+
<cyan>Given</cyan> <cyan>passing step</cyan> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
5+
<cyan>When</cyan> <cyan>passing step</cyan> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
6+
<cyan>Then</cyan> <cyan>odd </cyan><bold-cyan><odd></bold-cyan><cyan> and even </cyan><bold-cyan><even></bold-cyan><cyan> number</cyan> <bold-black># fmt_output_test.go:99 -> github.com/cucumber/godog_test.oddEvenStepDef</bold-black>
77

88
<bold-white>Examples:</bold-white> tagged
99
| <cyan>odd</cyan> | <cyan>even</cyan> |

‎formatter-tests/pretty/scenario_with_background

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<bold-white>Feature:</bold-white> single scenario with background
22

33
<bold-white>Background:</bold-white> named
4-
<green>Given</green> <green>passing step</green> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
5-
<green>And</green> <green>passing step</green> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
4+
<green>Given</green> <green>passing step</green> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
5+
<green>And</green> <green>passing step</green> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
66

77
<bold-white>Scenario:</bold-white> scenario <bold-black># formatter-tests/features/scenario_with_background.feature:7</bold-black>
8-
<green>When</green> <green>passing step</green> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
9-
<green>Then</green> <green>passing step</green> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
8+
<green>When</green> <green>passing step</green> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
9+
<green>Then</green> <green>passing step</green> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
1010

1111
1 scenarios (<green>1 passed</green>)
1212
4 steps (<green>4 passed</green>)

‎formatter-tests/pretty/single_scenario_with_passing_step

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
feature
55

66
<bold-white>Scenario:</bold-white> one step passing <bold-black># formatter-tests/features/single_scenario_with_passing_step.feature:6</bold-black>
7-
<green>Given</green> <green>a passing step</green> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
7+
<green>Given</green> <green>a passing step</green> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
88

99
1 scenarios (<green>1 passed</green>)
1010
1 steps (<green>1 passed</green>)

‎formatter-tests/pretty/some_scenarions_including_failing

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<bold-white>Feature:</bold-white> some scenarios
22

33
<bold-white>Scenario:</bold-white> failing <bold-black># formatter-tests/features/some_scenarions_including_failing.feature:3</bold-black>
4-
<green>Given</green> <green>passing step</green> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
5-
<red>When</red> <red>failing step</red> <bold-black># formatters_print_test.go:79 -> failingStepDef</bold-black>
4+
<green>Given</green> <green>passing step</green> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
5+
<red>When</red> <red>failing step</red> <bold-black># fmt_output_test.go:113 -> github.com/cucumber/godog_test.failingStepDef</bold-black>
66
<bold-red>step failed</bold-red>
7-
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
7+
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
88

99
<bold-white>Scenario:</bold-white> pending <bold-black># formatter-tests/features/some_scenarions_including_failing.feature:8</bold-black>
10-
<yellow>When</yellow> <yellow>pending step</yellow> <bold-black># formatters_print_test.go:77 -> pendingStepDef</bold-black>
10+
<yellow>When</yellow> <yellow>pending step</yellow> <bold-black># fmt_output_test.go:111 -> github.com/cucumber/godog_test.pendingStepDef</bold-black>
1111
<yellow>TODO: write pending definition</yellow>
12-
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
12+
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
1313

1414
<bold-white>Scenario:</bold-white> undefined <bold-black># formatter-tests/features/some_scenarions_including_failing.feature:12</bold-black>
1515
<yellow>When</yellow> <yellow>undefined</yellow>
16-
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
16+
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
1717

1818
--- <red>Failed steps:</red>
1919

‎formatter-tests/pretty/two_scenarios_with_background_fail

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<bold-white>Feature:</bold-white> two scenarios with background fail
22

33
<bold-white>Background:</bold-white>
4-
<green>Given</green> <green>passing step</green> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
5-
<red>And</red> <red>failing step</red> <bold-black># formatters_print_test.go:79 -> failingStepDef</bold-black>
4+
<green>Given</green> <green>passing step</green> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
5+
<red>And</red> <red>failing step</red> <bold-black># fmt_output_test.go:113 -> github.com/cucumber/godog_test.failingStepDef</bold-black>
66
<bold-red>step failed</bold-red>
77

88
<bold-white>Scenario:</bold-white> one <bold-black># formatter-tests/features/two_scenarios_with_background_fail.feature:7</bold-black>
9-
<cyan>When</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
10-
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
9+
<cyan>When</cyan> <cyan>passing step</cyan> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
10+
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
1111

1212
<bold-white>Scenario:</bold-white> two <bold-black># formatter-tests/features/two_scenarios_with_background_fail.feature:11</bold-black>
13-
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># formatters_print_test.go:63 -> passingStepDef</bold-black>
13+
<cyan>Then</cyan> <cyan>passing step</cyan> <bold-black># fmt_output_test.go:97 -> github.com/cucumber/godog_test.passingStepDef</bold-black>
1414

1515
--- <red>Failed steps:</red>
1616

‎formatters_print_test.go

-79
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.