Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle retry in html formatter #1631

Merged
merged 45 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f1f33c0
add cli option for retry
davidjgoss Jun 20, 2021
8e2cea2
implement retry logic in test plan
davidjgoss Jun 23, 2021
96c4308
also test for attempt numbers on test case msgs
davidjgoss Jun 23, 2021
467f233
add structure for retryable bool
davidjgoss Jun 23, 2021
c6ab7e3
fix circularity issues
davidjgoss Jun 23, 2021
7346daa
more fixes
davidjgoss Jun 23, 2021
ddbc685
set willBeRetried correctky
davidjgoss Jun 23, 2021
0961f9f
Merge remote-tracking branch 'origin/main' into html-formatter-multip…
davidjgoss Jun 23, 2021
e4a1c29
fix wrong import
davidjgoss Jun 23, 2021
2a1f9ca
darn it javascript
davidjgoss Jun 23, 2021
0f171ce
add feature file and support code for retry
davidjgoss Jun 23, 2021
c030231
support extra fake-cucumber args per cck feature
davidjgoss Jun 23, 2021
08225b8
add args for retry and generate golden
davidjgoss Jun 23, 2021
ef573e0
lint
davidjgoss Jun 23, 2021
870e611
fix runCucumber signature to keep it backwards-compatible
davidjgoss Jun 23, 2021
6d2dbe8
fix usage in query
davidjgoss Jun 23, 2021
c1bb112
add RunOptions to exports
davidjgoss Jun 23, 2021
1907dd5
make test step execute signature backwards-compatible
davidjgoss Jun 23, 2021
75a5e35
update json-to-messages usage
davidjgoss Jun 23, 2021
21b676f
add storybook story for retry
davidjgoss Jun 23, 2021
f47b701
fix json to messages runtime
davidjgoss Jun 23, 2021
1794e4b
first pass: clear results and attachments on attempt start
davidjgoss Jun 23, 2021
81facd0
work around ruby test data issue for now
davidjgoss Jun 23, 2021
4eb192a
add more coverage, only clear when needed
davidjgoss Jun 24, 2021
8db3305
update makefile to ignore retry
davidjgoss Jun 24, 2021
3f90d30
messages: move willBeRetried field
davidjgoss Jun 24, 2021
395bd33
regenerate messages.md
davidjgoss Jun 24, 2021
3d97390
messages: update js code
davidjgoss Jun 24, 2021
f6ef67f
messages: update ruby code
davidjgoss Jun 24, 2021
0c8bf2b
fix compilation in other javascript modules
davidjgoss Jun 24, 2021
2b59463
fix one more
davidjgoss Jun 24, 2021
65daa93
make arguments load tolerate no file
davidjgoss Jun 24, 2021
5d070ba
regenerate cck ndjson
davidjgoss Jun 24, 2021
c23fde0
review feedback
davidjgoss Jun 25, 2021
451cf01
update various changelogs
davidjgoss Jun 25, 2021
9ef340f
remove use of PENDING in retry cck feature
davidjgoss Jun 25, 2021
2e1ecbd
add ruby support code for retry cck feature
davidjgoss Jun 25, 2021
9fe5688
unhack retry feature for json-formatter tests
davidjgoss Jun 25, 2021
2c2c217
Merge branch 'main' into html-formatter-multiple-attempts
davidjgoss Jun 25, 2021
b1ba517
Merge branch 'main' into html-formatter-multiple-attempts
davidjgoss Jun 28, 2021
c31fe5c
Merge branch 'main' into html-formatter-multiple-attempts
davidjgoss Jun 28, 2021
c5a9e51
Merge branch 'main' into html-formatter-multiple-attempts
aurelien-reeves Jun 29, 2021
852dd38
indicate change is breaking
davidjgoss Jun 29, 2021
6b82134
Merge branch 'main' into html-formatter-multiple-attempts
davidjgoss Jun 29, 2021
d4d35c7
Merge branch 'main' into html-formatter-multiple-attempts
davidjgoss Jul 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compatibility-kit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

