-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrules.feature.ndjson
47 lines (47 loc) · 13.7 KB
/
rules.feature.ndjson
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"18.0.0"},"os":{"name":"darwin","version":"23.6.0"},"protocolVersion":"27.0.0","runtime":{"name":"node.js","version":"22.7.0"}}}
{"source":{"data":"Feature: Usage of a `Rule`\n You can place scenarios inside rules. This makes it possible to structure Gherkin documents\n in the same way as [example maps](https://cucumber.io/blog/bdd/example-mapping-introduction/).\n\n You can also use the Examples synonym for Scenario to make them even similar.\n\n Rule: A sale cannot happen if the customer does not have enough money\n # Unhappy path\n Example: Not enough money\n Given the customer has 100 cents\n And there are chocolate bars in stock\n When the customer tries to buy a 125 cent chocolate bar\n Then the sale should not happen\n\n # Happy path\n Example: Enough money\n Given the customer has 100 cents\n And there are chocolate bars in stock\n When the customer tries to buy a 75 cent chocolate bar\n Then the sale should happen\n\n @some-tag\n Rule: a sale cannot happen if there is no stock\n # Unhappy path\n Example: No chocolates left\n Given the customer has 100 cents\n And there are no chocolate bars in stock\n When the customer tries to buy a 1 cent chocolate bar\n Then the sale should not happen\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/rules/rules.feature"}}
{"gherkinDocument":{"comments":[{"location":{"column":1,"line":8},"text":" # Unhappy path"},{"location":{"column":1,"line":15},"text":" # Happy path"},{"location":{"column":1,"line":24},"text":" # Unhappy path"}],"feature":{"children":[{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"10","keyword":"Example","location":{"column":5,"line":9},"name":"Not enough money","steps":[{"id":"6","keyword":"Given ","keywordType":"Context","location":{"column":7,"line":10},"text":"the customer has 100 cents"},{"id":"7","keyword":"And ","keywordType":"Conjunction","location":{"column":7,"line":11},"text":"there are chocolate bars in stock"},{"id":"8","keyword":"When ","keywordType":"Action","location":{"column":7,"line":12},"text":"the customer tries to buy a 125 cent chocolate bar"},{"id":"9","keyword":"Then ","keywordType":"Outcome","location":{"column":7,"line":13},"text":"the sale should not happen"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"15","keyword":"Example","location":{"column":5,"line":16},"name":"Enough money","steps":[{"id":"11","keyword":"Given ","keywordType":"Context","location":{"column":7,"line":17},"text":"the customer has 100 cents"},{"id":"12","keyword":"And ","keywordType":"Conjunction","location":{"column":7,"line":18},"text":"there are chocolate bars in stock"},{"id":"13","keyword":"When ","keywordType":"Action","location":{"column":7,"line":19},"text":"the customer tries to buy a 75 cent chocolate bar"},{"id":"14","keyword":"Then ","keywordType":"Outcome","location":{"column":7,"line":20},"text":"the sale should happen"}],"tags":[]}}],"description":"","id":"16","keyword":"Rule","location":{"column":3,"line":7},"name":"A sale cannot happen if the customer does not have enough money","tags":[]}},{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"21","keyword":"Example","location":{"column":5,"line":25},"name":"No chocolates left","steps":[{"id":"17","keyword":"Given ","keywordType":"Context","location":{"column":7,"line":26},"text":"the customer has 100 cents"},{"id":"18","keyword":"And ","keywordType":"Conjunction","location":{"column":7,"line":27},"text":"there are no chocolate bars in stock"},{"id":"19","keyword":"When ","keywordType":"Action","location":{"column":7,"line":28},"text":"the customer tries to buy a 1 cent chocolate bar"},{"id":"20","keyword":"Then ","keywordType":"Outcome","location":{"column":7,"line":29},"text":"the sale should not happen"}],"tags":[]}}],"description":"","id":"23","keyword":"Rule","location":{"column":3,"line":23},"name":"a sale cannot happen if there is no stock","tags":[{"id":"22","location":{"column":3,"line":22},"name":"@some-tag"}]}}],"description":" You can place scenarios inside rules. This makes it possible to structure Gherkin documents\n in the same way as [example maps](https://cucumber.io/blog/bdd/example-mapping-introduction/).\n\n You can also use the Examples synonym for Scenario to make them even similar.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Usage of a `Rule`","tags":[]},"uri":"samples/rules/rules.feature"}}
{"pickle":{"astNodeIds":["10"],"id":"28","language":"en","name":"Not enough money","steps":[{"astNodeIds":["6"],"id":"24","text":"the customer has 100 cents","type":"Context"},{"astNodeIds":["7"],"id":"25","text":"there are chocolate bars in stock","type":"Context"},{"astNodeIds":["8"],"id":"26","text":"the customer tries to buy a 125 cent chocolate bar","type":"Action"},{"astNodeIds":["9"],"id":"27","text":"the sale should not happen","type":"Outcome"}],"tags":[],"uri":"samples/rules/rules.feature"}}
{"pickle":{"astNodeIds":["15"],"id":"33","language":"en","name":"Enough money","steps":[{"astNodeIds":["11"],"id":"29","text":"the customer has 100 cents","type":"Context"},{"astNodeIds":["12"],"id":"30","text":"there are chocolate bars in stock","type":"Context"},{"astNodeIds":["13"],"id":"31","text":"the customer tries to buy a 75 cent chocolate bar","type":"Action"},{"astNodeIds":["14"],"id":"32","text":"the sale should happen","type":"Outcome"}],"tags":[],"uri":"samples/rules/rules.feature"}}
{"pickle":{"astNodeIds":["21"],"id":"38","language":"en","name":"No chocolates left","steps":[{"astNodeIds":["17"],"id":"34","text":"the customer has 100 cents","type":"Context"},{"astNodeIds":["18"],"id":"35","text":"there are no chocolate bars in stock","type":"Context"},{"astNodeIds":["19"],"id":"36","text":"the customer tries to buy a 1 cent chocolate bar","type":"Action"},{"astNodeIds":["20"],"id":"37","text":"the sale should not happen","type":"Outcome"}],"tags":[{"astNodeId":"22","name":"@some-tag"}],"uri":"samples/rules/rules.feature"}}
{"stepDefinition":{"id":"0","pattern":{"source":"the customer has {int} cents","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":4},"uri":"samples/rules/rules.feature.ts"}}}
{"stepDefinition":{"id":"1","pattern":{"source":"there are chocolate bars in stock","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":8},"uri":"samples/rules/rules.feature.ts"}}}
{"stepDefinition":{"id":"2","pattern":{"source":"there are no chocolate bars in stock","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":12},"uri":"samples/rules/rules.feature.ts"}}}
{"stepDefinition":{"id":"3","pattern":{"source":"the customer tries to buy a {int} cent chocolate bar","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":16},"uri":"samples/rules/rules.feature.ts"}}}
{"stepDefinition":{"id":"4","pattern":{"source":"the sale should not happen","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":22},"uri":"samples/rules/rules.feature.ts"}}}
{"stepDefinition":{"id":"5","pattern":{"source":"the sale should happen","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":26},"uri":"samples/rules/rules.feature.ts"}}}
{"testRunStarted":{"id":"39","timestamp":{"nanos":0,"seconds":0}}}
{"testCase":{"id":"44","pickleId":"28","testRunStartedId":"39","testSteps":[{"id":"40","pickleStepId":"24","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":17,"value":"100"},"parameterTypeName":"int"}]}]},{"id":"41","pickleStepId":"25","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"42","pickleStepId":"26","stepDefinitionIds":["3"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":28,"value":"125"},"parameterTypeName":"int"}]}]},{"id":"43","pickleStepId":"27","stepDefinitionIds":["4"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
{"testCase":{"id":"49","pickleId":"33","testRunStartedId":"39","testSteps":[{"id":"45","pickleStepId":"29","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":17,"value":"100"},"parameterTypeName":"int"}]}]},{"id":"46","pickleStepId":"30","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"47","pickleStepId":"31","stepDefinitionIds":["3"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":28,"value":"75"},"parameterTypeName":"int"}]}]},{"id":"48","pickleStepId":"32","stepDefinitionIds":["5"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
{"testCase":{"id":"54","pickleId":"38","testRunStartedId":"39","testSteps":[{"id":"50","pickleStepId":"34","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":17,"value":"100"},"parameterTypeName":"int"}]}]},{"id":"51","pickleStepId":"35","stepDefinitionIds":["2"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"52","pickleStepId":"36","stepDefinitionIds":["3"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":28,"value":"1"},"parameterTypeName":"int"}]}]},{"id":"53","pickleStepId":"37","stepDefinitionIds":["4"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
{"testCaseStarted":{"attempt":0,"id":"55","testCaseId":"44","timestamp":{"nanos":1000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"55","testStepId":"40","timestamp":{"nanos":2000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"55","testStepId":"40","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":3000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"55","testStepId":"41","timestamp":{"nanos":4000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"55","testStepId":"41","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":5000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"55","testStepId":"42","timestamp":{"nanos":6000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"55","testStepId":"42","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":7000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"55","testStepId":"43","timestamp":{"nanos":8000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"55","testStepId":"43","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":9000000,"seconds":0}}}
{"testCaseFinished":{"testCaseStartedId":"55","timestamp":{"nanos":10000000,"seconds":0},"willBeRetried":false}}
{"testCaseStarted":{"attempt":0,"id":"56","testCaseId":"49","timestamp":{"nanos":11000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"56","testStepId":"45","timestamp":{"nanos":12000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"56","testStepId":"45","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":13000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"56","testStepId":"46","timestamp":{"nanos":14000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"56","testStepId":"46","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":15000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"56","testStepId":"47","timestamp":{"nanos":16000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"56","testStepId":"47","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":17000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"56","testStepId":"48","timestamp":{"nanos":18000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"56","testStepId":"48","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":19000000,"seconds":0}}}
{"testCaseFinished":{"testCaseStartedId":"56","timestamp":{"nanos":20000000,"seconds":0},"willBeRetried":false}}
{"testCaseStarted":{"attempt":0,"id":"57","testCaseId":"54","timestamp":{"nanos":21000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"57","testStepId":"50","timestamp":{"nanos":22000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"57","testStepId":"50","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":23000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"57","testStepId":"51","timestamp":{"nanos":24000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"57","testStepId":"51","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":25000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"57","testStepId":"52","timestamp":{"nanos":26000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"57","testStepId":"52","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":27000000,"seconds":0}}}
{"testStepStarted":{"testCaseStartedId":"57","testStepId":"53","timestamp":{"nanos":28000000,"seconds":0}}}
{"testStepFinished":{"testCaseStartedId":"57","testStepId":"53","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":29000000,"seconds":0}}}
{"testCaseFinished":{"testCaseStartedId":"57","timestamp":{"nanos":30000000,"seconds":0},"willBeRetried":false}}
{"testRunFinished":{"success":true,"testRunStartedId":"39","timestamp":{"nanos":31000000,"seconds":0}}}