Skip to content

Commit e4b59c3

Browse files
committed
Update samples
1 parent 9d5702e commit e4b59c3

44 files changed

Lines changed: 248 additions & 102 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

testdata/src/all-statuses.ndjson

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{"meta":{"protocolVersion":"31.0.0","implementation":{"name":"fake-cucumber","version":"123.45.6"},"cpu":{"name":"arm64"},"os":{"name":"darwin","version":"24.5.0"},"runtime":{"name":"Node.js","version":"24.4.1"},"ci":{"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429","buildNumber":"154666429","git":{"revision":"99684bcacf01d95875834d87903dcb072306c9ad","remote":"https://github.com/cucumber-ltd/shouty.rb.git","branch":"main"}}}}
1+
{"meta":{"protocolVersion":"31.1.0","implementation":{"name":"fake-cucumber","version":"123.45.6"},"cpu":{"name":"arm64"},"os":{"name":"darwin","version":"24.5.0"},"runtime":{"name":"Node.js","version":"24.4.1"},"ci":{"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429","buildNumber":"154666429","git":{"revision":"99684bcacf01d95875834d87903dcb072306c9ad","remote":"https://github.com/cucumber-ltd/shouty.rb.git","branch":"main"}}}}
22
{"source":{"data":"Feature: All statuses\n\n This sample exercises all the possible result statuses, which is useful\n for testing formatters and other tools.\n\n Scenario: Passing\n Given a step\n And a step\n And a step\n\n Scenario: Failing\n Given a step\n And a failing step\n And a step\n\n Scenario: Pending\n Given a step\n And a pending step\n And a step\n\n Scenario: Skipped\n Given a step\n And a skipped step\n And a step\n\n Scenario: Undefined\n Given a step\n And an undefined step\n And a step\n\n Scenario: Ambiguous\n Given a step\n And an ambiguous step\n And a step","uri":"samples/all-statuses/all-statuses.feature","mediaType":"text/x.cucumber.gherkin+plain"}}
33
{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"All statuses","description":" This sample exercises all the possible result statuses, which is useful\n for testing formatters and other tools.","children":[{"scenario":{"id":"3","tags":[],"location":{"line":6,"column":3},"keyword":"Scenario","name":"Passing","description":"","steps":[{"id":"0","location":{"line":7,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step"},{"id":"1","location":{"line":8,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step"},{"id":"2","location":{"line":9,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step"}],"examples":[]}},{"scenario":{"id":"7","tags":[],"location":{"line":11,"column":3},"keyword":"Scenario","name":"Failing","description":"","steps":[{"id":"4","location":{"line":12,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step"},{"id":"5","location":{"line":13,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a failing step"},{"id":"6","location":{"line":14,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step"}],"examples":[]}},{"scenario":{"id":"11","tags":[],"location":{"line":16,"column":3},"keyword":"Scenario","name":"Pending","description":"","steps":[{"id":"8","location":{"line":17,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step"},{"id":"9","location":{"line":18,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a pending step"},{"id":"10","location":{"line":19,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step"}],"examples":[]}},{"scenario":{"id":"15","tags":[],"location":{"line":21,"column":3},"keyword":"Scenario","name":"Skipped","description":"","steps":[{"id":"12","location":{"line":22,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step"},{"id":"13","location":{"line":23,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a skipped step"},{"id":"14","location":{"line":24,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step"}],"examples":[]}},{"scenario":{"id":"19","tags":[],"location":{"line":26,"column":3},"keyword":"Scenario","name":"Undefined","description":"","steps":[{"id":"16","location":{"line":27,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step"},{"id":"17","location":{"line":28,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"an undefined step"},{"id":"18","location":{"line":29,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step"}],"examples":[]}},{"scenario":{"id":"23","tags":[],"location":{"line":31,"column":3},"keyword":"Scenario","name":"Ambiguous","description":"","steps":[{"id":"20","location":{"line":32,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step"},{"id":"21","location":{"line":33,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"an ambiguous step"},{"id":"22","location":{"line":34,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step"}],"examples":[]}}]},"comments":[],"uri":"samples/all-statuses/all-statuses.feature"}}
44
{"pickle":{"id":"27","uri":"samples/all-statuses/all-statuses.feature","location":{"line":6,"column":3},"astNodeIds":["3"],"tags":[],"name":"Passing","language":"en","steps":[{"id":"24","text":"a step","type":"Context","astNodeIds":["0"]},{"id":"25","text":"a step","type":"Context","astNodeIds":["1"]},{"id":"26","text":"a step","type":"Context","astNodeIds":["2"]}]}}
@@ -7,19 +7,19 @@
77
{"pickle":{"id":"39","uri":"samples/all-statuses/all-statuses.feature","location":{"line":21,"column":3},"astNodeIds":["15"],"tags":[],"name":"Skipped","language":"en","steps":[{"id":"36","text":"a step","type":"Context","astNodeIds":["12"]},{"id":"37","text":"a skipped step","type":"Context","astNodeIds":["13"]},{"id":"38","text":"a step","type":"Context","astNodeIds":["14"]}]}}
88
{"pickle":{"id":"43","uri":"samples/all-statuses/all-statuses.feature","location":{"line":26,"column":3},"astNodeIds":["19"],"tags":[],"name":"Undefined","language":"en","steps":[{"id":"40","text":"a step","type":"Context","astNodeIds":["16"]},{"id":"41","text":"an undefined step","type":"Context","astNodeIds":["17"]},{"id":"42","text":"a step","type":"Context","astNodeIds":["18"]}]}}
99
{"pickle":{"id":"47","uri":"samples/all-statuses/all-statuses.feature","location":{"line":31,"column":3},"astNodeIds":["23"],"tags":[],"name":"Ambiguous","language":"en","steps":[{"id":"44","text":"a step","type":"Context","astNodeIds":["20"]},{"id":"45","text":"an ambiguous step","type":"Context","astNodeIds":["21"]},{"id":"46","text":"a step","type":"Context","astNodeIds":["22"]}]}}
10-
{"stepDefinition":{"id":"48","pattern":{"type":"CUCUMBER_EXPRESSION","source":"a step"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":3}}}}
11-
{"stepDefinition":{"id":"49","pattern":{"type":"CUCUMBER_EXPRESSION","source":"a failing step"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":5}}}}
12-
{"stepDefinition":{"id":"50","pattern":{"type":"CUCUMBER_EXPRESSION","source":"a pending step"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":9}}}}
13-
{"stepDefinition":{"id":"51","pattern":{"type":"CUCUMBER_EXPRESSION","source":"a skipped step"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":13}}}}
14-
{"stepDefinition":{"id":"52","pattern":{"type":"CUCUMBER_EXPRESSION","source":"an ambiguous step"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":17}}}}
15-
{"stepDefinition":{"id":"53","pattern":{"type":"CUCUMBER_EXPRESSION","source":"an ambiguous step"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":19}}}}
10+
{"stepDefinition":{"id":"48","pattern":{"type":"REGULAR_EXPRESSION","source":"^a step$"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":3}}}}
11+
{"stepDefinition":{"id":"49","pattern":{"type":"REGULAR_EXPRESSION","source":"^a failing step$"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":5}}}}
12+
{"stepDefinition":{"id":"50","pattern":{"type":"REGULAR_EXPRESSION","source":"^a pending step$"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":9}}}}
13+
{"stepDefinition":{"id":"51","pattern":{"type":"REGULAR_EXPRESSION","source":"^a skipped step$"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":13}}}}
14+
{"stepDefinition":{"id":"52","pattern":{"type":"REGULAR_EXPRESSION","source":"^an ambiguous (.*?)$"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":17}}}}
15+
{"stepDefinition":{"id":"53","pattern":{"type":"REGULAR_EXPRESSION","source":"^(.*?) ambiguous step$"},"sourceReference":{"uri":"samples/all-statuses/all-statuses.ts","location":{"line":19}}}}
1616
{"testRunStarted":{"id":"54","timestamp":{"seconds":0,"nanos":0}}}
1717
{"testCase":{"id":"55","pickleId":"27","testSteps":[{"id":"56","pickleStepId":"24","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"57","pickleStepId":"25","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"58","pickleStepId":"26","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}],"testRunStartedId":"54"}}
1818
{"testCase":{"id":"59","pickleId":"31","testSteps":[{"id":"60","pickleStepId":"28","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"61","pickleStepId":"29","stepDefinitionIds":["49"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"62","pickleStepId":"30","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}],"testRunStartedId":"54"}}
1919
{"testCase":{"id":"63","pickleId":"35","testSteps":[{"id":"64","pickleStepId":"32","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"65","pickleStepId":"33","stepDefinitionIds":["50"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"66","pickleStepId":"34","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}],"testRunStartedId":"54"}}
2020
{"testCase":{"id":"67","pickleId":"39","testSteps":[{"id":"68","pickleStepId":"36","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"69","pickleStepId":"37","stepDefinitionIds":["51"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"70","pickleStepId":"38","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}],"testRunStartedId":"54"}}
2121
{"testCase":{"id":"71","pickleId":"43","testSteps":[{"id":"72","pickleStepId":"40","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"73","pickleStepId":"41","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"74","pickleStepId":"42","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}],"testRunStartedId":"54"}}
22-
{"testCase":{"id":"75","pickleId":"47","testSteps":[{"id":"76","pickleStepId":"44","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"77","pickleStepId":"45","stepDefinitionIds":["52","53"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]},{"stepMatchArguments":[]}]},{"id":"78","pickleStepId":"46","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}],"testRunStartedId":"54"}}
22+
{"testCase":{"id":"75","pickleId":"47","testSteps":[{"id":"76","pickleStepId":"44","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"77","pickleStepId":"45","stepDefinitionIds":["52","53"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":13,"value":"step"}}]},{"stepMatchArguments":[{"group":{"start":0,"value":"an"}}]}]},{"id":"78","pickleStepId":"46","stepDefinitionIds":["48"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}],"testRunStartedId":"54"}}
2323
{"testCaseStarted":{"id":"79","testCaseId":"55","timestamp":{"seconds":0,"nanos":1000000},"attempt":0}}
2424
{"testStepStarted":{"testCaseStartedId":"79","testStepId":"56","timestamp":{"seconds":0,"nanos":2000000}}}
2525
{"testStepFinished":{"testCaseStartedId":"79","testStepId":"56","testStepResult":{"status":"PASSED","duration":{"seconds":0,"nanos":1000000}},"timestamp":{"seconds":0,"nanos":3000000}}}
@@ -40,7 +40,7 @@
4040
{"testStepStarted":{"testCaseStartedId":"81","testStepId":"64","timestamp":{"seconds":0,"nanos":18000000}}}
4141
{"testStepFinished":{"testCaseStartedId":"81","testStepId":"64","testStepResult":{"status":"PASSED","duration":{"seconds":0,"nanos":1000000}},"timestamp":{"seconds":0,"nanos":19000000}}}
4242
{"testStepStarted":{"testCaseStartedId":"81","testStepId":"65","timestamp":{"seconds":0,"nanos":20000000}}}
43-
{"testStepFinished":{"testCaseStartedId":"81","testStepId":"65","testStepResult":{"status":"PENDING","message":"TODO","duration":{"seconds":0,"nanos":1000000}},"timestamp":{"seconds":0,"nanos":21000000}}}
43+
{"testStepFinished":{"testCaseStartedId":"81","testStepId":"65","testStepResult":{"status":"PENDING","duration":{"seconds":0,"nanos":1000000}},"timestamp":{"seconds":0,"nanos":21000000}}}
4444
{"testStepStarted":{"testCaseStartedId":"81","testStepId":"66","timestamp":{"seconds":0,"nanos":22000000}}}
4545
{"testStepFinished":{"testCaseStartedId":"81","testStepId":"66","testStepResult":{"status":"SKIPPED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":23000000}}}
4646
{"testCaseFinished":{"testCaseStartedId":"81","timestamp":{"seconds":0,"nanos":24000000},"willBeRetried":false}}

testdata/src/ambiguous.ndjson

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{"meta":{"protocolVersion":"31.0.0","implementation":{"name":"fake-cucumber","version":"123.45.6"},"cpu":{"name":"arm64"},"os":{"name":"darwin","version":"24.5.0"},"runtime":{"name":"Node.js","version":"24.4.1"},"ci":{"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429","buildNumber":"154666429","git":{"revision":"99684bcacf01d95875834d87903dcb072306c9ad","remote":"https://github.com/cucumber-ltd/shouty.rb.git","branch":"main"}}}}
2-
{"source":{"data":"Feature: Ambiguous steps\n Multiple step definitions that match a pickle step result in an AMBIGUOUS status, since Cucumnber cannot determine\n which one to execute.\n\n Scenario: Multiple step definitions for a step\n Given a step with multiple definitions\n","uri":"samples/ambiguous/ambiguous.feature","mediaType":"text/x.cucumber.gherkin+plain"}}
3-
{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Ambiguous steps","description":" Multiple step definitions that match a pickle step result in an AMBIGUOUS status, since Cucumnber cannot determine\n which one to execute.","children":[{"scenario":{"id":"1","tags":[],"location":{"line":5,"column":3},"keyword":"Scenario","name":"Multiple step definitions for a step","description":"","steps":[{"id":"0","location":{"line":6,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step with multiple definitions"}],"examples":[]}}]},"comments":[],"uri":"samples/ambiguous/ambiguous.feature"}}
1+
{"meta":{"protocolVersion":"31.1.0","implementation":{"name":"fake-cucumber","version":"123.45.6"},"cpu":{"name":"arm64"},"os":{"name":"darwin","version":"24.5.0"},"runtime":{"name":"Node.js","version":"24.4.1"},"ci":{"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429","buildNumber":"154666429","git":{"revision":"99684bcacf01d95875834d87903dcb072306c9ad","remote":"https://github.com/cucumber-ltd/shouty.rb.git","branch":"main"}}}}
2+
{"source":{"data":"Feature: Ambiguous steps\n Multiple step definitions that match a pickle step result in an AMBIGUOUS status, since Cucumber cannot determine\n which one to execute.\n\n Scenario: Multiple step definitions for a step\n Given a step with multiple definitions\n","uri":"samples/ambiguous/ambiguous.feature","mediaType":"text/x.cucumber.gherkin+plain"}}
3+
{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Ambiguous steps","description":" Multiple step definitions that match a pickle step result in an AMBIGUOUS status, since Cucumber cannot determine\n which one to execute.","children":[{"scenario":{"id":"1","tags":[],"location":{"line":5,"column":3},"keyword":"Scenario","name":"Multiple step definitions for a step","description":"","steps":[{"id":"0","location":{"line":6,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step with multiple definitions"}],"examples":[]}}]},"comments":[],"uri":"samples/ambiguous/ambiguous.feature"}}
44
{"pickle":{"id":"3","uri":"samples/ambiguous/ambiguous.feature","location":{"line":5,"column":3},"astNodeIds":["1"],"tags":[],"name":"Multiple step definitions for a step","language":"en","steps":[{"id":"2","text":"a step with multiple definitions","type":"Context","astNodeIds":["0"]}]}}
55
{"stepDefinition":{"id":"4","pattern":{"type":"REGULAR_EXPRESSION","source":"^a (.*?) with (.*?)$"},"sourceReference":{"uri":"samples/ambiguous/ambiguous.ts","location":{"line":3}}}}
66
{"stepDefinition":{"id":"5","pattern":{"type":"REGULAR_EXPRESSION","source":"^a step with (.*?)$"},"sourceReference":{"uri":"samples/ambiguous/ambiguous.ts","location":{"line":7}}}}
77
{"testRunStarted":{"id":"6","timestamp":{"seconds":0,"nanos":0}}}
8-
{"testCase":{"id":"7","pickleId":"3","testSteps":[{"id":"8","pickleStepId":"2","stepDefinitionIds":["4","5"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":2,"value":"step","children":[]}},{"group":{"start":12,"value":"multiple definitions","children":[]}}]},{"stepMatchArguments":[{"group":{"start":12,"value":"multiple definitions","children":[]}}]}]}],"testRunStartedId":"6"}}
8+
{"testCase":{"id":"7","pickleId":"3","testSteps":[{"id":"8","pickleStepId":"2","stepDefinitionIds":["4","5"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":2,"value":"step"}},{"group":{"start":12,"value":"multiple definitions"}}]},{"stepMatchArguments":[{"group":{"start":12,"value":"multiple definitions"}}]}]}],"testRunStartedId":"6"}}
99
{"testCaseStarted":{"id":"9","testCaseId":"7","timestamp":{"seconds":0,"nanos":1000000},"attempt":0}}
1010
{"testStepStarted":{"testCaseStartedId":"9","testStepId":"8","timestamp":{"seconds":0,"nanos":2000000}}}
1111
{"testStepFinished":{"testCaseStartedId":"9","testStepId":"8","testStepResult":{"status":"AMBIGUOUS","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":3000000}}}

0 commit comments

Comments
 (0)