diff --git a/features/formatter/events.feature b/features/formatter/events.feature index 2947fa9..0cb1876 100644 --- a/features/formatter/events.feature +++ b/features/formatter/events.feature @@ -14,7 +14,7 @@ Feature: event stream formatter """ Scenario: should process simple scenario - Given a feature path "features/load.feature:24" + Given a feature path "features/load.feature:25" When I run feature suite with formatter "events" Then the following events should be fired: """ @@ -35,7 +35,7 @@ Feature: event stream formatter """ Scenario: should process outline scenario - Given a feature path "features/load.feature:32" + Given a feature path "features/load.feature:33" When I run feature suite with formatter "events" Then the following events should be fired: """ diff --git a/features/formatter/pretty.feature b/features/formatter/pretty.feature new file mode 100644 index 0000000..8fde85f --- /dev/null +++ b/features/formatter/pretty.feature @@ -0,0 +1,288 @@ +Feature: pretty formatter + In order to support tools that import pretty output + I need to be able to support pretty formatted output + + Scenario: Support of Feature Plus Scenario Node + Given a feature "features/simple.feature" file: + """ + Feature: simple feature + simple feature description + Scenario: simple scenario + simple scenario description + """ + When I run feature suite with formatter "pretty" + Then the rendered output will be as follows: + """ + Feature: simple feature + simple feature description + + Scenario: simple scenario # features/simple.feature:3 + + 1 scenarios (1 undefined) + No steps + 0s + """ + + Scenario: Support of Feature Plus Scenario Node With Tags + Given a feature "features/simple.feature" file: + """ + @TAG1 + Feature: simple feature + simple feature description + @TAG2 @TAG3 + Scenario: simple scenario + simple scenario description + """ + When I run feature suite with formatter "pretty" + Then the rendered output will be as follows: + """ + Feature: simple feature + simple feature description + + Scenario: simple scenario # features/simple.feature:5 + + 1 scenarios (1 undefined) + No steps + 0s + """ + Scenario: Support of Feature Plus Scenario Outline + Given a feature "features/simple.feature" file: + """ + Feature: simple feature + simple feature description + + Scenario Outline: simple scenario + simple scenario description + + Examples: simple examples + | status | + | pass | + | fail | + """ + When I run feature suite with formatter "pretty" + Then the rendered output will be as follows: + """ + Feature: simple feature + simple feature description + + Scenario Outline: simple scenario # features/simple.feature:4 + + Examples: simple examples + | status | + | pass | + | fail | + + 2 scenarios (2 undefined) + No steps + 0s + """ + + Scenario: Support of Feature Plus Scenario Outline With Tags + Given a feature "features/simple.feature" file: + """ + @TAG1 + Feature: simple feature + simple feature description + + @TAG2 + Scenario Outline: simple scenario + simple scenario description + + @TAG3 + Examples: simple examples + | status | + | pass | + | fail | + """ + When I run feature suite with formatter "pretty" + Then the rendered output will be as follows: + """ + Feature: simple feature + simple feature description + + Scenario Outline: simple scenario # features/simple.feature:6 + + Examples: simple examples + | status | + | pass | + | fail | + + 2 scenarios (2 undefined) + No steps + 0s + """ + Scenario: Support of Feature Plus Scenario With Steps + Given a feature "features/simple.feature" file: + """ + Feature: simple feature + simple feature description + + Scenario: simple scenario + simple scenario description + + Given passing step + Then a failing step + + """ + When I run feature suite with formatter "pretty" + Then the rendered output will be as follows: + """ + Feature: simple feature + simple feature description + + Scenario: simple scenario # features/simple.feature:4 + Given passing step # suite_context.go:72 -> github.com/cucumber/godog.SuiteContext.func2 + Then a failing step # suite_context.go:318 -> *suiteContext + intentional failure + + --- Failed steps: + + Scenario: simple scenario # features/simple.feature:4 + Then a failing step # features/simple.feature:8 + Error: intentional failure + + + 1 scenarios (1 failed) + 2 steps (1 passed, 1 failed) + 0s + """ + Scenario: Support of Feature Plus Scenario Outline With Steps + Given a feature "features/simple.feature" file: + """ + Feature: simple feature + simple feature description + + Scenario Outline: simple scenario + simple scenario description + + Given 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 + simple feature description + + Scenario Outline: simple scenario # features/simple.feature:4 + Given step # suite_context.go:72 -> github.com/cucumber/godog.SuiteContext.func2 + + Examples: simple examples + | status | + | passing | + | failing | + intentional failure + + --- Failed steps: + + Scenario Outline: simple scenario # features/simple.feature:4 + Given failing step # features/simple.feature:7 + Error: intentional failure + + + 2 scenarios (1 passed, 1 failed) + 2 steps (1 passed, 1 failed) + 0s + """ + + # Currently godog only supports comments on Feature and not + # scenario and steps. + Scenario: Support of Comments + Given a feature "features/simple.feature" file: + """ + #Feature comment + Feature: simple feature + simple description + + Scenario: simple scenario + simple feature description + """ + When I run feature suite with formatter "pretty" + Then the rendered output will be as follows: + """ + Feature: simple feature + simple description + + Scenario: simple scenario # features/simple.feature:5 + + 1 scenarios (1 undefined) + No steps + 0s + """ + Scenario: Support of Docstrings + Given a feature "features/simple.feature" file: + """ + Feature: simple feature + simple description + + Scenario: simple scenario + simple feature description + + Given passing step + \"\"\" content type + step doc string + \"\"\" + """ + When I run feature suite with formatter "pretty" + Then the rendered output will be as follows: + """ + Feature: simple feature + simple description + + Scenario: simple scenario # features/simple.feature:4 + Given passing step # suite_context.go:72 -> github.com/cucumber/godog.SuiteContext.func2 + \"\"\" content type + step doc string + \"\"\" + + 1 scenarios (1 passed) + 1 steps (1 passed) + 0s + """ + Scenario: Support of Undefined, Pending and Skipped status + Given a feature "features/simple.feature" file: + """ + Feature: simple feature + simple feature description + + Scenario: simple scenario + simple scenario description + + Given passing step + And pending step + And undefined + And passing step + + """ + When I run feature suite with formatter "pretty" + Then the rendered output will be as follows: + """ + Feature: simple feature + simple feature description + + Scenario: simple scenario # features/simple.feature:4 + Given passing step # suite_context.go:72 -> github.com/cucumber/godog.SuiteContext.func2 + And pending step # suite_context.go:69 -> github.com/cucumber/godog.SuiteContext.func1 + TODO: write pending definition + And undefined + And passing step # suite_context.go:72 -> github.com/cucumber/godog.SuiteContext.func2 + + 1 scenarios (1 pending, 1 undefined) + 4 steps (1 passed, 1 pending, 1 undefined, 1 skipped) + 0s + + You can implement step definitions for undefined steps with these snippets: + + func undefined() error { + return godog.ErrPending + } + + func FeatureContext(s *godog.Suite) { + s.Step(`^undefined$`, undefined) + } + """ diff --git a/features/lang.feature b/features/lang.feature index 08b1083..4081189 100644 --- a/features/lang.feature +++ b/features/lang.feature @@ -8,12 +8,13 @@ Savybė: užkrauti savybes Scenarijus: savybių užkrovimas iš aplanko Duota savybių aplankas "features" Kai aš išskaitau savybes - Tada aš turėčiau turėti 11 savybių failus: + Tada aš turėčiau turėti 12 savybių failus: """ features/background.feature features/events.feature features/formatter/cucumber.feature features/formatter/events.feature + features/formatter/pretty.feature features/lang.feature features/load.feature features/multistep.feature diff --git a/features/load.feature b/features/load.feature index 16afd50..f4fb1e2 100644 --- a/features/load.feature +++ b/features/load.feature @@ -6,12 +6,13 @@ Feature: load features Scenario: load features within path Given a feature path "features" When I parse features - Then I should have 11 feature files: + Then I should have 12 feature files: """ features/background.feature features/events.feature features/formatter/cucumber.feature features/formatter/events.feature + features/formatter/pretty.feature features/lang.feature features/load.feature features/multistep.feature diff --git a/fixtures/cucumber_output.json b/fixtures/cucumber_output.json index 05a74f4..8a8ba16 100644 --- a/fixtures/cucumber_output.json +++ b/fixtures/cucumber_output.json @@ -25,7 +25,7 @@ "line": 8 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -37,7 +37,7 @@ "name": "I run feature suite", "line": 18, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -49,7 +49,7 @@ "name": "the suite should have passed", "line": 19, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -66,7 +66,7 @@ "line": 21 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -93,7 +93,7 @@ "line": 29 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -105,7 +105,7 @@ "name": "I run feature suite", "line": 40, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -117,7 +117,7 @@ "name": "the suite should have failed", "line": 41, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -134,7 +134,7 @@ "line": 43 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -151,7 +151,7 @@ "line": 47 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -178,7 +178,7 @@ "line": 55 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -190,7 +190,7 @@ "name": "I run feature suite", "line": 65, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -202,7 +202,7 @@ "name": "the suite should have passed", "line": 66, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -219,7 +219,7 @@ "line": 68 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -236,7 +236,7 @@ "line": 73 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -268,7 +268,7 @@ "name": "I'm listening to suite events", "line": 7, "match": { - "location": "suite_context.go:285" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -280,7 +280,7 @@ "name": "a feature path \"features/load.feature:6\"", "line": 10, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -292,7 +292,7 @@ "name": "I run feature suite", "line": 11, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -304,7 +304,7 @@ "name": "there was event triggered before scenario \"load features within path\"", "line": 12, "match": { - "location": "suite_context.go:414" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -326,7 +326,7 @@ "name": "I'm listening to suite events", "line": 7, "match": { - "location": "suite_context.go:285" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -338,7 +338,7 @@ "name": "a feature path \"features/load.feature:6\"", "line": 15, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -350,7 +350,7 @@ "name": "I run feature suite", "line": 16, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -362,7 +362,7 @@ "name": "these events had to be fired for a number of times:", "line": 17, "match": { - "location": "suite_context.go:442" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -434,7 +434,7 @@ "name": "I'm listening to suite events", "line": 7, "match": { - "location": "suite_context.go:285" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -446,7 +446,7 @@ "name": "a feature path \"features/load.feature\"", "line": 28, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -458,7 +458,7 @@ "name": "I run feature suite", "line": 29, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -470,7 +470,7 @@ "name": "these events had to be fired for a number of times:", "line": 30, "match": { - "location": "suite_context.go:442" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -542,7 +542,7 @@ "name": "I'm listening to suite events", "line": 7, "match": { - "location": "suite_context.go:285" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -554,7 +554,7 @@ "name": "a feature path \"features/load.feature:6\"", "line": 41, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -566,7 +566,7 @@ "name": "a feature path \"features/multistep.feature:6\"", "line": 42, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -578,7 +578,7 @@ "name": "I run feature suite", "line": 43, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -590,7 +590,7 @@ "name": "these events had to be fired for a number of times:", "line": 44, "match": { - "location": "suite_context.go:442" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -662,7 +662,7 @@ "name": "I'm listening to suite events", "line": 7, "match": { - "location": "suite_context.go:285" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -679,7 +679,7 @@ "line": 56 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -691,7 +691,7 @@ "name": "I run feature suite", "line": 63, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -703,7 +703,7 @@ "name": "these events had to be fired for a number of times:", "line": 64, "match": { - "location": "suite_context.go:442" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -775,7 +775,7 @@ "name": "I'm listening to suite events", "line": 7, "match": { - "location": "suite_context.go:285" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -792,7 +792,7 @@ "line": 76 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -804,7 +804,7 @@ "name": "I run feature suite", "line": 91, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -816,7 +816,7 @@ "name": "these events had to be fired for a number of times:", "line": 92, "match": { - "location": "suite_context.go:442" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -913,7 +913,7 @@ "line": 7 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -925,7 +925,7 @@ "name": "I run feature suite with formatter \"cucumber\"", "line": 13, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -942,7 +942,7 @@ "line": 15 }, "match": { - "location": "suite_context.go:459" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -969,7 +969,7 @@ "line": 40 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -981,7 +981,7 @@ "name": "I run feature suite with formatter \"cucumber\"", "line": 48, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -998,7 +998,7 @@ "line": 50 }, "match": { - "location": "suite_context.go:459" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1025,7 +1025,7 @@ "line": 94 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1037,7 +1037,7 @@ "name": "I run feature suite with formatter \"cucumber\"", "line": 106, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1054,7 +1054,7 @@ "line": 108 }, "match": { - "location": "suite_context.go:459" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1081,7 +1081,7 @@ "line": 141 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1093,7 +1093,7 @@ "name": "I run feature suite with formatter \"cucumber\"", "line": 156, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1110,7 +1110,7 @@ "line": 158 }, "match": { - "location": "suite_context.go:459" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1137,7 +1137,7 @@ "line": 224 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1149,7 +1149,7 @@ "name": "I run feature suite with formatter \"cucumber\"", "line": 235, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1161,12 +1161,12 @@ "name": "the rendered json will be as follows:", "line": 236, "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 4,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 7,\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n },\n {\n \"keyword\": \"Then \",\n \"name\": \"a failing step\",\n \"line\": 8,\n \"match\": {\n \"location\": \"suite_context.go:47\"\n },\n \"result\": {\n \"status\": \"failed\",\n \"error_message\": \"intentional failure\",\n \"duration\": 0\n }\n }\n ]\n }\n ]\n }\n ]", + "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 4,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 7,\n \"match\": {\n \"location\": \"suite_context.go:0\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n },\n {\n \"keyword\": \"Then \",\n \"name\": \"a failing step\",\n \"line\": 8,\n \"match\": {\n \"location\": \"suite_context.go:0\"\n },\n \"result\": {\n \"status\": \"failed\",\n \"error_message\": \"intentional failure\",\n \"duration\": 0\n }\n }\n ]\n }\n ]\n }\n ]", "content_type": "", "line": 237 }, "match": { - "location": "suite_context.go:459" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1193,7 +1193,7 @@ "line": 288 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1205,7 +1205,7 @@ "name": "I run feature suite with formatter \"cucumber\"", "line": 303, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1217,12 +1217,12 @@ "name": "the rendered json will be as follows:", "line": 304, "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;2\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 11,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 11,\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n }\n ]\n },\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;3\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 12,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"failing step\",\n \"line\": 12,\n \"match\": {\n \"location\": \"suite_context.go:47\"\n },\n \"result\": {\n \"status\": \"failed\",\n \"error_message\": \"intentional failure\",\n \"duration\": 0\n }\n }\n ]\n }\n ]\n }\n ]", + "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;2\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 11,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 11,\n \"match\": {\n \"location\": \"suite_context.go:0\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n }\n ]\n },\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;3\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 12,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"failing step\",\n \"line\": 12,\n \"match\": {\n \"location\": \"suite_context.go:0\"\n },\n \"result\": {\n \"status\": \"failed\",\n \"error_message\": \"intentional failure\",\n \"duration\": 0\n }\n }\n ]\n }\n ]\n }\n ]", "content_type": "", "line": 305 }, "match": { - "location": "suite_context.go:459" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1249,7 +1249,7 @@ "line": 369 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1261,7 +1261,7 @@ "name": "I run feature suite with formatter \"cucumber\"", "line": 377, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1278,7 +1278,7 @@ "line": 379 }, "match": { - "location": "suite_context.go:459" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1305,7 +1305,7 @@ "line": 409 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1317,7 +1317,7 @@ "name": "I run feature suite with formatter \"cucumber\"", "line": 421, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1329,12 +1329,12 @@ "name": "the rendered json will be as follows:", "line": 422, "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple feature description\",\n \"line\": 4,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 7,\n \"doc_string\": {\n \"value\": \"step doc string\",\n \"content_type\": \"content type\",\n \"line\": 8\n },\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n }\n ]\n }\n ]\n }\n]", + "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple feature description\",\n \"line\": 4,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 7,\n \"doc_string\": {\n \"value\": \"step doc string\",\n \"content_type\": \"content type\",\n \"line\": 8\n },\n \"match\": {\n \"location\": \"suite_context.go:0\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n }\n ]\n }\n ]\n }\n]", "content_type": "", "line": 423 }, "match": { - "location": "suite_context.go:459" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1361,7 +1361,7 @@ "line": 466 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1373,7 +1373,7 @@ "name": "I run feature suite with formatter \"cucumber\"", "line": 479, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1385,12 +1385,12 @@ "name": "the rendered json will be as follows:", "line": 480, "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 4,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 7,\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n },\n {\n \"keyword\": \"And \",\n \"name\": \"pending step\",\n \"line\": 8,\n \"match\": {\n \"location\": \"features/simple.feature:8\"\n },\n \"result\": {\n \"status\": \"pending\"\n }\n },\n {\n \"keyword\": \"And \",\n \"name\": \"undefined\",\n \"line\": 9,\n \"match\": {\n \"location\": \"features/simple.feature:9\"\n },\n \"result\": {\n \"status\": \"undefined\"\n }\n },\n {\n \"keyword\": \"And \",\n \"name\": \"passing step\",\n \"line\": 10,\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"skipped\"\n }\n }\n ]\n }\n ]\n }\n ]", + "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 4,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 7,\n \"match\": {\n \"location\": \"suite_context.go:0\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n },\n {\n \"keyword\": \"And \",\n \"name\": \"pending step\",\n \"line\": 8,\n \"match\": {\n \"location\": \"features/simple.feature:8\"\n },\n \"result\": {\n \"status\": \"pending\"\n }\n },\n {\n \"keyword\": \"And \",\n \"name\": \"undefined\",\n \"line\": 9,\n \"match\": {\n \"location\": \"features/simple.feature:9\"\n },\n \"result\": {\n \"status\": \"undefined\"\n }\n },\n {\n \"keyword\": \"And \",\n \"name\": \"passing step\",\n \"line\": 10,\n \"match\": {\n \"location\": \"suite_context.go:0\"\n },\n \"result\": {\n \"status\": \"skipped\"\n }\n }\n ]\n }\n ]\n }\n ]", "content_type": "", "line": 481 }, "match": { - "location": "suite_context.go:459" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1422,7 +1422,7 @@ "name": "a feature path \"features/load.feature:4\"", "line": 7, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1434,7 +1434,7 @@ "name": "I run feature suite with formatter \"events\"", "line": 8, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1451,7 +1451,7 @@ "line": 10 }, "match": { - "location": "suite_context.go:145" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1470,10 +1470,10 @@ "steps": [ { "keyword": "Given ", - "name": "a feature path \"features/load.feature:24\"", + "name": "a feature path \"features/load.feature:25\"", "line": 17, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1485,7 +1485,7 @@ "name": "I run feature suite with formatter \"events\"", "line": 18, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1502,7 +1502,7 @@ "line": 20 }, "match": { - "location": "suite_context.go:145" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1521,10 +1521,10 @@ "steps": [ { "keyword": "Given ", - "name": "a feature path \"features/load.feature:32\"", + "name": "a feature path \"features/load.feature:33\"", "line": 38, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1536,7 +1536,7 @@ "name": "I run feature suite with formatter \"events\"", "line": 39, "match": { - "location": "suite_context.go:131" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1553,7 +1553,531 @@ "line": 41 }, "match": { - "location": "suite_context.go:145" + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] + } + ] + }, + { + "uri": "features/formatter/pretty.feature", + "id": "pretty-formatter", + "keyword": "Feature", + "name": "pretty formatter", + "description": " In order to support tools that import pretty output\n I need to be able to support pretty formatted output", + "line": 1, + "comments": [ + { + "value": "# Currently godog only supports comments on Feature and not", + "line": 193 + }, + { + "value": "# scenario and steps.", + "line": 194 + } + ], + "elements": [ + { + "id": "pretty-formatter;support-of-feature-plus-scenario-node", + "keyword": "Scenario", + "name": "Support of Feature Plus Scenario Node", + "description": "", + "line": 5, + "type": "scenario", + "steps": [ + { + "keyword": "Given ", + "name": "a feature \"features/simple.feature\" file:", + "line": 6, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n Scenario: simple scenario\n simple scenario description", + "content_type": "", + "line": 7 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "When ", + "name": "I run feature suite with formatter \"pretty\"", + "line": 13, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the rendered output will be as follows:", + "line": 14, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario: simple scenario # features/simple.feature:3\n\n 1 scenarios (1 undefined)\n No steps\n 0s", + "content_type": "", + "line": 15 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] + }, + { + "id": "pretty-formatter;support-of-feature-plus-scenario-node-with-tags", + "keyword": "Scenario", + "name": "Support of Feature Plus Scenario Node With Tags", + "description": "", + "line": 26, + "type": "scenario", + "steps": [ + { + "keyword": "Given ", + "name": "a feature \"features/simple.feature\" file:", + "line": 27, + "doc_string": { + "value": " @TAG1\n Feature: simple feature\n simple feature description\n @TAG2 @TAG3\n Scenario: simple scenario\n simple scenario description", + "content_type": "", + "line": 28 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "When ", + "name": "I run feature suite with formatter \"pretty\"", + "line": 36, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the rendered output will be as follows:", + "line": 37, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario: simple scenario # features/simple.feature:5\n\n 1 scenarios (1 undefined)\n No steps\n 0s", + "content_type": "", + "line": 38 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] + }, + { + "id": "pretty-formatter;support-of-feature-plus-scenario-outline", + "keyword": "Scenario", + "name": "Support of Feature Plus Scenario Outline", + "description": "", + "line": 48, + "type": "scenario", + "steps": [ + { + "keyword": "Given ", + "name": "a feature \"features/simple.feature\" file:", + "line": 49, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario Outline: simple scenario\n simple scenario description\n\n Examples: simple examples\n | status |\n | pass |\n | fail |", + "content_type": "", + "line": 50 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "When ", + "name": "I run feature suite with formatter \"pretty\"", + "line": 62, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the rendered output will be as follows:", + "line": 63, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario Outline: simple scenario # features/simple.feature:4\n\n Examples: simple examples\n | status |\n | pass |\n | fail |\n\n 2 scenarios (2 undefined)\n No steps\n 0s", + "content_type": "", + "line": 64 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] + }, + { + "id": "pretty-formatter;support-of-feature-plus-scenario-outline-with-tags", + "keyword": "Scenario", + "name": "Support of Feature Plus Scenario Outline With Tags", + "description": "", + "line": 80, + "type": "scenario", + "steps": [ + { + "keyword": "Given ", + "name": "a feature \"features/simple.feature\" file:", + "line": 81, + "doc_string": { + "value": " @TAG1\n Feature: simple feature\n simple feature description\n\n @TAG2\n Scenario Outline: simple scenario\n simple scenario description\n\n @TAG3\n Examples: simple examples\n | status |\n | pass |\n | fail |", + "content_type": "", + "line": 82 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "When ", + "name": "I run feature suite with formatter \"pretty\"", + "line": 97, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the rendered output will be as follows:", + "line": 98, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario Outline: simple scenario # features/simple.feature:6\n\n Examples: simple examples\n | status |\n | pass |\n | fail |\n\n 2 scenarios (2 undefined)\n No steps\n 0s", + "content_type": "", + "line": 99 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] + }, + { + "id": "pretty-formatter;support-of-feature-plus-scenario-with-steps", + "keyword": "Scenario", + "name": "Support of Feature Plus Scenario With Steps", + "description": "", + "line": 114, + "type": "scenario", + "steps": [ + { + "keyword": "Given ", + "name": "a feature \"features/simple.feature\" file:", + "line": 115, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario: simple scenario\n simple scenario description\n\n Given passing step\n Then a failing step\n", + "content_type": "", + "line": 116 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "When ", + "name": "I run feature suite with formatter \"pretty\"", + "line": 127, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the rendered output will be as follows:", + "line": 128, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario: simple scenario # features/simple.feature:4\n Given passing step # suite_context.go:0 -\u003e github.com/cucumber/godog.SuiteContext.func2\n Then a failing step # suite_context.go:0 -\u003e *suiteContext\n intentional failure\n\n --- Failed steps:\n\n Scenario: simple scenario # features/simple.feature:4\n Then a failing step # features/simple.feature:8\n Error: intentional failure\n\n\n 1 scenarios (1 failed)\n 2 steps (1 passed, 1 failed)\n 0s", + "content_type": "", + "line": 129 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] + }, + { + "id": "pretty-formatter;support-of-feature-plus-scenario-outline-with-steps", + "keyword": "Scenario", + "name": "Support of Feature Plus Scenario Outline With Steps", + "description": "", + "line": 149, + "type": "scenario", + "steps": [ + { + "keyword": "Given ", + "name": "a feature \"features/simple.feature\" file:", + "line": 150, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario Outline: simple scenario\n simple scenario description\n\n Given \u003cstatus\u003e step\n\n Examples: simple examples\n | status |\n | passing |\n | failing |\n", + "content_type": "", + "line": 151 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "When ", + "name": "I run feature suite with formatter \"pretty\"", + "line": 166, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the rendered output will be as follows:", + "line": 167, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario Outline: simple scenario # features/simple.feature:4\n Given \u003cstatus\u003e step # suite_context.go:0 -\u003e github.com/cucumber/godog.SuiteContext.func2\n\n Examples: simple examples\n | status |\n | passing |\n | failing |\n intentional failure\n\n --- Failed steps:\n\n Scenario Outline: simple scenario # features/simple.feature:4\n Given failing step # features/simple.feature:7\n Error: intentional failure\n\n\n 2 scenarios (1 passed, 1 failed)\n 2 steps (1 passed, 1 failed)\n 0s", + "content_type": "", + "line": 168 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] + }, + { + "id": "pretty-formatter;support-of-comments", + "keyword": "Scenario", + "name": "Support of Comments", + "description": "", + "line": 195, + "type": "scenario", + "steps": [ + { + "keyword": "Given ", + "name": "a feature \"features/simple.feature\" file:", + "line": 196, + "doc_string": { + "value": " #Feature comment\n Feature: simple feature\n simple description\n\n Scenario: simple scenario\n simple feature description", + "content_type": "", + "line": 197 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "When ", + "name": "I run feature suite with formatter \"pretty\"", + "line": 205, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the rendered output will be as follows:", + "line": 206, + "doc_string": { + "value": " Feature: simple feature\n simple description\n\n Scenario: simple scenario # features/simple.feature:5\n\n 1 scenarios (1 undefined)\n No steps\n 0s", + "content_type": "", + "line": 207 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] + }, + { + "id": "pretty-formatter;support-of-docstrings", + "keyword": "Scenario", + "name": "Support of Docstrings", + "description": "", + "line": 217, + "type": "scenario", + "steps": [ + { + "keyword": "Given ", + "name": "a feature \"features/simple.feature\" file:", + "line": 218, + "doc_string": { + "value": " Feature: simple feature\n simple description\n\n Scenario: simple scenario\n simple feature description\n\n Given passing step\n \"\"\" content type\n step doc string\n \"\"\"", + "content_type": "", + "line": 219 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "When ", + "name": "I run feature suite with formatter \"pretty\"", + "line": 231, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the rendered output will be as follows:", + "line": 232, + "doc_string": { + "value": " Feature: simple feature\n simple description\n\n Scenario: simple scenario # features/simple.feature:4\n Given passing step # suite_context.go:0 -\u003e github.com/cucumber/godog.SuiteContext.func2\n \"\"\" content type\n step doc string\n \"\"\"\n\n 1 scenarios (1 passed)\n 1 steps (1 passed)\n 0s", + "content_type": "", + "line": 233 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + } + ] + }, + { + "id": "pretty-formatter;support-of-undefined,-pending-and-skipped-status", + "keyword": "Scenario", + "name": "Support of Undefined, Pending and Skipped status", + "description": "", + "line": 247, + "type": "scenario", + "steps": [ + { + "keyword": "Given ", + "name": "a feature \"features/simple.feature\" file:", + "line": 248, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario: simple scenario\n simple scenario description\n\n Given passing step\n And pending step\n And undefined\n And passing step\n", + "content_type": "", + "line": 249 + }, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "When ", + "name": "I run feature suite with formatter \"pretty\"", + "line": 262, + "match": { + "location": "suite_context.go:0" + }, + "result": { + "status": "passed", + "duration": 0 + } + }, + { + "keyword": "Then ", + "name": "the rendered output will be as follows:", + "line": 263, + "doc_string": { + "value": " Feature: simple feature\n simple feature description\n\n Scenario: simple scenario # features/simple.feature:4\n Given passing step # suite_context.go:0 -\u003e github.com/cucumber/godog.SuiteContext.func2\n And pending step # suite_context.go:0 -\u003e github.com/cucumber/godog.SuiteContext.func1\n TODO: write pending definition\n And undefined\n And passing step # suite_context.go:0 -\u003e github.com/cucumber/godog.SuiteContext.func2\n\n 1 scenarios (1 pending, 1 undefined)\n 4 steps (1 passed, 1 pending, 1 undefined, 1 skipped)\n 0s\n\n You can implement step definitions for undefined steps with these snippets:\n\n func undefined() error {\n return godog.ErrPending\n }\n\n func FeatureContext(s *godog.Suite) {\n s.Step(`^undefined$`, undefined)\n }", + "content_type": "", + "line": 264 + }, + "match": { + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1597,7 +2121,7 @@ "name": "savybių aplankas \"features\"", "line": 9, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1609,7 +2133,7 @@ "name": "aš išskaitau savybes", "line": 10, "match": { - "location": "suite_context.go:329" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1618,15 +2142,15 @@ }, { "keyword": "Tada ", - "name": "aš turėčiau turėti 11 savybių failus:", + "name": "aš turėčiau turėti 12 savybių failus:", "line": 11, "doc_string": { - "value": "features/background.feature\nfeatures/events.feature\nfeatures/formatter/cucumber.feature\nfeatures/formatter/events.feature\nfeatures/lang.feature\nfeatures/load.feature\nfeatures/multistep.feature\nfeatures/outline.feature\nfeatures/run.feature\nfeatures/snippets.feature\nfeatures/tags.feature", + "value": "features/background.feature\nfeatures/events.feature\nfeatures/formatter/cucumber.feature\nfeatures/formatter/events.feature\nfeatures/formatter/pretty.feature\nfeatures/lang.feature\nfeatures/load.feature\nfeatures/multistep.feature\nfeatures/outline.feature\nfeatures/run.feature\nfeatures/snippets.feature\nfeatures/tags.feature", "content_type": "", "line": 12 }, "match": { - "location": "suite_context.go:348" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1658,7 +2182,7 @@ "name": "a feature path \"features\"", "line": 7, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1670,7 +2194,7 @@ "name": "I parse features", "line": 8, "match": { - "location": "suite_context.go:329" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1679,15 +2203,15 @@ }, { "keyword": "Then ", - "name": "I should have 11 feature files:", + "name": "I should have 12 feature files:", "line": 9, "doc_string": { - "value": "features/background.feature\nfeatures/events.feature\nfeatures/formatter/cucumber.feature\nfeatures/formatter/events.feature\nfeatures/lang.feature\nfeatures/load.feature\nfeatures/multistep.feature\nfeatures/outline.feature\nfeatures/run.feature\nfeatures/snippets.feature\nfeatures/tags.feature", + "value": "features/background.feature\nfeatures/events.feature\nfeatures/formatter/cucumber.feature\nfeatures/formatter/events.feature\nfeatures/formatter/pretty.feature\nfeatures/lang.feature\nfeatures/load.feature\nfeatures/multistep.feature\nfeatures/outline.feature\nfeatures/run.feature\nfeatures/snippets.feature\nfeatures/tags.feature", "content_type": "", "line": 10 }, "match": { - "location": "suite_context.go:348" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1701,15 +2225,15 @@ "keyword": "Scenario", "name": "load a specific feature file", "description": "", - "line": 24, + "line": 25, "type": "scenario", "steps": [ { "keyword": "Given ", "name": "a feature path \"features/load.feature\"", - "line": 25, + "line": 26, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1719,9 +2243,9 @@ { "keyword": "When ", "name": "I parse features", - "line": 26, + "line": 27, "match": { - "location": "suite_context.go:329" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1731,14 +2255,14 @@ { "keyword": "Then ", "name": "I should have 1 feature file:", - "line": 27, + "line": 28, "doc_string": { "value": "features/load.feature", "content_type": "", - "line": 28 + "line": 29 }, "match": { - "location": "suite_context.go:348" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1752,15 +2276,15 @@ "keyword": "Scenario Outline", "name": "loaded feature should have a number of scenarios", "description": "", - "line": 39, + "line": 40, "type": "scenario", "steps": [ { "keyword": "Given ", "name": "a feature path \"features/load.feature:3\"", - "line": 39, + "line": 40, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1770,9 +2294,9 @@ { "keyword": "When ", "name": "I parse features", - "line": 39, + "line": 40, "match": { - "location": "suite_context.go:329" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1782,9 +2306,9 @@ { "keyword": "Then ", "name": "I should have 0 scenario registered", - "line": 39, + "line": 40, "match": { - "location": "suite_context.go:390" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1798,15 +2322,15 @@ "keyword": "Scenario Outline", "name": "loaded feature should have a number of scenarios", "description": "", - "line": 40, + "line": 41, "type": "scenario", "steps": [ { "keyword": "Given ", "name": "a feature path \"features/load.feature:6\"", - "line": 40, + "line": 41, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1816,9 +2340,9 @@ { "keyword": "When ", "name": "I parse features", - "line": 40, + "line": 41, "match": { - "location": "suite_context.go:329" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1828,9 +2352,9 @@ { "keyword": "Then ", "name": "I should have 1 scenario registered", - "line": 40, + "line": 41, "match": { - "location": "suite_context.go:390" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1844,15 +2368,15 @@ "keyword": "Scenario Outline", "name": "loaded feature should have a number of scenarios", "description": "", - "line": 41, + "line": 42, "type": "scenario", "steps": [ { "keyword": "Given ", "name": "a feature path \"features/load.feature\"", - "line": 41, + "line": 42, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1862,9 +2386,9 @@ { "keyword": "When ", "name": "I parse features", - "line": 41, + "line": 42, "match": { - "location": "suite_context.go:329" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1874,9 +2398,9 @@ { "keyword": "Then ", "name": "I should have 4 scenario registered", - "line": 41, + "line": 42, "match": { - "location": "suite_context.go:390" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1890,15 +2414,15 @@ "keyword": "Scenario", "name": "load a number of feature files", "description": "", - "line": 43, + "line": 44, "type": "scenario", "steps": [ { "keyword": "Given ", "name": "a feature path \"features/load.feature\"", - "line": 44, + "line": 45, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1908,9 +2432,9 @@ { "keyword": "And ", "name": "a feature path \"features/events.feature\"", - "line": 45, + "line": 46, "match": { - "location": "suite_context.go:324" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1920,9 +2444,9 @@ { "keyword": "When ", "name": "I parse features", - "line": 46, + "line": 47, "match": { - "location": "suite_context.go:329" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1932,14 +2456,14 @@ { "keyword": "Then ", "name": "I should have 2 feature files:", - "line": 47, + "line": 48, "doc_string": { "value": "features/events.feature\nfeatures/load.feature", "content_type": "", - "line": 48 + "line": 49 }, "match": { - "location": "suite_context.go:348" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1976,7 +2500,7 @@ "line": 8 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -1988,7 +2512,7 @@ "name": "I run feature suite", "line": 15, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2000,7 +2524,7 @@ "name": "the suite should have passed", "line": 16, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2017,7 +2541,7 @@ "line": 18 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2044,7 +2568,7 @@ "line": 25 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2056,7 +2580,7 @@ "name": "I run feature suite", "line": 33, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2068,7 +2592,7 @@ "name": "the suite should have failed", "line": 34, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2085,7 +2609,7 @@ "line": 36 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2102,7 +2626,7 @@ "line": 40 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2119,7 +2643,7 @@ "line": 44 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2146,7 +2670,7 @@ "line": 50 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2158,7 +2682,7 @@ "name": "I run feature suite", "line": 57, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2170,7 +2694,7 @@ "name": "the suite should have failed", "line": 58, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2187,7 +2711,7 @@ "line": 60 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2204,7 +2728,7 @@ "line": 64 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2231,7 +2755,7 @@ "line": 70 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2243,7 +2767,7 @@ "name": "I run feature suite", "line": 78, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2255,7 +2779,7 @@ "name": "the suite should have passed", "line": 79, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2272,7 +2796,7 @@ "line": 81 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2289,7 +2813,7 @@ "line": 85 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2306,7 +2830,7 @@ "line": 89 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2333,7 +2857,7 @@ "line": 95 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2345,7 +2869,7 @@ "name": "I run feature suite", "line": 103, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2357,7 +2881,7 @@ "name": "the suite should have passed", "line": 104, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2374,7 +2898,7 @@ "line": 106 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2391,7 +2915,7 @@ "line": 111 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2418,7 +2942,7 @@ "line": 117 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2430,7 +2954,7 @@ "name": "I run feature suite", "line": 126, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2442,7 +2966,7 @@ "name": "the suite should have passed", "line": 127, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2459,7 +2983,7 @@ "line": 129 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2476,7 +3000,7 @@ "line": 134 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2493,7 +3017,7 @@ "line": 138 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2530,7 +3054,7 @@ "line": 8 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2542,7 +3066,7 @@ "name": "I run feature suite", "line": 24, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2554,7 +3078,7 @@ "name": "the suite should have passed", "line": 25, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2571,7 +3095,7 @@ "line": 27 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2598,7 +3122,7 @@ "line": 38 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2610,7 +3134,7 @@ "name": "I run feature suite", "line": 54, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2622,7 +3146,7 @@ "name": "the suite should have failed", "line": 55, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2639,7 +3163,7 @@ "line": 57 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2656,7 +3180,7 @@ "line": 65 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2683,7 +3207,7 @@ "line": 71 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2695,7 +3219,7 @@ "name": "I run feature suite", "line": 87, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2707,7 +3231,7 @@ "name": "the suite should have failed", "line": 88, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2724,7 +3248,7 @@ "line": 90 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2741,7 +3265,7 @@ "line": 98 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2768,7 +3292,7 @@ "line": 104 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2780,7 +3304,7 @@ "name": "I run feature suite", "line": 122, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2792,7 +3316,7 @@ "name": "the suite should have passed", "line": 123, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2809,7 +3333,7 @@ "line": 125 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2836,7 +3360,7 @@ "line": 134 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2848,7 +3372,7 @@ "name": "I run feature suite", "line": 151, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2860,7 +3384,7 @@ "name": "the suite should have passed", "line": 151, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2887,7 +3411,7 @@ "line": 134 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2899,7 +3423,7 @@ "name": "I run feature suite", "line": 152, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2911,7 +3435,7 @@ "name": "the suite should have passed", "line": 152, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2948,7 +3472,7 @@ "line": 8 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2960,7 +3484,7 @@ "name": "I run feature suite", "line": 16, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2972,7 +3496,7 @@ "name": "the suite should have passed", "line": 17, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -2989,7 +3513,7 @@ "line": 19 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3016,7 +3540,7 @@ "line": 27 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3028,7 +3552,7 @@ "name": "I run feature suite", "line": 35, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3040,7 +3564,7 @@ "name": "the suite should have failed", "line": 36, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3057,7 +3581,7 @@ "line": 38 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3074,7 +3598,7 @@ "line": 42 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3101,7 +3625,7 @@ "line": 49 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3113,7 +3637,7 @@ "name": "I run feature suite", "line": 60, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3125,7 +3649,7 @@ "name": "the suite should have failed", "line": 61, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3142,7 +3666,7 @@ "line": 63 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3159,7 +3683,7 @@ "line": 67 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3186,7 +3710,7 @@ "line": 75 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3198,7 +3722,7 @@ "name": "I run feature suite", "line": 83, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3210,7 +3734,7 @@ "name": "the suite should have passed", "line": 84, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3227,7 +3751,7 @@ "line": 86 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3244,7 +3768,7 @@ "line": 90 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3261,7 +3785,7 @@ "line": 94 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3288,7 +3812,7 @@ "line": 100 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3300,7 +3824,7 @@ "name": "I run feature suite", "line": 108, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3312,7 +3836,7 @@ "name": "the suite should have passed", "line": 109, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3329,7 +3853,7 @@ "line": 111 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3346,7 +3870,7 @@ "line": 116 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3373,7 +3897,7 @@ "line": 122 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3385,7 +3909,7 @@ "name": "I run feature suite", "line": 130, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3397,7 +3921,7 @@ "name": "the suite should have passed", "line": 131, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3414,7 +3938,7 @@ "line": 133 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3431,7 +3955,7 @@ "line": 137 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3458,7 +3982,7 @@ "line": 144 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3470,7 +3994,7 @@ "name": "I run feature suite", "line": 152, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3482,7 +4006,7 @@ "name": "the suite should have passed", "line": 153, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3499,7 +4023,7 @@ "line": 155 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3516,7 +4040,7 @@ "line": 159 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3533,7 +4057,7 @@ "line": 163 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3560,7 +4084,7 @@ "line": 169 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3572,7 +4096,7 @@ "name": "I run feature suite", "line": 178, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3584,7 +4108,7 @@ "name": "the suite should have passed", "line": 179, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3601,7 +4125,7 @@ "line": 181 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3618,7 +4142,7 @@ "line": 186 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3635,7 +4159,7 @@ "line": 190 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3662,7 +4186,7 @@ "line": 196 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3674,7 +4198,7 @@ "name": "I run feature suite", "line": 204, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3691,7 +4215,7 @@ "line": 206 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3708,7 +4232,7 @@ "line": 210 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3720,7 +4244,7 @@ "name": "the suite should have failed", "line": 214, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3747,7 +4271,7 @@ "line": 218 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3759,7 +4283,7 @@ "name": "I run feature suite", "line": 226, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3776,7 +4300,7 @@ "line": 228 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3793,7 +4317,7 @@ "line": 232 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3810,7 +4334,7 @@ "line": 236 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3822,7 +4346,7 @@ "name": "the suite should have failed", "line": 239, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3849,7 +4373,7 @@ "line": 243 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3861,7 +4385,7 @@ "name": "I run feature suite", "line": 251, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3878,7 +4402,7 @@ "line": 253 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3895,7 +4419,7 @@ "line": 257 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3912,7 +4436,7 @@ "line": 261 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3924,7 +4448,7 @@ "name": "the suite should have failed", "line": 264, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3961,7 +4485,7 @@ "line": 8 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3973,7 +4497,7 @@ "name": "I run feature suite", "line": 15, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -3990,7 +4514,7 @@ "line": 17 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4007,7 +4531,7 @@ "line": 22 }, "match": { - "location": "suite_context.go:178" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4034,7 +4558,7 @@ "line": 39 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4046,7 +4570,7 @@ "name": "I run feature suite", "line": 48, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4063,7 +4587,7 @@ "line": 50 }, "match": { - "location": "suite_context.go:178" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4090,7 +4614,7 @@ "line": 67 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4102,7 +4626,7 @@ "name": "I run feature suite", "line": 74, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4119,7 +4643,7 @@ "line": 76 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4136,7 +4660,7 @@ "line": 81 }, "match": { - "location": "suite_context.go:178" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4163,7 +4687,7 @@ "line": 98 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4175,7 +4699,7 @@ "name": "I run feature suite", "line": 105, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4192,7 +4716,7 @@ "line": 107 }, "match": { - "location": "suite_context.go:178" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4219,7 +4743,7 @@ "line": 124 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4231,7 +4755,7 @@ "name": "I run feature suite", "line": 131, "match": { - "location": "suite_context.go:379" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4248,7 +4772,7 @@ "line": 133 }, "match": { - "location": "suite_context.go:178" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4285,7 +4809,7 @@ "line": 8 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4297,7 +4821,7 @@ "name": "I run feature suite with tags \"@used\"", "line": 28, "match": { - "location": "suite_context.go:118" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4309,7 +4833,7 @@ "name": "the suite should have passed", "line": 29, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4326,7 +4850,7 @@ "line": 31 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4338,7 +4862,7 @@ "name": "I should have 1 scenario registered", "line": 36, "match": { - "location": "suite_context.go:390" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4365,7 +4889,7 @@ "line": 40 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4377,7 +4901,7 @@ "name": "I run feature suite with tags \"@x\"", "line": 59, "match": { - "location": "suite_context.go:118" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4389,7 +4913,7 @@ "name": "the suite should have passed", "line": 60, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4401,7 +4925,7 @@ "name": "I should have 3 scenario registered", "line": 61, "match": { - "location": "suite_context.go:390" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4418,7 +4942,7 @@ "line": 63 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4445,7 +4969,7 @@ "line": 71 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4457,7 +4981,7 @@ "name": "I run feature suite with tags \"@x \u0026\u0026 ~@y\"", "line": 90, "match": { - "location": "suite_context.go:118" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4469,7 +4993,7 @@ "name": "the suite should have passed", "line": 91, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4481,7 +5005,7 @@ "name": "I should have 2 scenario registered", "line": 92, "match": { - "location": "suite_context.go:390" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4498,7 +5022,7 @@ "line": 94 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4525,7 +5049,7 @@ "line": 101 }, "match": { - "location": "suite_context.go:318" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4537,7 +5061,7 @@ "name": "I run feature suite with tags \"@y \u0026\u0026 @z\"", "line": 120, "match": { - "location": "suite_context.go:118" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4549,7 +5073,7 @@ "name": "the suite should have passed", "line": 121, "match": { - "location": "suite_context.go:338" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4561,7 +5085,7 @@ "name": "I should have 1 scenario registered", "line": 122, "match": { - "location": "suite_context.go:390" + "location": "suite_context.go:0" }, "result": { "status": "passed", @@ -4578,7 +5102,7 @@ "line": 124 }, "match": { - "location": "suite_context.go:191" + "location": "suite_context.go:0" }, "result": { "status": "passed", diff --git a/fixtures/cucumber_output_go111.json b/fixtures/cucumber_output_go111.json deleted file mode 100644 index 81385af..0000000 --- a/fixtures/cucumber_output_go111.json +++ /dev/null @@ -1,4592 +0,0 @@ -[ - { - "uri": "features/background.feature", - "id": "run-background", - "keyword": "Feature", - "name": "run background", - "description": " In order to test application behavior\n As a test suite\n I need to be able to run background correctly", - "line": 1, - "elements": [ - { - "id": "run-background;should-run-background-steps", - "keyword": "Scenario", - "name": "should run background steps", - "description": "", - "line": 6, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 7, - "doc_string": { - "value": "Feature: with background\n\n Background:\n Given a feature path \"features/load.feature:6\"\n\n Scenario: parse a scenario\n When I parse features\n Then I should have 1 scenario registered", - "content_type": "", - "line": 8 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 18, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 19, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 20, - "doc_string": { - "value": "a feature path \"features/load.feature:6\"\nI parse features\nI should have 1 scenario registered", - "content_type": "", - "line": 21 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-background;should-skip-all-consequent-steps-on-failure", - "keyword": "Scenario", - "name": "should skip all consequent steps on failure", - "description": "", - "line": 27, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 28, - "doc_string": { - "value": "Feature: with background\n\n Background:\n Given a failing step\n And a feature path \"features/load.feature:6\"\n\n Scenario: parse a scenario\n When I parse features\n Then I should have 1 scenario registered", - "content_type": "", - "line": 29 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 40, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have failed", - "line": 41, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be failed:", - "line": 42, - "doc_string": { - "value": "a failing step", - "content_type": "", - "line": 43 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be skipped:", - "line": 46, - "doc_string": { - "value": "a feature path \"features/load.feature:6\"\nI parse features\nI should have 1 scenario registered", - "content_type": "", - "line": 47 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-background;should-continue-undefined-steps", - "keyword": "Scenario", - "name": "should continue undefined steps", - "description": "", - "line": 53, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 54, - "doc_string": { - "value": "Feature: with background\n\n Background:\n Given an undefined step\n\n Scenario: parse a scenario\n When I do undefined action\n Then I should have 1 scenario registered", - "content_type": "", - "line": 55 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 65, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 66, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be undefined:", - "line": 67, - "doc_string": { - "value": "an undefined step\nI do undefined action", - "content_type": "", - "line": 68 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be skipped:", - "line": 72, - "doc_string": { - "value": "I should have 1 scenario registered", - "content_type": "", - "line": 73 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - }, - { - "uri": "features/events.feature", - "id": "suite-events", - "keyword": "Feature", - "name": "suite events", - "description": " In order to run tasks before and after important events\n As a test suite\n I need to provide a way to hook into these events", - "line": 1, - "elements": [ - { - "id": "suite-events;triggers-before-scenario-event", - "keyword": "Scenario", - "name": "triggers before scenario event", - "description": "", - "line": 9, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "I'm listening to suite events", - "line": 7, - "match": { - "location": "suite_context.go:40" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature:6\"", - "line": 10, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 11, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "there was event triggered before scenario \"load features within path\"", - "line": 12, - "match": { - "location": "suite_context.go:50" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "suite-events;triggers-appropriate-events-for-a-single-scenario", - "keyword": "Scenario", - "name": "triggers appropriate events for a single scenario", - "description": "", - "line": 14, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "I'm listening to suite events", - "line": 7, - "match": { - "location": "suite_context.go:40" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature:6\"", - "line": 15, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 16, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "these events had to be fired for a number of times:", - "line": 17, - "match": { - "location": "suite_context.go:51" - }, - "result": { - "status": "passed", - "duration": 0 - }, - "rows": [ - { - "cells": [ - "BeforeSuite", - "1" - ] - }, - { - "cells": [ - "BeforeFeature", - "1" - ] - }, - { - "cells": [ - "BeforeScenario", - "1" - ] - }, - { - "cells": [ - "BeforeStep", - "3" - ] - }, - { - "cells": [ - "AfterStep", - "3" - ] - }, - { - "cells": [ - "AfterScenario", - "1" - ] - }, - { - "cells": [ - "AfterFeature", - "1" - ] - }, - { - "cells": [ - "AfterSuite", - "1" - ] - } - ] - } - ] - }, - { - "id": "suite-events;triggers-appropriate-events-whole-feature", - "keyword": "Scenario", - "name": "triggers appropriate events whole feature", - "description": "", - "line": 27, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "I'm listening to suite events", - "line": 7, - "match": { - "location": "suite_context.go:40" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature\"", - "line": 28, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 29, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "these events had to be fired for a number of times:", - "line": 30, - "match": { - "location": "suite_context.go:51" - }, - "result": { - "status": "passed", - "duration": 0 - }, - "rows": [ - { - "cells": [ - "BeforeSuite", - "1" - ] - }, - { - "cells": [ - "BeforeFeature", - "1" - ] - }, - { - "cells": [ - "BeforeScenario", - "6" - ] - }, - { - "cells": [ - "BeforeStep", - "19" - ] - }, - { - "cells": [ - "AfterStep", - "19" - ] - }, - { - "cells": [ - "AfterScenario", - "6" - ] - }, - { - "cells": [ - "AfterFeature", - "1" - ] - }, - { - "cells": [ - "AfterSuite", - "1" - ] - } - ] - } - ] - }, - { - "id": "suite-events;triggers-appropriate-events-for-two-feature-files", - "keyword": "Scenario", - "name": "triggers appropriate events for two feature files", - "description": "", - "line": 40, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "I'm listening to suite events", - "line": 7, - "match": { - "location": "suite_context.go:40" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature:6\"", - "line": 41, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "a feature path \"features/multistep.feature:6\"", - "line": 42, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 43, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "these events had to be fired for a number of times:", - "line": 44, - "match": { - "location": "suite_context.go:51" - }, - "result": { - "status": "passed", - "duration": 0 - }, - "rows": [ - { - "cells": [ - "BeforeSuite", - "1" - ] - }, - { - "cells": [ - "BeforeFeature", - "2" - ] - }, - { - "cells": [ - "BeforeScenario", - "2" - ] - }, - { - "cells": [ - "BeforeStep", - "7" - ] - }, - { - "cells": [ - "AfterStep", - "7" - ] - }, - { - "cells": [ - "AfterScenario", - "2" - ] - }, - { - "cells": [ - "AfterFeature", - "2" - ] - }, - { - "cells": [ - "AfterSuite", - "1" - ] - } - ] - } - ] - }, - { - "id": "suite-events;should-not-trigger-events-on-empty-feature", - "keyword": "Scenario", - "name": "should not trigger events on empty feature", - "description": "", - "line": 54, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "I'm listening to suite events", - "line": 7, - "match": { - "location": "suite_context.go:40" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 55, - "doc_string": { - "value": "Feature: empty\n\n Scenario: one\n\n Scenario: two", - "content_type": "", - "line": 56 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 63, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "these events had to be fired for a number of times:", - "line": 64, - "match": { - "location": "suite_context.go:51" - }, - "result": { - "status": "passed", - "duration": 0 - }, - "rows": [ - { - "cells": [ - "BeforeSuite", - "1" - ] - }, - { - "cells": [ - "BeforeFeature", - "0" - ] - }, - { - "cells": [ - "BeforeScenario", - "0" - ] - }, - { - "cells": [ - "BeforeStep", - "0" - ] - }, - { - "cells": [ - "AfterStep", - "0" - ] - }, - { - "cells": [ - "AfterScenario", - "0" - ] - }, - { - "cells": [ - "AfterFeature", - "0" - ] - }, - { - "cells": [ - "AfterSuite", - "1" - ] - } - ] - } - ] - }, - { - "id": "suite-events;should-not-trigger-events-on-empty-scenarios", - "keyword": "Scenario", - "name": "should not trigger events on empty scenarios", - "description": "", - "line": 74, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "I'm listening to suite events", - "line": 7, - "match": { - "location": "suite_context.go:40" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 75, - "doc_string": { - "value": "Feature: half empty\n\n Scenario: one\n\n Scenario: two\n Then passing step\n\n Scenario Outline: three\n Then passing step\n\n Examples:\n | a |\n | 1 |", - "content_type": "", - "line": 76 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 91, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "these events had to be fired for a number of times:", - "line": 92, - "match": { - "location": "suite_context.go:51" - }, - "result": { - "status": "passed", - "duration": 0 - }, - "rows": [ - { - "cells": [ - "BeforeSuite", - "1" - ] - }, - { - "cells": [ - "BeforeFeature", - "1" - ] - }, - { - "cells": [ - "BeforeScenario", - "2" - ] - }, - { - "cells": [ - "BeforeStep", - "2" - ] - }, - { - "cells": [ - "AfterStep", - "2" - ] - }, - { - "cells": [ - "AfterScenario", - "2" - ] - }, - { - "cells": [ - "AfterFeature", - "1" - ] - }, - { - "cells": [ - "AfterSuite", - "1" - ] - } - ] - } - ] - } - ] - }, - { - "uri": "features/formatter/cucumber.feature", - "id": "cucumber-json-formatter", - "keyword": "Feature", - "name": "cucumber json formatter", - "description": " In order to support tools that import cucumber json output\n I need to be able to support cucumber json formatted output", - "line": 1, - "comments": [ - { - "value": "# Currently godog only supports comments on Feature and not", - "line": 365 - }, - { - "value": "# scenario and steps.", - "line": 366 - } - ], - "elements": [ - { - "id": "cucumber-json-formatter;support-of-feature-plus-scenario-node", - "keyword": "Scenario", - "name": "Support of Feature Plus Scenario Node", - "description": "", - "line": 5, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"features/simple.feature\" file:", - "line": 6, - "doc_string": { - "value": " Feature: simple feature\n simple feature description\n Scenario: simple scenario\n simple scenario description", - "content_type": "", - "line": 7 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"cucumber\"", - "line": 13, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the rendered json will be as follows:", - "line": 14, - "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 3,\n \"type\": \"scenario\"\n }\n ]\n }\n ]", - "content_type": "application/json", - "line": 15 - }, - "match": { - "location": "suite_context.go:75" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "cucumber-json-formatter;support-of-feature-plus-scenario-node-with-tags", - "keyword": "Scenario", - "name": "Support of Feature Plus Scenario Node With Tags", - "description": "", - "line": 38, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"features/simple.feature\" file:", - "line": 39, - "doc_string": { - "value": " @TAG1\n Feature: simple feature\n simple feature description\n @TAG2 @TAG3\n Scenario: simple scenario\n simple scenario description", - "content_type": "", - "line": 40 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"cucumber\"", - "line": 48, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the rendered json will be as follows:", - "line": 49, - "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 2,\n \"tags\": [\n {\n \"name\": \"@TAG1\",\n \"line\": 1\n }\n ],\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 5,\n \"type\": \"scenario\",\n \"tags\": [\n {\n \"name\": \"@TAG1\",\n \"line\": 1\n },\n {\n \"name\": \"@TAG2\",\n \"line\": 4\n },\n {\n \"name\": \"@TAG3\",\n \"line\": 4\n }\n ]\n }\n ]\n }\n]", - "content_type": "application/json", - "line": 50 - }, - "match": { - "location": "suite_context.go:75" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "cucumber-json-formatter;support-of-feature-plus-scenario-outline", - "keyword": "Scenario", - "name": "Support of Feature Plus Scenario Outline", - "description": "", - "line": 92, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"features/simple.feature\" file:", - "line": 93, - "doc_string": { - "value": " Feature: simple feature\n simple feature description\n\n Scenario Outline: simple scenario\n simple scenario description\n\n Examples: simple examples\n | status |\n | pass |\n | fail |", - "content_type": "", - "line": 94 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"cucumber\"", - "line": 106, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the rendered json will be as follows:", - "line": 107, - "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;2\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 9,\n \"type\": \"scenario\"\n },\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;3\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 10,\n \"type\": \"scenario\"\n }\n ]\n }\n ]", - "content_type": "", - "line": 108 - }, - "match": { - "location": "suite_context.go:75" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "cucumber-json-formatter;support-of-feature-plus-scenario-outline-with-tags", - "keyword": "Scenario", - "name": "Support of Feature Plus Scenario Outline With Tags", - "description": "", - "line": 139, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"features/simple.feature\" file:", - "line": 140, - "doc_string": { - "value": " @TAG1\n Feature: simple feature\n simple feature description\n\n @TAG2\n Scenario Outline: simple scenario\n simple scenario description\n\n @TAG3\n Examples: simple examples\n | status |\n | pass |\n | fail |", - "content_type": "", - "line": 141 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"cucumber\"", - "line": 156, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the rendered json will be as follows:", - "line": 157, - "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 2,\n \"tags\": [\n {\n \"name\": \"@TAG1\",\n \"line\": 1\n }\n ],\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;2\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 12,\n \"type\": \"scenario\",\n \"tags\": [\n {\n \"name\": \"@TAG1\",\n \"line\": 1\n },\n {\n \"name\": \"@TAG2\",\n \"line\": 5\n },\n {\n \"name\": \"@TAG3\",\n \"line\": 9\n }\n ]\n },\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;3\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 13,\n \"type\": \"scenario\",\n \"tags\": [\n {\n \"name\": \"@TAG1\",\n \"line\": 1\n },\n {\n \"name\": \"@TAG2\",\n \"line\": 5\n },\n {\n \"name\": \"@TAG3\",\n \"line\": 9\n }\n ]\n }\n ]\n }\n ]", - "content_type": "", - "line": 158 - }, - "match": { - "location": "suite_context.go:75" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "cucumber-json-formatter;support-of-feature-plus-scenario-with-steps", - "keyword": "Scenario", - "name": "Support of Feature Plus Scenario With Steps", - "description": "", - "line": 222, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"features/simple.feature\" file:", - "line": 223, - "doc_string": { - "value": " Feature: simple feature\n simple feature description\n\n Scenario: simple scenario\n simple scenario description\n\n Given passing step\n Then a failing step\n", - "content_type": "", - "line": 224 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"cucumber\"", - "line": 235, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the rendered json will be as follows:", - "line": 236, - "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 4,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 7,\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n },\n {\n \"keyword\": \"Then \",\n \"name\": \"a failing step\",\n \"line\": 8,\n \"match\": {\n \"location\": \"suite_context.go:47\"\n },\n \"result\": {\n \"status\": \"failed\",\n \"error_message\": \"intentional failure\",\n \"duration\": 0\n }\n }\n ]\n }\n ]\n }\n ]", - "content_type": "", - "line": 237 - }, - "match": { - "location": "suite_context.go:75" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "cucumber-json-formatter;support-of-feature-plus-scenario-outline-with-steps", - "keyword": "Scenario", - "name": "Support of Feature Plus Scenario Outline With Steps", - "description": "", - "line": 286, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"features/simple.feature\" file:", - "line": 287, - "doc_string": { - "value": " Feature: simple feature\n simple feature description\n\n Scenario Outline: simple scenario\n simple scenario description\n\n Given \u003cstatus\u003e step\n\n Examples: simple examples\n | status |\n | passing |\n | failing |\n", - "content_type": "", - "line": 288 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"cucumber\"", - "line": 303, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the rendered json will be as follows:", - "line": 304, - "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;2\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 11,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 11,\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n }\n ]\n },\n {\n \"id\": \"simple-feature;simple-scenario;simple-examples;3\",\n \"keyword\": \"Scenario Outline\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 12,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"failing step\",\n \"line\": 12,\n \"match\": {\n \"location\": \"suite_context.go:47\"\n },\n \"result\": {\n \"status\": \"failed\",\n \"error_message\": \"intentional failure\",\n \"duration\": 0\n }\n }\n ]\n }\n ]\n }\n ]", - "content_type": "", - "line": 305 - }, - "match": { - "location": "suite_context.go:75" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "cucumber-json-formatter;support-of-comments", - "keyword": "Scenario", - "name": "Support of Comments", - "description": "", - "line": 367, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"features/simple.feature\" file:", - "line": 368, - "doc_string": { - "value": " #Feature comment\n Feature: simple feature\n simple description\n\n Scenario: simple scenario\n simple feature description", - "content_type": "", - "line": 369 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"cucumber\"", - "line": 377, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the rendered json will be as follows:", - "line": 378, - "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple description\",\n \"line\": 2,\n \"comments\": [\n {\n \"value\": \"#Feature comment\",\n \"line\": 1\n }\n ],\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple feature description\",\n \"line\": 5,\n \"type\": \"scenario\"\n }\n ]\n }\n ]", - "content_type": "", - "line": 379 - }, - "match": { - "location": "suite_context.go:75" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "cucumber-json-formatter;support-of-docstrings", - "keyword": "Scenario", - "name": "Support of Docstrings", - "description": "", - "line": 407, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"features/simple.feature\" file:", - "line": 408, - "doc_string": { - "value": " Feature: simple feature\n simple description\n\n Scenario: simple scenario\n simple feature description\n\n Given passing step\n \"\"\" content type\n step doc string\n \"\"\"", - "content_type": "", - "line": 409 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"cucumber\"", - "line": 421, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the rendered json will be as follows:", - "line": 422, - "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple feature description\",\n \"line\": 4,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 7,\n \"doc_string\": {\n \"value\": \"step doc string\",\n \"content_type\": \"content type\",\n \"line\": 8\n },\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n }\n ]\n }\n ]\n }\n]", - "content_type": "", - "line": 423 - }, - "match": { - "location": "suite_context.go:75" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "cucumber-json-formatter;support-of-undefined,-pending-and-skipped-status", - "keyword": "Scenario", - "name": "Support of Undefined, Pending and Skipped status", - "description": "", - "line": 464, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"features/simple.feature\" file:", - "line": 465, - "doc_string": { - "value": " Feature: simple feature\n simple feature description\n\n Scenario: simple scenario\n simple scenario description\n\n Given passing step\n And pending step\n And undefined\n And passing step\n", - "content_type": "", - "line": 466 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"cucumber\"", - "line": 479, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the rendered json will be as follows:", - "line": 480, - "doc_string": { - "value": " [\n {\n \"uri\": \"features/simple.feature\",\n \"id\": \"simple-feature\",\n \"keyword\": \"Feature\",\n \"name\": \"simple feature\",\n \"description\": \" simple feature description\",\n \"line\": 1,\n \"elements\": [\n {\n \"id\": \"simple-feature;simple-scenario\",\n \"keyword\": \"Scenario\",\n \"name\": \"simple scenario\",\n \"description\": \" simple scenario description\",\n \"line\": 4,\n \"type\": \"scenario\",\n \"steps\": [\n {\n \"keyword\": \"Given \",\n \"name\": \"passing step\",\n \"line\": 7,\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"passed\",\n \"duration\": 0\n }\n },\n {\n \"keyword\": \"And \",\n \"name\": \"pending step\",\n \"line\": 8,\n \"match\": {\n \"location\": \"features/simple.feature:8\"\n },\n \"result\": {\n \"status\": \"pending\"\n }\n },\n {\n \"keyword\": \"And \",\n \"name\": \"undefined\",\n \"line\": 9,\n \"match\": {\n \"location\": \"features/simple.feature:9\"\n },\n \"result\": {\n \"status\": \"undefined\"\n }\n },\n {\n \"keyword\": \"And \",\n \"name\": \"passing step\",\n \"line\": 10,\n \"match\": {\n \"location\": \"suite_context.go:64\"\n },\n \"result\": {\n \"status\": \"skipped\"\n }\n }\n ]\n }\n ]\n }\n ]", - "content_type": "", - "line": 481 - }, - "match": { - "location": "suite_context.go:75" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - }, - { - "uri": "features/formatter/events.feature", - "id": "event-stream-formatter", - "keyword": "Feature", - "name": "event stream formatter", - "description": " In order to have universal cucumber formatter\n As a test suite\n I need to be able to support event stream formatter", - "line": 1, - "elements": [ - { - "id": "event-stream-formatter;should-fire-only-suite-events-without-any-scenario", - "keyword": "Scenario", - "name": "should fire only suite events without any scenario", - "description": "", - "line": 6, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature:4\"", - "line": 7, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"events\"", - "line": 8, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the following events should be fired:", - "line": 9, - "doc_string": { - "value": " TestRunStarted\n TestSource\n TestRunFinished", - "content_type": "", - "line": 10 - }, - "match": { - "location": "suite_context.go:60" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "event-stream-formatter;should-process-simple-scenario", - "keyword": "Scenario", - "name": "should process simple scenario", - "description": "", - "line": 16, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature:24\"", - "line": 17, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"events\"", - "line": 18, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the following events should be fired:", - "line": 19, - "doc_string": { - "value": " TestRunStarted\n TestSource\n TestCaseStarted\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n TestCaseFinished\n TestRunFinished", - "content_type": "", - "line": 20 - }, - "match": { - "location": "suite_context.go:60" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "event-stream-formatter;should-process-outline-scenario", - "keyword": "Scenario", - "name": "should process outline scenario", - "description": "", - "line": 37, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature:32\"", - "line": 38, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with formatter \"events\"", - "line": 39, - "match": { - "location": "suite_context.go:43" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the following events should be fired:", - "line": 40, - "doc_string": { - "value": " TestRunStarted\n TestSource\n TestCaseStarted\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n TestCaseFinished\n TestCaseStarted\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n TestCaseFinished\n TestCaseStarted\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n StepDefinitionFound\n TestStepStarted\n TestStepFinished\n TestCaseFinished\n TestRunFinished", - "content_type": "", - "line": 41 - }, - "match": { - "location": "suite_context.go:60" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - }, - { - "uri": "features/lang.feature", - "id": "užkrauti-savybes", - "keyword": "Savybė", - "name": "užkrauti savybes", - "description": " Kad būtų galima paleisti savybių testus\n Kaip testavimo įrankis\n Aš turiu galėti užregistruoti savybes", - "line": 3, - "tags": [ - { - "name": "@lang", - "line": 2 - } - ], - "elements": [ - { - "id": "užkrauti-savybes;savybių-užkrovimas-iš-aplanko", - "keyword": "Scenarijus", - "name": "savybių užkrovimas iš aplanko", - "description": "", - "line": 8, - "type": "scenario", - "tags": [ - { - "name": "@lang", - "line": 2 - } - ], - "steps": [ - { - "keyword": "Duota ", - "name": "savybių aplankas \"features\"", - "line": 9, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Kai ", - "name": "aš išskaitau savybes", - "line": 10, - "match": { - "location": "suite_context.go:39" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Tada ", - "name": "aš turėčiau turėti 11 savybių failus:", - "line": 11, - "doc_string": { - "value": "features/background.feature\nfeatures/events.feature\nfeatures/formatter/cucumber.feature\nfeatures/formatter/events.feature\nfeatures/lang.feature\nfeatures/load.feature\nfeatures/multistep.feature\nfeatures/outline.feature\nfeatures/run.feature\nfeatures/snippets.feature\nfeatures/tags.feature", - "content_type": "", - "line": 12 - }, - "match": { - "location": "suite_context.go:47" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - }, - { - "uri": "features/load.feature", - "id": "load-features", - "keyword": "Feature", - "name": "load features", - "description": " In order to run features\n As a test suite\n I need to be able to load features", - "line": 1, - "elements": [ - { - "id": "load-features;load-features-within-path", - "keyword": "Scenario", - "name": "load features within path", - "description": "", - "line": 6, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature path \"features\"", - "line": 7, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I parse features", - "line": 8, - "match": { - "location": "suite_context.go:39" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "I should have 11 feature files:", - "line": 9, - "doc_string": { - "value": "features/background.feature\nfeatures/events.feature\nfeatures/formatter/cucumber.feature\nfeatures/formatter/events.feature\nfeatures/lang.feature\nfeatures/load.feature\nfeatures/multistep.feature\nfeatures/outline.feature\nfeatures/run.feature\nfeatures/snippets.feature\nfeatures/tags.feature", - "content_type": "", - "line": 10 - }, - "match": { - "location": "suite_context.go:47" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "load-features;load-a-specific-feature-file", - "keyword": "Scenario", - "name": "load a specific feature file", - "description": "", - "line": 24, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature\"", - "line": 25, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I parse features", - "line": 26, - "match": { - "location": "suite_context.go:39" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "I should have 1 feature file:", - "line": 27, - "doc_string": { - "value": "features/load.feature", - "content_type": "", - "line": 28 - }, - "match": { - "location": "suite_context.go:47" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "load-features;loaded-feature-should-have-a-number-of-scenarios;;2", - "keyword": "Scenario Outline", - "name": "loaded feature should have a number of scenarios", - "description": "", - "line": 39, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature:3\"", - "line": 39, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I parse features", - "line": 39, - "match": { - "location": "suite_context.go:39" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "I should have 0 scenario registered", - "line": 39, - "match": { - "location": "suite_context.go:48" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "load-features;loaded-feature-should-have-a-number-of-scenarios;;3", - "keyword": "Scenario Outline", - "name": "loaded feature should have a number of scenarios", - "description": "", - "line": 40, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature:6\"", - "line": 40, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I parse features", - "line": 40, - "match": { - "location": "suite_context.go:39" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "I should have 1 scenario registered", - "line": 40, - "match": { - "location": "suite_context.go:48" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "load-features;loaded-feature-should-have-a-number-of-scenarios;;4", - "keyword": "Scenario Outline", - "name": "loaded feature should have a number of scenarios", - "description": "", - "line": 41, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature\"", - "line": 41, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I parse features", - "line": 41, - "match": { - "location": "suite_context.go:39" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "I should have 4 scenario registered", - "line": 41, - "match": { - "location": "suite_context.go:48" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "load-features;load-a-number-of-feature-files", - "keyword": "Scenario", - "name": "load a number of feature files", - "description": "", - "line": 43, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature path \"features/load.feature\"", - "line": 44, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "a feature path \"features/events.feature\"", - "line": 45, - "match": { - "location": "suite_context.go:38" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I parse features", - "line": 46, - "match": { - "location": "suite_context.go:39" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "I should have 2 feature files:", - "line": 47, - "doc_string": { - "value": "features/events.feature\nfeatures/load.feature", - "content_type": "", - "line": 48 - }, - "match": { - "location": "suite_context.go:47" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - }, - { - "uri": "features/multistep.feature", - "id": "run-features-with-nested-steps", - "keyword": "Feature", - "name": "run features with nested steps", - "description": " In order to test multisteps\n As a test suite\n I need to be able to execute multisteps", - "line": 1, - "elements": [ - { - "id": "run-features-with-nested-steps;should-run-passing-multistep-successfully", - "keyword": "Scenario", - "name": "should run passing multistep successfully", - "description": "", - "line": 6, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 7, - "doc_string": { - "value": "Feature: normal feature\n\n Scenario: run passing multistep\n Given passing step\n Then passing multistep", - "content_type": "", - "line": 8 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 15, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 16, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 17, - "doc_string": { - "value": "passing step\npassing multistep", - "content_type": "", - "line": 18 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features-with-nested-steps;should-fail-multistep", - "keyword": "Scenario", - "name": "should fail multistep", - "description": "", - "line": 23, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"failed.feature\" file:", - "line": 24, - "doc_string": { - "value": "Feature: failed feature\n\n Scenario: run failing multistep\n Given passing step\n When failing multistep\n Then I should have 1 scenario registered", - "content_type": "", - "line": 25 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 33, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have failed", - "line": 34, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be failed:", - "line": 35, - "doc_string": { - "value": "failing multistep", - "content_type": "", - "line": 36 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be skipped:", - "line": 39, - "doc_string": { - "value": "I should have 1 scenario registered", - "content_type": "", - "line": 40 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 43, - "doc_string": { - "value": "passing step", - "content_type": "", - "line": 44 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features-with-nested-steps;should-fail-nested-multistep", - "keyword": "Scenario", - "name": "should fail nested multistep", - "description": "", - "line": 48, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"failed.feature\" file:", - "line": 49, - "doc_string": { - "value": "Feature: failed feature\n\n Scenario: run failing nested multistep\n Given failing nested multistep\n When passing step", - "content_type": "", - "line": 50 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 57, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have failed", - "line": 58, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be failed:", - "line": 59, - "doc_string": { - "value": "failing nested multistep", - "content_type": "", - "line": 60 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be skipped:", - "line": 63, - "doc_string": { - "value": "passing step", - "content_type": "", - "line": 64 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features-with-nested-steps;should-skip-steps-after-undefined-multistep", - "keyword": "Scenario", - "name": "should skip steps after undefined multistep", - "description": "", - "line": 68, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"undefined.feature\" file:", - "line": 69, - "doc_string": { - "value": "Feature: run undefined multistep\n\n Scenario: run undefined multistep\n Given passing step\n When undefined multistep\n Then passing multistep", - "content_type": "", - "line": 70 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 78, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 79, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be passed:", - "line": 80, - "doc_string": { - "value": "passing step", - "content_type": "", - "line": 81 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be undefined:", - "line": 84, - "doc_string": { - "value": "undefined multistep", - "content_type": "", - "line": 85 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be skipped:", - "line": 88, - "doc_string": { - "value": "passing multistep", - "content_type": "", - "line": 89 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features-with-nested-steps;should-match-undefined-steps-in-a-row", - "keyword": "Scenario", - "name": "should match undefined steps in a row", - "description": "", - "line": 93, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"undefined.feature\" file:", - "line": 94, - "doc_string": { - "value": "Feature: undefined feature\n\n Scenario: parse a scenario\n Given undefined step\n When undefined multistep\n Then I should have 1 scenario registered", - "content_type": "", - "line": 95 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 103, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 104, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be undefined:", - "line": 105, - "doc_string": { - "value": "undefined step\nundefined multistep", - "content_type": "", - "line": 106 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be skipped:", - "line": 110, - "doc_string": { - "value": "I should have 1 scenario registered", - "content_type": "", - "line": 111 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features-with-nested-steps;should-mark-undefined-steps-after-pending", - "keyword": "Scenario", - "name": "should mark undefined steps after pending", - "description": "", - "line": 115, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"pending.feature\" file:", - "line": 116, - "doc_string": { - "value": "Feature: pending feature\n\n Scenario: parse a scenario\n Given pending step\n When undefined step\n Then undefined multistep\n And I should have 1 scenario registered", - "content_type": "", - "line": 117 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 126, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 127, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be undefined:", - "line": 128, - "doc_string": { - "value": "undefined step\nundefined multistep", - "content_type": "", - "line": 129 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be pending:", - "line": 133, - "doc_string": { - "value": "pending step", - "content_type": "", - "line": 134 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be skipped:", - "line": 137, - "doc_string": { - "value": "I should have 1 scenario registered", - "content_type": "", - "line": 138 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - }, - { - "uri": "features/outline.feature", - "id": "run-outline", - "keyword": "Feature", - "name": "run outline", - "description": " In order to test application behavior\n As a test suite\n I need to be able to run outline scenarios", - "line": 1, - "elements": [ - { - "id": "run-outline;should-run-a-normal-outline", - "keyword": "Scenario", - "name": "should run a normal outline", - "description": "", - "line": 6, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 7, - "doc_string": { - "value": "Feature: outline\n\n Background:\n Given passing step\n\n Scenario Outline: parse a scenario\n Given a feature path \"\u003cpath\u003e\"\n When I parse features\n Then I should have \u003cnum\u003e scenario registered\n\n Examples:\n | path | num |\n | features/load.feature:6 | 1 |\n | features/load.feature:3 | 0 |", - "content_type": "", - "line": 8 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 24, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 25, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 26, - "doc_string": { - "value": "a passing step\nI parse features\na feature path \"features/load.feature:6\"\na feature path \"features/load.feature:3\"\nI should have 1 scenario registered\nI should have 0 scenario registered", - "content_type": "", - "line": 27 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-outline;should-continue-through-examples-on-failure", - "keyword": "Scenario", - "name": "should continue through examples on failure", - "description": "", - "line": 36, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 37, - "doc_string": { - "value": "Feature: outline\n\n Background:\n Given passing step\n\n Scenario Outline: parse a scenario\n Given a feature path \"\u003cpath\u003e\"\n When I parse features\n Then I should have \u003cnum\u003e scenario registered\n\n Examples:\n | path | num |\n | features/load.feature:6 | 5 |\n | features/load.feature:3 | 0 |", - "content_type": "", - "line": 38 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 54, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have failed", - "line": 55, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 56, - "doc_string": { - "value": "a passing step\nI parse features\na feature path \"features/load.feature:6\"\na feature path \"features/load.feature:3\"\nI should have 0 scenario registered", - "content_type": "", - "line": 57 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be failed:", - "line": 64, - "doc_string": { - "value": "I should have 5 scenario registered", - "content_type": "", - "line": 65 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-outline;should-skip-examples-on-background-failure", - "keyword": "Scenario", - "name": "should skip examples on background failure", - "description": "", - "line": 69, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 70, - "doc_string": { - "value": "Feature: outline\n\n Background:\n Given a failing step\n\n Scenario Outline: parse a scenario\n Given a feature path \"\u003cpath\u003e\"\n When I parse features\n Then I should have \u003cnum\u003e scenario registered\n\n Examples:\n | path | num |\n | features/load.feature:6 | 1 |\n | features/load.feature:3 | 0 |", - "content_type": "", - "line": 71 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 87, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have failed", - "line": 88, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be skipped:", - "line": 89, - "doc_string": { - "value": "I parse features\na feature path \"features/load.feature:6\"\na feature path \"features/load.feature:3\"\nI should have 0 scenario registered\nI should have 1 scenario registered", - "content_type": "", - "line": 90 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be failed:", - "line": 97, - "doc_string": { - "value": "a failing step", - "content_type": "", - "line": 98 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-outline;should-translate-step-table-body", - "keyword": "Scenario", - "name": "should translate step table body", - "description": "", - "line": 102, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 103, - "doc_string": { - "value": "Feature: outline\n\n Background:\n Given I'm listening to suite events\n\n Scenario Outline: run with events\n Given a feature path \"\u003cpath\u003e\"\n When I run feature suite\n Then these events had to be fired for a number of times:\n | BeforeScenario | \u003cscen\u003e |\n | BeforeStep | \u003cstep\u003e |\n\n Examples:\n | path | scen | step |\n | features/load.feature:6 | 1 | 3 |\n | features/load.feature | 6 | 19 |", - "content_type": "", - "line": 104 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 122, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 123, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 124, - "doc_string": { - "value": "I'm listening to suite events\nI run feature suite\na feature path \"features/load.feature:6\"\na feature path \"features/load.feature\"", - "content_type": "", - "line": 125 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-outline;should-translate-step-doc-string-argument;;2", - "keyword": "Scenario Outline", - "name": "should translate step doc string argument", - "description": "", - "line": 151, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 151, - "doc_string": { - "value": "Feature: scenario events\n\n Background:\n Given I'm listening to suite events\n\n Scenario: run with events\n Given a feature path \"features/load.feature:6\"\n When I run feature suite\n Then these events had to be fired for a number of times:\n | BeforeScenario | 1 |", - "content_type": "", - "line": 134 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 151, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 151, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-outline;should-translate-step-doc-string-argument;;3", - "keyword": "Scenario Outline", - "name": "should translate step doc string argument", - "description": "", - "line": 152, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 152, - "doc_string": { - "value": "Feature: scenario events\n\n Background:\n Given I'm listening to suite events\n\n Scenario: run with events\n Given a feature path \"features/load.feature\"\n When I run feature suite\n Then these events had to be fired for a number of times:\n | BeforeScenario | 6 |", - "content_type": "", - "line": 134 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 152, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 152, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - }, - { - "uri": "features/run.feature", - "id": "run-features", - "keyword": "Feature", - "name": "run features", - "description": " In order to test application behavior\n As a test suite\n I need to be able to run features", - "line": 1, - "elements": [ - { - "id": "run-features;should-run-a-normal-feature", - "keyword": "Scenario", - "name": "should run a normal feature", - "description": "", - "line": 6, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 7, - "doc_string": { - "value": "Feature: normal feature\n\n Scenario: parse a scenario\n Given a feature path \"features/load.feature:6\"\n When I parse features\n Then I should have 1 scenario registered", - "content_type": "", - "line": 8 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 16, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 17, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 18, - "doc_string": { - "value": "a feature path \"features/load.feature:6\"\nI parse features\nI should have 1 scenario registered", - "content_type": "", - "line": 19 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-skip-steps-after-failure", - "keyword": "Scenario", - "name": "should skip steps after failure", - "description": "", - "line": 25, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"failed.feature\" file:", - "line": 26, - "doc_string": { - "value": "Feature: failed feature\n\n Scenario: parse a scenario\n Given a failing step\n When I parse features\n Then I should have 1 scenario registered", - "content_type": "", - "line": 27 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 35, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have failed", - "line": 36, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be failed:", - "line": 37, - "doc_string": { - "value": "a failing step", - "content_type": "", - "line": 38 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be skipped:", - "line": 41, - "doc_string": { - "value": "I parse features\nI should have 1 scenario registered", - "content_type": "", - "line": 42 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-skip-all-scenarios-if-background-fails", - "keyword": "Scenario", - "name": "should skip all scenarios if background fails", - "description": "", - "line": 47, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"failed.feature\" file:", - "line": 48, - "doc_string": { - "value": "Feature: failed feature\n\n Background:\n Given a failing step\n\n Scenario: parse a scenario\n Given a feature path \"features/load.feature:6\"\n When I parse features\n Then I should have 1 scenario registered", - "content_type": "", - "line": 49 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 60, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have failed", - "line": 61, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be failed:", - "line": 62, - "doc_string": { - "value": "a failing step", - "content_type": "", - "line": 63 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be skipped:", - "line": 66, - "doc_string": { - "value": "a feature path \"features/load.feature:6\"\nI parse features\nI should have 1 scenario registered", - "content_type": "", - "line": 67 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-skip-steps-after-undefined", - "keyword": "Scenario", - "name": "should skip steps after undefined", - "description": "", - "line": 73, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"undefined.feature\" file:", - "line": 74, - "doc_string": { - "value": "Feature: undefined feature\n\n Scenario: parse a scenario\n Given a feature path \"features/load.feature:6\"\n When undefined action\n Then I should have 1 scenario registered", - "content_type": "", - "line": 75 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 83, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 84, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be passed:", - "line": 85, - "doc_string": { - "value": "a feature path \"features/load.feature:6\"", - "content_type": "", - "line": 86 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be undefined:", - "line": 89, - "doc_string": { - "value": "undefined action", - "content_type": "", - "line": 90 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be skipped:", - "line": 93, - "doc_string": { - "value": "I should have 1 scenario registered", - "content_type": "", - "line": 94 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-match-undefined-steps-in-a-row", - "keyword": "Scenario", - "name": "should match undefined steps in a row", - "description": "", - "line": 98, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"undefined.feature\" file:", - "line": 99, - "doc_string": { - "value": "Feature: undefined feature\n\n Scenario: parse a scenario\n Given undefined step\n When undefined action\n Then I should have 1 scenario registered", - "content_type": "", - "line": 100 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 108, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 109, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be undefined:", - "line": 110, - "doc_string": { - "value": "undefined step\nundefined action", - "content_type": "", - "line": 111 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be skipped:", - "line": 115, - "doc_string": { - "value": "I should have 1 scenario registered", - "content_type": "", - "line": 116 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-skip-steps-on-pending", - "keyword": "Scenario", - "name": "should skip steps on pending", - "description": "", - "line": 120, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"pending.feature\" file:", - "line": 121, - "doc_string": { - "value": "Feature: pending feature\n\n Scenario: parse a scenario\n Given undefined step\n When pending step\n Then I should have 1 scenario registered", - "content_type": "", - "line": 122 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 130, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 131, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be undefined:", - "line": 132, - "doc_string": { - "value": "undefined step", - "content_type": "", - "line": 133 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be skipped:", - "line": 136, - "doc_string": { - "value": "pending step\nI should have 1 scenario registered", - "content_type": "", - "line": 137 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-handle-pending-step", - "keyword": "Scenario", - "name": "should handle pending step", - "description": "", - "line": 142, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"pending.feature\" file:", - "line": 143, - "doc_string": { - "value": "Feature: pending feature\n\n Scenario: parse a scenario\n Given a feature path \"features/load.feature:6\"\n When pending step\n Then I should have 1 scenario registered", - "content_type": "", - "line": 144 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 152, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 153, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be passed:", - "line": 154, - "doc_string": { - "value": "a feature path \"features/load.feature:6\"", - "content_type": "", - "line": 155 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be pending:", - "line": 158, - "doc_string": { - "value": "pending step", - "content_type": "", - "line": 159 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be skipped:", - "line": 162, - "doc_string": { - "value": "I should have 1 scenario registered", - "content_type": "", - "line": 163 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-mark-undefined-steps-after-pending", - "keyword": "Scenario", - "name": "should mark undefined steps after pending", - "description": "", - "line": 167, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"pending.feature\" file:", - "line": 168, - "doc_string": { - "value": "Feature: pending feature\n\n Scenario: parse a scenario\n Given pending step\n When undefined\n Then undefined 2\n And I should have 1 scenario registered", - "content_type": "", - "line": 169 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 178, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 179, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be undefined:", - "line": 180, - "doc_string": { - "value": "undefined\nundefined 2", - "content_type": "", - "line": 181 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be pending:", - "line": 185, - "doc_string": { - "value": "pending step", - "content_type": "", - "line": 186 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following step should be skipped:", - "line": 189, - "doc_string": { - "value": "I should have 1 scenario registered", - "content_type": "", - "line": 190 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-fail-suite-if-undefined-steps-follow-after-the-failure", - "keyword": "Scenario", - "name": "should fail suite if undefined steps follow after the failure", - "description": "", - "line": 194, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"failed.feature\" file:", - "line": 195, - "doc_string": { - "value": "Feature: failed feature\n\n Scenario: parse a scenario\n Given a failing step\n When an undefined step\n Then another undefined step", - "content_type": "", - "line": 196 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 204, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the following step should be failed:", - "line": 205, - "doc_string": { - "value": "a failing step", - "content_type": "", - "line": 206 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be undefined:", - "line": 209, - "doc_string": { - "value": "an undefined step\nanother undefined step", - "content_type": "", - "line": 210 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the suite should have failed", - "line": 214, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-fail-suite-and-skip-pending-step-after-failed-step", - "keyword": "Scenario", - "name": "should fail suite and skip pending step after failed step", - "description": "", - "line": 216, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"failed.feature\" file:", - "line": 217, - "doc_string": { - "value": "Feature: failed feature\n\n Scenario: parse a scenario\n Given a failing step\n When pending step\n Then another undefined step", - "content_type": "", - "line": 218 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 226, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the following step should be failed:", - "line": 227, - "doc_string": { - "value": "a failing step", - "content_type": "", - "line": 228 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be skipped:", - "line": 231, - "doc_string": { - "value": "pending step", - "content_type": "", - "line": 232 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be undefined:", - "line": 235, - "doc_string": { - "value": "another undefined step", - "content_type": "", - "line": 236 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the suite should have failed", - "line": 239, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "run-features;should-fail-suite-and-skip-next-step-after-failed-step", - "keyword": "Scenario", - "name": "should fail suite and skip next step after failed step", - "description": "", - "line": 241, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"failed.feature\" file:", - "line": 242, - "doc_string": { - "value": "Feature: failed feature\n\n Scenario: parse a scenario\n Given a failing step\n When a failing step\n Then another undefined step", - "content_type": "", - "line": 243 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 251, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the following step should be failed:", - "line": 252, - "doc_string": { - "value": "a failing step", - "content_type": "", - "line": 253 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be skipped:", - "line": 256, - "doc_string": { - "value": "a failing step", - "content_type": "", - "line": 257 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be undefined:", - "line": 260, - "doc_string": { - "value": "another undefined step", - "content_type": "", - "line": 261 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the suite should have failed", - "line": 264, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - }, - { - "uri": "features/snippets.feature", - "id": "undefined-step-snippets", - "keyword": "Feature", - "name": "undefined step snippets", - "description": " In order to implement step definitions faster\n As a test suite user\n I need to be able to get undefined step snippets", - "line": 1, - "elements": [ - { - "id": "undefined-step-snippets;should-generate-snippets", - "keyword": "Scenario", - "name": "should generate snippets", - "description": "", - "line": 6, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"undefined.feature\" file:", - "line": 7, - "doc_string": { - "value": "Feature: undefined steps\n\n Scenario: get version number from api\n When I send \"GET\" request to \"/version\"\n Then the response code should be 200", - "content_type": "", - "line": 8 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 15, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the following steps should be undefined:", - "line": 16, - "doc_string": { - "value": "I send \"GET\" request to \"/version\"\nthe response code should be 200", - "content_type": "", - "line": 17 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the undefined step snippets should be:", - "line": 21, - "doc_string": { - "value": "func iSendRequestTo(arg1, arg2 string) error {\n return godog.ErrPending\n}\n\nfunc theResponseCodeShouldBe(arg1 int) error {\n return godog.ErrPending\n}\n\nfunc FeatureContext(s *godog.Suite) {\n s.Step(`^I send \"([^\"]*)\" request to \"([^\"]*)\"$`, iSendRequestTo)\n s.Step(`^the response code should be (\\d+)$`, theResponseCodeShouldBe)\n}", - "content_type": "", - "line": 22 - }, - "match": { - "location": "suite_context.go:57" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "undefined-step-snippets;should-generate-snippets-with-more-arguments", - "keyword": "Scenario", - "name": "should generate snippets with more arguments", - "description": "", - "line": 37, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"undefined.feature\" file:", - "line": 38, - "doc_string": { - "value": "Feature: undefined steps\n\n Scenario: get version number from api\n When I send \"GET\" request to \"/version\" with:\n | col1 | val1 |\n | col2 | val2 |\n Then the response code should be 200 and header \"X-Powered-By\" should be \"godog\"", - "content_type": "", - "line": 39 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 48, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the undefined step snippets should be:", - "line": 49, - "doc_string": { - "value": "func iSendRequestToWith(arg1, arg2 string, arg3 *gherkin.DataTable) error {\n return godog.ErrPending\n}\n\nfunc theResponseCodeShouldBeAndHeaderShouldBe(arg1 int, arg2, arg3 string) error {\n return godog.ErrPending\n}\n\nfunc FeatureContext(s *godog.Suite) {\n s.Step(`^I send \"([^\"]*)\" request to \"([^\"]*)\" with:$`, iSendRequestToWith)\n s.Step(`^the response code should be (\\d+) and header \"([^\"]*)\" should be \"([^\"]*)\"$`, theResponseCodeShouldBeAndHeaderShouldBe)\n}", - "content_type": "", - "line": 50 - }, - "match": { - "location": "suite_context.go:57" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "undefined-step-snippets;should-handle-escaped-symbols", - "keyword": "Scenario", - "name": "should handle escaped symbols", - "description": "", - "line": 65, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"undefined.feature\" file:", - "line": 66, - "doc_string": { - "value": "Feature: undefined steps\n\n Scenario: get version number from api\n When I pull from github.com\n Then the project should be there", - "content_type": "", - "line": 67 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 74, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the following steps should be undefined:", - "line": 75, - "doc_string": { - "value": "I pull from github.com\nthe project should be there", - "content_type": "", - "line": 76 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the undefined step snippets should be:", - "line": 80, - "doc_string": { - "value": "func iPullFromGithubcom() error {\n return godog.ErrPending\n}\n\nfunc theProjectShouldBeThere() error {\n return godog.ErrPending\n}\n\nfunc FeatureContext(s *godog.Suite) {\n s.Step(`^I pull from github\\.com$`, iPullFromGithubcom)\n s.Step(`^the project should be there$`, theProjectShouldBeThere)\n}", - "content_type": "", - "line": 81 - }, - "match": { - "location": "suite_context.go:57" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "undefined-step-snippets;should-handle-string-argument-followed-by-comma", - "keyword": "Scenario", - "name": "should handle string argument followed by comma", - "description": "", - "line": 96, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"undefined.feature\" file:", - "line": 97, - "doc_string": { - "value": "Feature: undefined\n\n Scenario: add item to basket\n Given there is a \"Sith Lord Lightsaber\", which costs £5\n When I add the \"Sith Lord Lightsaber\" to the basket", - "content_type": "", - "line": 98 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 105, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the undefined step snippets should be:", - "line": 106, - "doc_string": { - "value": "func thereIsAWhichCosts(arg1 string, arg2 int) error {\n return godog.ErrPending\n}\n\nfunc iAddTheToTheBasket(arg1 string) error {\n return godog.ErrPending\n}\n\nfunc FeatureContext(s *godog.Suite) {\n s.Step(`^there is a \"([^\"]*)\", which costs £(\\d+)$`, thereIsAWhichCosts)\n s.Step(`^I add the \"([^\"]*)\" to the basket$`, iAddTheToTheBasket)\n}", - "content_type": "", - "line": 107 - }, - "match": { - "location": "suite_context.go:57" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "undefined-step-snippets;should-handle-arguments-in-the-beggining-or-end-of-the-step", - "keyword": "Scenario", - "name": "should handle arguments in the beggining or end of the step", - "description": "", - "line": 122, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"undefined.feature\" file:", - "line": 123, - "doc_string": { - "value": "Feature: undefined\n\n Scenario: add item to basket\n Given \"Sith Lord Lightsaber\", which costs £5\n And 12 godogs", - "content_type": "", - "line": 124 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite", - "line": 131, - "match": { - "location": "suite_context.go:41" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the undefined step snippets should be:", - "line": 132, - "doc_string": { - "value": "func whichCosts(arg1 string, arg2 int) error {\n return godog.ErrPending\n}\n\nfunc godogs(arg1 int) error {\n return godog.ErrPending\n}\n\nfunc FeatureContext(s *godog.Suite) {\n s.Step(`^\"([^\"]*)\", which costs £(\\d+)$`, whichCosts)\n s.Step(`^(\\d+) godogs$`, godogs)\n}", - "content_type": "", - "line": 133 - }, - "match": { - "location": "suite_context.go:57" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - }, - { - "uri": "features/tags.feature", - "id": "tag-filters", - "keyword": "Feature", - "name": "tag filters", - "description": " In order to test application behavior\n As a test suite\n I need to be able to filter features and scenarios by tags", - "line": 1, - "elements": [ - { - "id": "tag-filters;should-filter-outline-examples-by-tags", - "keyword": "Scenario", - "name": "should filter outline examples by tags", - "description": "", - "line": 6, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 7, - "doc_string": { - "value": "Feature: outline\n\n Background:\n Given passing step\n\n Scenario Outline: parse a scenario\n Given a feature path \"\u003cpath\u003e\"\n When I parse features\n Then I should have \u003cnum\u003e scenario registered\n\n Examples:\n | path | num |\n | features/load.feature:3 | 0 |\n\n @used\n Examples:\n | path | num |\n | features/load.feature:6 | 1 |", - "content_type": "", - "line": 8 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with tags \"@used\"", - "line": 28, - "match": { - "location": "suite_context.go:42" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 29, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 30, - "doc_string": { - "value": "I parse features\na feature path \"features/load.feature:6\"\nI should have 1 scenario registered", - "content_type": "", - "line": 31 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "I should have 1 scenario registered", - "line": 36, - "match": { - "location": "suite_context.go:48" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "tag-filters;should-filter-scenarios-by-x-tag", - "keyword": "Scenario", - "name": "should filter scenarios by X tag", - "description": "", - "line": 38, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 39, - "doc_string": { - "value": "Feature: tagged\n\n @x\n Scenario: one\n Given a feature path \"one\"\n\n @x\n Scenario: two\n Given a feature path \"two\"\n\n @x @y\n Scenario: three\n Given a feature path \"three\"\n\n @y\n Scenario: four\n Given a feature path \"four\"", - "content_type": "", - "line": 40 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with tags \"@x\"", - "line": 59, - "match": { - "location": "suite_context.go:42" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 60, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "I should have 3 scenario registered", - "line": 61, - "match": { - "location": "suite_context.go:48" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 62, - "doc_string": { - "value": "a feature path \"one\"\na feature path \"two\"\na feature path \"three\"", - "content_type": "", - "line": 63 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "tag-filters;should-filter-scenarios-by-x-tag-not-having-y", - "keyword": "Scenario", - "name": "should filter scenarios by X tag not having Y", - "description": "", - "line": 69, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 70, - "doc_string": { - "value": "Feature: tagged\n\n @x\n Scenario: one\n Given a feature path \"one\"\n\n @x\n Scenario: two\n Given a feature path \"two\"\n\n @x @y\n Scenario: three\n Given a feature path \"three\"\n\n @y @z\n Scenario: four\n Given a feature path \"four\"", - "content_type": "", - "line": 71 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with tags \"@x \u0026\u0026 ~@y\"", - "line": 90, - "match": { - "location": "suite_context.go:42" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 91, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "I should have 2 scenario registered", - "line": 92, - "match": { - "location": "suite_context.go:48" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 93, - "doc_string": { - "value": "a feature path \"one\"\na feature path \"two\"", - "content_type": "", - "line": 94 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - }, - { - "id": "tag-filters;should-filter-scenarios-having-y-and-z-tags", - "keyword": "Scenario", - "name": "should filter scenarios having Y and Z tags", - "description": "", - "line": 99, - "type": "scenario", - "steps": [ - { - "keyword": "Given ", - "name": "a feature \"normal.feature\" file:", - "line": 100, - "doc_string": { - "value": "Feature: tagged\n\n @x\n Scenario: one\n Given a feature path \"one\"\n\n @x\n Scenario: two\n Given a feature path \"two\"\n\n @x @y\n Scenario: three\n Given a feature path \"three\"\n\n @y @z\n Scenario: four\n Given a feature path \"four\"", - "content_type": "", - "line": 101 - }, - "match": { - "location": "suite_context.go:44" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "When ", - "name": "I run feature suite with tags \"@y \u0026\u0026 @z\"", - "line": 120, - "match": { - "location": "suite_context.go:42" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "Then ", - "name": "the suite should have passed", - "line": 121, - "match": { - "location": "suite_context.go:45" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "I should have 1 scenario registered", - "line": 122, - "match": { - "location": "suite_context.go:48" - }, - "result": { - "status": "passed", - "duration": 0 - } - }, - { - "keyword": "And ", - "name": "the following steps should be passed:", - "line": 123, - "doc_string": { - "value": "a feature path \"four\"", - "content_type": "", - "line": 124 - }, - "match": { - "location": "suite_context.go:55" - }, - "result": { - "status": "passed", - "duration": 0 - } - } - ] - } - ] - } -] \ No newline at end of file diff --git a/fixtures/fixtures.go b/fixtures/fixtures.go deleted file mode 100644 index caaa981..0000000 --- a/fixtures/fixtures.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build go1.12 - -package fixtures - -const OutputFilenameProgress = "fixtures/progress_output.txt" -const OutputFilenameJUnit = "fixtures/junit_output.xml" -const OutputFilenameCucumber = "fixtures/cucumber_output.json" diff --git a/fixtures/fixtures_go111.go b/fixtures/fixtures_go111.go deleted file mode 100644 index 9d4fcb9..0000000 --- a/fixtures/fixtures_go111.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build !go1.12 - -package fixtures - -const OutputFilenameProgress = "fixtures/progress_output.txt" -const OutputFilenameJUnit = "fixtures/junit_output.xml" -const OutputFilenameCucumber = "fixtures/cucumber_output_go111.json" diff --git a/fixtures/junit_output.xml b/fixtures/junit_output.xml index 2bd324f..92327ed 100644 --- a/fixtures/junit_output.xml +++ b/fixtures/junit_output.xml @@ -1,5 +1,5 @@ - + @@ -24,6 +24,17 @@ + + + + + + + + + + + diff --git a/fixtures/progress_output.txt b/fixtures/progress_output.txt index acecbd9..eb351bb 100644 --- a/fixtures/progress_output.txt +++ b/fixtures/progress_output.txt @@ -1,9 +1,9 @@ ...................................................................... 70 ...................................................................... 140 ...................................................................... 210 -....................................... 249 +.................................................................. 276 -60 scenarios (60 passed) -249 steps (249 passed) +69 scenarios (69 passed) +276 steps (276 passed) 0s \ No newline at end of file diff --git a/fmt_progress_test.go b/fmt_progress_test.go index e148788..9a04c65 100644 --- a/fmt_progress_test.go +++ b/fmt_progress_test.go @@ -76,14 +76,6 @@ func FeatureContext(s *godog.Suite) { shouldMatchOutput(expected, actual, t) } -func trimAllLines(s string) string { - var lines []string - for _, ln := range strings.Split(strings.TrimSpace(s), "\n") { - lines = append(lines, strings.TrimSpace(ln)) - } - return strings.Join(lines, "\n") -} - var basicGherkinFeature = ` Feature: basic @@ -114,7 +106,7 @@ func TestProgressFormatterWhenStepPanics(t *testing.T) { } out := buf.String() - if idx := strings.Index(out, "godog/fmt_progress_test.go:108"); idx == -1 { + if idx := strings.Index(out, "godog/fmt_progress_test.go:100"); idx == -1 { t.Fatalf("expected to find panic stacktrace, actual:\n%s", out) } } diff --git a/go.mod b/go.mod index 198afd0..7fcdb3a 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/cucumber/godog go 1.13 + +require github.com/stretchr/testify v1.4.0 diff --git a/go.sum b/go.sum index e69de29..8fdee58 100644 --- a/go.sum +++ b/go.sum @@ -0,0 +1,11 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/run_test.go b/run_test.go index 85e3ed6..6156c4c 100644 --- a/run_test.go +++ b/run_test.go @@ -6,11 +6,14 @@ import ( "io" "io/ioutil" "os" + "regexp" "strings" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/cucumber/godog/colors" - "github.com/cucumber/godog/fixtures" "github.com/cucumber/godog/gherkin" ) @@ -52,16 +55,12 @@ func TestPrintsNoStepDefinitionsIfNoneFound(t *testing.T) { s.printStepDefinitions(w) out := strings.TrimSpace(buf.String()) - if out != "there were no contexts registered, could not find any step definition.." { - t.Fatalf("expected output does not match to: %s", out) - } + assert.Equal(t, "there were no contexts registered, could not find any step definition..", out) } func TestFailsOrPassesBasedOnStrictModeWhenHasPendingSteps(t *testing.T) { feat, err := gherkin.ParseFeature(strings.NewReader(basicGherkinFeature)) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } + require.NoError(t, err) r := runner{ fmt: progressFunc("progress", ioutil.Discard), @@ -72,21 +71,15 @@ func TestFailsOrPassesBasedOnStrictModeWhenHasPendingSteps(t *testing.T) { }, } - if r.run() { - t.Fatal("the suite should have passed") - } + assert.False(t, r.run()) r.strict = true - if !r.run() { - t.Fatal("the suite should have failed") - } + assert.True(t, r.run()) } func TestFailsOrPassesBasedOnStrictModeWhenHasUndefinedSteps(t *testing.T) { feat, err := gherkin.ParseFeature(strings.NewReader(basicGherkinFeature)) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } + require.NoError(t, err) r := runner{ fmt: progressFunc("progress", ioutil.Discard), @@ -97,21 +90,15 @@ func TestFailsOrPassesBasedOnStrictModeWhenHasUndefinedSteps(t *testing.T) { }, } - if r.run() { - t.Fatal("the suite should have passed") - } + assert.False(t, r.run()) r.strict = true - if !r.run() { - t.Fatal("the suite should have failed") - } + assert.True(t, r.run()) } func TestShouldFailOnError(t *testing.T) { feat, err := gherkin.ParseFeature(strings.NewReader(basicGherkinFeature)) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } + require.NoError(t, err) r := runner{ fmt: progressFunc("progress", ioutil.Discard), @@ -122,9 +109,7 @@ func TestShouldFailOnError(t *testing.T) { }, } - if !r.run() { - t.Fatal("the suite should have failed") - } + assert.True(t, r.run()) } func TestFailsWithConcurrencyOptionError(t *testing.T) { @@ -140,20 +125,15 @@ func TestFailsWithConcurrencyOptionError(t *testing.T) { } status := RunWithOptions("fails", func(_ *Suite) {}, opt) - if status != exitOptionError { - t.Fatalf("expected exit status to be 2, but was: %d", status) - } + require.Equal(t, exitOptionError, status) + closer() b, err := ioutil.ReadAll(stderr) - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) out := strings.TrimSpace(string(b)) - if out != `format "pretty" does not support concurrent execution` { - t.Fatalf("unexpected error output: \"%s\"", out) - } + assert.Equal(t, `format "pretty" does not support concurrent execution`, out) } func TestFailsWithUnknownFormatterOptionError(t *testing.T) { @@ -168,20 +148,15 @@ func TestFailsWithUnknownFormatterOptionError(t *testing.T) { } status := RunWithOptions("fails", func(_ *Suite) {}, opt) - if status != exitOptionError { - t.Fatalf("expected exit status to be 2, but was: %d", status) - } + require.Equal(t, exitOptionError, status) + closer() b, err := ioutil.ReadAll(stderr) - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) out := strings.TrimSpace(string(b)) - if !strings.Contains(out, `unregistered formatter name: "unknown", use one of`) { - t.Fatalf("unexpected error output: %q", out) - } + assert.Contains(t, out, `unregistered formatter name: "unknown", use one of`) } func TestFailsWithOptionErrorWhenLookingForFeaturesInUnavailablePath(t *testing.T) { @@ -196,20 +171,15 @@ func TestFailsWithOptionErrorWhenLookingForFeaturesInUnavailablePath(t *testing. } status := RunWithOptions("fails", func(_ *Suite) {}, opt) - if status != exitOptionError { - t.Fatalf("expected exit status to be 2, but was: %d", status) - } + require.Equal(t, exitOptionError, status) + closer() b, err := ioutil.ReadAll(stderr) - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) out := strings.TrimSpace(string(b)) - if out != `feature path "unavailable" is not available` { - t.Fatalf("unexpected error output: \"%s\"", out) - } + assert.Equal(t, `feature path "unavailable" is not available`, out) } func TestByDefaultRunsFeaturesPath(t *testing.T) { @@ -221,24 +191,18 @@ func TestByDefaultRunsFeaturesPath(t *testing.T) { status := RunWithOptions("fails", func(_ *Suite) {}, opt) // should fail in strict mode due to undefined steps - if status != exitFailure { - t.Fatalf("expected exit status to be 1, but was: %d", status) - } + assert.Equal(t, exitFailure, status) opt.Strict = false status = RunWithOptions("succeeds", func(_ *Suite) {}, opt) // should succeed in non strict mode due to undefined steps - if status != exitSuccess { - t.Fatalf("expected exit status to be 0, but was: %d", status) - } + assert.Equal(t, exitSuccess, status) } func bufErrorPipe(t *testing.T) (io.ReadCloser, func()) { stderr := os.Stderr r, w, err := os.Pipe() - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) os.Stderr = w return r, func() { @@ -266,14 +230,10 @@ func TestFeatureFilePathParser(t *testing.T) { {"D:\\home\\test.feature:3", "D:\\home\\test.feature", 3}, } - for i, c := range cases { + for _, c := range cases { p, ln := extractFeaturePathLine(c.input) - if p != c.path { - t.Fatalf(`result path "%s" != "%s" at %d`, p, c.path, i) - } - if ln != c.line { - t.Fatalf(`result line "%d" != "%d" at %d`, ln, c.line, i) - } + assert.Equal(t, p, c.path) + assert.Equal(t, ln, c.line) } } @@ -285,16 +245,14 @@ type succeedRunTestCase struct { func TestSucceedRun(t *testing.T) { testCases := []succeedRunTestCase{ - {format: "progress", concurrency: 4, filename: fixtures.OutputFilenameProgress}, - {format: "junit", concurrency: 4, filename: fixtures.OutputFilenameJUnit}, - {format: "cucumber", concurrency: 2, filename: fixtures.OutputFilenameCucumber}, + {format: "progress", concurrency: 4, filename: "fixtures/progress_output.txt"}, + {format: "junit", concurrency: 4, filename: "fixtures/junit_output.xml"}, + {format: "cucumber", concurrency: 2, filename: "fixtures/cucumber_output.json"}, } for _, tc := range testCases { expectedOutput, err := ioutil.ReadFile(tc.filename) - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) for concurrency := range make([]int, tc.concurrency) { t.Run( @@ -319,17 +277,16 @@ func testSucceedRun(t *testing.T, format string, concurrency int, expectedOutput } status := RunWithOptions("succeed", func(s *Suite) { SuiteContext(s) }, opt) - if status != exitSuccess { - t.Fatalf("expected exit status to be 0, but was: %d", status) - } + require.Equal(t, exitSuccess, status) b, err := ioutil.ReadAll(output) - if err != nil { - t.Fatal(err) - } + require.NoError(t, err) - out := strings.TrimSpace(string(b)) - if out != expectedOutput { - t.Fatalf("unexpected output: \"%s\"", out) - } + actual := strings.TrimSpace(string(b)) + + suiteCtxReg := regexp.MustCompile(`suite_context.go:\d+`) + expectedOutput = suiteCtxReg.ReplaceAllString(expectedOutput, `suite_context.go:0`) + actual = suiteCtxReg.ReplaceAllString(actual, `suite_context.go:0`) + + assert.Equalf(t, expectedOutput, actual, "[%s]", actual) } diff --git a/suite_context.go b/suite_context.go index a771168..a6162e8 100644 --- a/suite_context.go +++ b/suite_context.go @@ -11,6 +11,7 @@ import ( "strconv" "strings" + "github.com/cucumber/godog/colors" "github.com/cucumber/godog/gherkin" ) @@ -74,6 +75,9 @@ func SuiteContext(s *Suite, additionalContextInitializers ...func(suite *Suite)) // Introduced to test formatter/cucumber.feature s.Step(`^the rendered json will be as follows:$`, c.theRenderJSONWillBe) + // Introduced to test formatter/pretty.feature + s.Step(`^the rendered output will be as follows:$`, c.theRenderOutputWillBe) + s.Step(`^(?:a )?failing multistep$`, func() Steps { return Steps{"passing step", "failing step"} }) @@ -133,7 +137,8 @@ func (s *suiteContext) iRunFeatureSuiteWithFormatter(name string) error { if f == nil { return fmt.Errorf(`formatter "%s" is not available`, name) } - s.testedSuite.fmt = f("godog", &s.out) + + s.testedSuite.fmt = f("godog", colors.Uncolored(&s.out)) if err := s.parseFeatures(); err != nil { return err } @@ -457,14 +462,14 @@ func (s *suiteContext) theseEventsHadToBeFiredForNumberOfTimes(tbl *gherkin.Data } func (s *suiteContext) theRenderJSONWillBe(docstring *gherkin.DocString) error { - loc := regexp.MustCompile(`"suite_context.go:\d+"`) + suiteCtxReg := regexp.MustCompile(`suite_context.go:\d+`) var expected []cukeFeatureJSON - if err := json.Unmarshal([]byte(loc.ReplaceAllString(docstring.Content, `"suite_context.go:0"`)), &expected); err != nil { + if err := json.Unmarshal([]byte(suiteCtxReg.ReplaceAllString(docstring.Content, `suite_context.go:0`)), &expected); err != nil { return err } var actual []cukeFeatureJSON - replaced := loc.ReplaceAllString(s.out.String(), `"suite_context.go:0"`) + replaced := suiteCtxReg.ReplaceAllString(s.out.String(), `suite_context.go:0`) if err := json.Unmarshal([]byte(replaced), &actual); err != nil { return err } @@ -475,6 +480,21 @@ func (s *suiteContext) theRenderJSONWillBe(docstring *gherkin.DocString) error { return nil } +func (s *suiteContext) theRenderOutputWillBe(docstring *gherkin.DocString) error { + suiteCtxReg := regexp.MustCompile(`suite_context.go:\d+`) + + expected := trimAllLines(strings.TrimSpace(docstring.Content)) + expected = suiteCtxReg.ReplaceAllString(expected, `suite_context.go:0`) + actual := trimAllLines(strings.TrimSpace(s.out.String())) + actual = suiteCtxReg.ReplaceAllString(actual, `suite_context.go:0`) + + if expected != actual { + return fmt.Errorf("expected output\n%s\ndoes not match actual:\n%s\n", expected, actual) + } + + return nil +} + type testFormatter struct { basefmt scenarios []interface{} diff --git a/suite_test.go b/suite_test.go deleted file mode 100644 index aabffe4..0000000 --- a/suite_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package godog - -import ( - "os" - "strings" - "testing" - "time" -) - -func TestMain(m *testing.M) { - format := "progress" // non verbose mode - concurrency := 4 - - var specific bool - for _, arg := range os.Args[1:] { - if arg == "-test.v=true" { // go test transforms -v option - verbose mode - format = "pretty" - concurrency = 1 - break - } - if strings.Index(arg, "-test.run") == 0 { - specific = true - } - } - var status int - if !specific { - status = RunWithOptions("godog", func(s *Suite) { - GodogContext(s) - }, Options{ - Format: format, // pretty format for verbose mode, otherwise - progress - Paths: []string{"features"}, - Concurrency: concurrency, // concurrency for verbose mode is 1 - Randomize: time.Now().UnixNano(), // randomize scenario execution order - }) - } - - if st := m.Run(); st > status { - status = st - } - os.Exit(status) -} - -// needed in order to use godog cli -func GodogContext(s *Suite) { - SuiteContext(s) -} diff --git a/utils.go b/utils.go index 5dd53bb..403425d 100644 --- a/utils.go +++ b/utils.go @@ -26,3 +26,11 @@ func s(n int) string { var timeNowFunc = func() time.Time { return time.Now() } + +func trimAllLines(s string) string { + var lines []string + for _, ln := range strings.Split(strings.TrimSpace(s), "\n") { + lines = append(lines, strings.TrimSpace(ln)) + } + return strings.Join(lines, "\n") +}