* Added Examples to the attachments feature to generate messages for fixing
[#1173](https://github.com/cucumber/common/issues/1173)
* Added `retry` feature to validate Retry behaviour in implementations that have it ([#1631](https://github.com/cucumber/common/pull/1631))
* Added mechanism to optionally specify CLI options for `fake-cucumber` per feature

### Changed

Expand Down
2 changes: 1 addition & 1 deletion compatibility-kit/javascript/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ features/%.ndjson: features/% features/%.ts
ifdef GOLDEN
source ../ci_env
../../node_modules/@cucumber/fake-cucumber/bin/fake-cucumber \
$< > $@
$< $(shell [ -f $(subst .feature,.arguments.txt,$<) ] && cat $(subst .feature,.arguments.txt,$<)) > $@
else
# no-op: run with GOLDEN=1
endif
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{"meta":{"protocolVersion":"16.0.1","implementation":{"name":"fake-cucumber","version":"12.0.2"},"cpu":{"name":"x64"},"os":{"name":"linux","version":"5.10.25-linuxkit"},"runtime":{"name":"node.js","version":"12.16.2"}}}
{"meta":{"protocolVersion":"16.0.1","implementation":{"name":"fake-cucumber","version":"12.0.2"},"cpu":{"name":"x64"},"os":{"name":"darwin","version":"19.6.0"},"runtime":{"name":"node.js","version":"12.22.1"}}}
{"source":{"data":"Feature: Data Tables\n Data Tables can be places underneath a step and will be passed as the last\n argument to the step definition. They can be used to represent richer data\n structures, and can also be transformed to other types.\n\n Scenario: transposed table\n When the following table is transposed:\n | a | b |\n | 1 | 2 |\n Then it should be:\n | a | 1 |\n | b | 2 |\n","uri":"features/data-tables/data-tables.feature","mediaType":"text/x.cucumber.gherkin+plain"}}
{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Data Tables","description":" Data Tables can be places underneath a step and will be passed as the last\n argument to the step definition. They can be used to represent richer data\n structures, and can also be transformed to other types.","children":[{"scenario":{"id":"5701b673-f807-4191-ba35-f397ad2c5aac","tags":[],"location":{"line":6,"column":3},"keyword":"Scenario","name":"transposed table","description":"","steps":[{"id":"e465b664-be82-4f8a-ba10-3b71fd84d0b6","location":{"line":7,"column":5},"keyword":"When ","text":"the following table is transposed:","dataTable":{"location":{"line":8,"column":7},"rows":[{"id":"c14298e6-6af0-4002-844e-0a1c5d95dcb7","location":{"line":8,"column":7},"cells":[{"location":{"line":8,"column":9},"value":"a"},{"location":{"line":8,"column":13},"value":"b"}]},{"id":"414c6c5f-6d20-4b9c-9c78-9b01c1c16b66","location":{"line":9,"column":7},"cells":[{"location":{"line":9,"column":9},"value":"1"},{"location":{"line":9,"column":13},"value":"2"}]}]}},{"id":"90c9de7f-f032-4873-84a6-5a68110f1bb6","location":{"line":10,"column":5},"keyword":"Then ","text":"it should be:","dataTable":{"location":{"line":11,"column":7},"rows":[{"id":"23a094ab-ff9d-4653-b524-5d6bfda9dfb8","location":{"line":11,"column":7},"cells":[{"location":{"line":11,"column":9},"value":"a"},{"location":{"line":11,"column":13},"value":"1"}]},{"id":"99dec49b-9cbb-410d-b52a-2be096d1bc10","location":{"line":12,"column":7},"cells":[{"location":{"line":12,"column":9},"value":"b"},{"location":{"line":12,"column":13},"value":"2"}]}]}}],"examples":[]}}]},"comments":[],"uri":"features/data-tables/data-tables.feature"}}
{"pickle":{"id":"41935011-5dc1-4152-aaff-7af50edaf4dc","uri":"features/data-tables/data-tables.feature","astNodeIds":["5701b673-f807-4191-ba35-f397ad2c5aac"],"tags":[],"name":"transposed table","language":"en","steps":[{"id":"424fff5d-36db-4fcf-9e03-3676669e2931","text":"the following table is transposed:","argument":{"dataTable":{"rows":[{"cells":[{"value":"a"},{"value":"b"}]},{"cells":[{"value":"1"},{"value":"2"}]}]}},"astNodeIds":["e465b664-be82-4f8a-ba10-3b71fd84d0b6"]},{"id":"5f5f5a16-74ad-4298-ad07-cac1f2989498","text":"it should be:","argument":{"dataTable":{"rows":[{"cells":[{"value":"a"},{"value":"1"}]},{"cells":[{"value":"b"},{"value":"2"}]}]}},"astNodeIds":["90c9de7f-f032-4873-84a6-5a68110f1bb6"]}]}}
davidjgoss marked this conversation as resolved.
Show resolved Hide resolved
{"stepDefinition":{"id":"85373b38-35a7-4c97-a1ef-c85bdebaadac","pattern":{"type":"CUCUMBER_EXPRESSION","source":"the following table is transposed:"},"sourceReference":{"uri":"features/data-tables/data-tables.feature.ts","location":{"line":5}}}}
{"stepDefinition":{"id":"424d72f2-666c-4bfd-aaaa-994411781a26","pattern":{"type":"CUCUMBER_EXPRESSION","source":"it should be:"},"sourceReference":{"uri":"features/data-tables/data-tables.feature.ts","location":{"line":9}}}}
{"testRunStarted":{"timestamp":{"seconds":1623962935,"nanos":860000000}}}
{"testCase":{"id":"b9930351-27bd-4f63-b1be-ec4374a6fb49","pickleId":"41935011-5dc1-4152-aaff-7af50edaf4dc","testSteps":[{"id":"9a3e191f-3fb3-47b7-964e-d14efbda2e9f","pickleStepId":"424fff5d-36db-4fcf-9e03-3676669e2931","stepDefinitionIds":["85373b38-35a7-4c97-a1ef-c85bdebaadac"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"9bcdf873-ca81-4399-9a04-a098598adabb","pickleStepId":"5f5f5a16-74ad-4298-ad07-cac1f2989498","stepDefinitionIds":["424d72f2-666c-4bfd-aaaa-994411781a26"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
{"testCaseStarted":{"attempt":0,"testCaseId":"b9930351-27bd-4f63-b1be-ec4374a6fb49","id":"f4958a57-181d-4ee6-8c6f-74716d14a6b1","timestamp":{"seconds":1623962935,"nanos":862000000}}}
{"testStepStarted":{"testCaseStartedId":"f4958a57-181d-4ee6-8c6f-74716d14a6b1","testStepId":"9a3e191f-3fb3-47b7-964e-d14efbda2e9f","timestamp":{"seconds":1623962935,"nanos":863000000}}}
{"testStepFinished":{"testCaseStartedId":"f4958a57-181d-4ee6-8c6f-74716d14a6b1","testStepId":"9a3e191f-3fb3-47b7-964e-d14efbda2e9f","testStepResult":{"duration":{"seconds":0,"nanos":913100},"status":"PASSED","willBeRetried":false},"timestamp":{"seconds":1623962935,"nanos":865000000}}}
{"testStepStarted":{"testCaseStartedId":"f4958a57-181d-4ee6-8c6f-74716d14a6b1","testStepId":"9bcdf873-ca81-4399-9a04-a098598adabb","timestamp":{"seconds":1623962935,"nanos":865000000}}}
{"testStepFinished":{"testCaseStartedId":"f4958a57-181d-4ee6-8c6f-74716d14a6b1","testStepId":"9bcdf873-ca81-4399-9a04-a098598adabb","testStepResult":{"duration":{"seconds":0,"nanos":128400},"status":"PASSED","willBeRetried":false},"timestamp":{"seconds":1623962935,"nanos":866000000}}}
{"testCaseFinished":{"testCaseStartedId":"f4958a57-181d-4ee6-8c6f-74716d14a6b1","timestamp":{"seconds":1623962935,"nanos":867000000}}}
{"testRunFinished":{"timestamp":{"seconds":1623962935,"nanos":867000000},"success":true}}
{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Data Tables","description":" Data Tables can be places underneath a step and will be passed as the last\n argument to the step definition. They can be used to represent richer data\n structures, and can also be transformed to other types.","children":[{"scenario":{"id":"b8da163b-1bf8-41ae-b000-74ed14de3659","tags":[],"location":{"line":6,"column":3},"keyword":"Scenario","name":"transposed table","description":"","steps":[{"id":"90fe869b-a1d2-44e9-981f-6b05ff25d435","location":{"line":7,"column":5},"keyword":"When ","text":"the following table is transposed:","dataTable":{"location":{"line":8,"column":7},"rows":[{"id":"09afe980-92e2-44e2-b444-6935d15e6aa6","location":{"line":8,"column":7},"cells":[{"location":{"line":8,"column":9},"value":"a"},{"location":{"line":8,"column":13},"value":"b"}]},{"id":"45e788c0-c306-44f3-9c2f-f5e5b51e85f7","location":{"line":9,"column":7},"cells":[{"location":{"line":9,"column":9},"value":"1"},{"location":{"line":9,"column":13},"value":"2"}]}]}},{"id":"383874e9-5f2b-44b8-bc9e-314ed0e86695","location":{"line":10,"column":5},"keyword":"Then ","text":"it should be:","dataTable":{"location":{"line":11,"column":7},"rows":[{"id":"9f6e6df6-c06d-4a3d-98ab-fedaabd8bd15","location":{"line":11,"column":7},"cells":[{"location":{"line":11,"column":9},"value":"a"},{"location":{"line":11,"column":13},"value":"1"}]},{"id":"3f0857b6-7dab-4dc9-9b08-e1e4d173728d","location":{"line":12,"column":7},"cells":[{"location":{"line":12,"column":9},"value":"b"},{"location":{"line":12,"column":13},"value":"2"}]}]}}],"examples":[]}}]},"comments":[],"uri":"features/data-tables/data-tables.feature"}}
{"pickle":{"id":"d4ad29d1-fe03-4630-8778-420187bed150","uri":"features/data-tables/data-tables.feature","astNodeIds":["b8da163b-1bf8-41ae-b000-74ed14de3659"],"tags":[],"name":"transposed table","language":"en","steps":[{"id":"0778a92b-6f63-4d75-b2ba-a07ee33c7e3f","text":"the following table is transposed:","argument":{"dataTable":{"rows":[{"cells":[{"value":"a"},{"value":"b"}]},{"cells":[{"value":"1"},{"value":"2"}]}]}},"astNodeIds":["90fe869b-a1d2-44e9-981f-6b05ff25d435"]},{"id":"42f6a9cc-2954-4fda-80ea-a8915a481c3e","text":"it should be:","argument":{"dataTable":{"rows":[{"cells":[{"value":"a"},{"value":"1"}]},{"cells":[{"value":"b"},{"value":"2"}]}]}},"astNodeIds":["383874e9-5f2b-44b8-bc9e-314ed0e86695"]}]}}
{"stepDefinition":{"id":"0d5f8da7-9322-4acc-af2b-75197ddd00b6","pattern":{"type":"CUCUMBER_EXPRESSION","source":"the following table is transposed:"},"sourceReference":{"uri":"features/data-tables/data-tables.feature.ts","location":{"line":5}}}}
{"stepDefinition":{"id":"1644f9d1-165e-4364-9c20-4cb0f70d591d","pattern":{"type":"CUCUMBER_EXPRESSION","source":"it should be:"},"sourceReference":{"uri":"features/data-tables/data-tables.feature.ts","location":{"line":9}}}}
{"testRunStarted":{"timestamp":{"seconds":1624564793,"nanos":107000000}}}
{"testCase":{"id":"255521cf-03a7-4f37-9f1f-32ec7644275e","pickleId":"d4ad29d1-fe03-4630-8778-420187bed150","testSteps":[{"id":"574bcbeb-3388-4a08-981e-809022ff0332","pickleStepId":"0778a92b-6f63-4d75-b2ba-a07ee33c7e3f","stepDefinitionIds":["0d5f8da7-9322-4acc-af2b-75197ddd00b6"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"b2056698-0f5f-4cbd-a3e3-79fffbd92a16","pickleStepId":"42f6a9cc-2954-4fda-80ea-a8915a481c3e","stepDefinitionIds":["1644f9d1-165e-4364-9c20-4cb0f70d591d"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
{"testCaseStarted":{"attempt":0,"testCaseId":"255521cf-03a7-4f37-9f1f-32ec7644275e","id":"55916432-55d9-42a8-8c23-0f891ef490de","timestamp":{"seconds":1624564793,"nanos":108000000}}}
{"testStepStarted":{"testCaseStartedId":"55916432-55d9-42a8-8c23-0f891ef490de","testStepId":"574bcbeb-3388-4a08-981e-809022ff0332","timestamp":{"seconds":1624564793,"nanos":108000000}}}
{"testStepFinished":{"testCaseStartedId":"55916432-55d9-42a8-8c23-0f891ef490de","testStepId":"574bcbeb-3388-4a08-981e-809022ff0332","testStepResult":{"duration":{"seconds":0,"nanos":206264},"status":"PASSED"},"timestamp":{"seconds":1624564793,"nanos":108000000}}}
{"testStepStarted":{"testCaseStartedId":"55916432-55d9-42a8-8c23-0f891ef490de","testStepId":"b2056698-0f5f-4cbd-a3e3-79fffbd92a16","timestamp":{"seconds":1624564793,"nanos":108000000}}}
{"testStepFinished":{"testCaseStartedId":"55916432-55d9-42a8-8c23-0f891ef490de","testStepId":"b2056698-0f5f-4cbd-a3e3-79fffbd92a16","testStepResult":{"duration":{"seconds":0,"nanos":35730},"status":"PASSED"},"timestamp":{"seconds":1624564793,"nanos":108000000}}}
{"testCaseFinished":{"testCaseStartedId":"55916432-55d9-42a8-8c23-0f891ef490de","timestamp":{"seconds":1624564793,"nanos":109000000},"willBeRetried":false}}
{"testRunFinished":{"timestamp":{"seconds":1624564793,"nanos":109000000},"success":true}}
Loading