cucumber-compatibility-kit 9.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +56 -0
- data/features/attachments/attachments.feature +41 -0
- data/features/attachments/attachments.feature.ndjson +77 -0
- data/features/attachments/attachments.feature.rb +51 -0
- data/features/attachments/cucumber.png +0 -0
- data/features/data-tables/data-tables.feature +12 -0
- data/features/data-tables/data-tables.feature.ndjson +15 -0
- data/features/data-tables/data-tables.feature.rb +7 -0
- data/features/examples-tables/examples-tables.feature +28 -0
- data/features/examples-tables/examples-tables.feature.ndjson +68 -0
- data/features/examples-tables/examples-tables.feature.rb +11 -0
- data/features/hooks/cucumber.svg +7 -0
- data/features/hooks/hooks.feature +20 -0
- data/features/hooks/hooks.feature.ndjson +66 -0
- data/features/hooks/hooks.feature.rb +28 -0
- data/features/markdown/markdown.feature.md +46 -0
- data/features/markdown/markdown.feature.md.ndjson +35 -0
- data/features/minimal/minimal.feature +10 -0
- data/features/minimal/minimal.feature.ndjson +12 -0
- data/features/minimal/minimal.feature.rb +2 -0
- data/features/parameter-types/parameter-types.feature +9 -0
- data/features/parameter-types/parameter-types.feature.ndjson +13 -0
- data/features/parameter-types/parameter-types.feature.rb +21 -0
- data/features/pending/pending.feature +19 -0
- data/features/pending/pending.feature.ndjson +30 -0
- data/features/pending/pending.feature.rb +11 -0
- data/features/retry/retry.feature +22 -0
- data/features/retry/retry.feature.ndjson +59 -0
- data/features/retry/retry.feature.rb +23 -0
- data/features/rules/rules.feature +27 -0
- data/features/rules/rules.feature.ndjson +45 -0
- data/features/rules/rules.feature.rb +26 -0
- data/features/skipped/skipped.feature +19 -0
- data/features/skipped/skipped.feature.ndjson +33 -0
- data/features/skipped/skipped.feature.rb +15 -0
- data/features/stack-traces/stack-traces.feature +11 -0
- data/features/stack-traces/stack-traces.feature.ndjson +12 -0
- data/features/stack-traces/stack-traces.feature.rb +3 -0
- data/features/undefined/undefined.feature +17 -0
- data/features/undefined/undefined.feature.ndjson +29 -0
- data/features/undefined/undefined.feature.rb +7 -0
- data/features/unknown-parameter-type/unknown-parameter-type.feature +6 -0
- data/features/unknown-parameter-type/unknown-parameter-type.feature.ndjson +12 -0
- data/features/unknown-parameter-type/unknown-parameter-type.feature.rb +3 -0
- data/lib/cucumber-compatibility-kit.rb +55 -0
- data/lib/keys_checker.rb +24 -0
- data/lib/messages_comparator.rb +83 -0
- data/lib/shared_examples.rb +63 -0
- data/spec/capture_warnings.rb +74 -0
- data/spec/cucumber-compatibility-kit_spec.rb +71 -0
- data/spec/keys_checker_spec.rb +77 -0
- metadata +165 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 59a65e57ebb944b7dc5f4c81b77980bb191a373784e2e4a52c99b9447cb14857
|
4
|
+
data.tar.gz: 6b9089229c92764ec244e118ec84230239c870764d5735b377319a65252edccc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d641adbb794625b6be19984759b271ad958c7d0ceac00e0f59750aea28f643ddfff528d05c2e962e59d20cfeac8b022ac5b4d01463883baea9b6066a05eb9e61
|
7
|
+
data.tar.gz: 82c50b779fea698732f8f1cf2748a91191e150e1615577f9d5110c38d6e4de4ec36d3057a856a9a2b95cbbe2d9151d827b778983d521e1796416d3d10f9006bd
|
data/README.md
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# The Cucumber Compatibility Kit for Ruby
|
2
|
+
|
3
|
+
The Cucumber Compatibility Kit - or CCK - for ruby is a gem that aims to help validating
|
4
|
+
an implementation of Cucumber.
|
5
|
+
|
6
|
+
It provides a set of features and the expected messages related to those features.
|
7
|
+
|
8
|
+
It also provides some tools to help in the validation of messages issued from the
|
9
|
+
execution of the CCK's features.
|
10
|
+
|
11
|
+
## Installation and Usage
|
12
|
+
|
13
|
+
Add `cucumber-compatibility-kit` to your `Gemfile` as a development dependency, and
|
14
|
+
install it:
|
15
|
+
|
16
|
+
bundle install
|
17
|
+
|
18
|
+
Then add a spec that could look like this:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
# spec/cck_spec.rb
|
22
|
+
require 'cucumber-compatibility-kit'
|
23
|
+
|
24
|
+
describe 'Cucumber Compatibility Kit' do
|
25
|
+
let(:cucumber_bin) { './bin/cucumber' }
|
26
|
+
let(:cucumber_common_args) { '--publish-quiet --profile none --format message' }
|
27
|
+
let(:cucumber_command) { "#{cucumber_bin} #{cucumber_common_args}" }
|
28
|
+
|
29
|
+
examples = Cucumber::CompatibilityKit.gherkin_examples.reject { |example|
|
30
|
+
example == 'retry'
|
31
|
+
}
|
32
|
+
|
33
|
+
examples.each do |example_name|
|
34
|
+
describe "'#{example_name}' example" do
|
35
|
+
include_examples 'cucumber compatibility kit' do
|
36
|
+
let(:example) { example_name }
|
37
|
+
let(:messages) { `#{cucumber_command} --require #{example_path} #{example_path}` }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
`Cucumber::CompatibilityKit.gherkin_examples` returns an array that list all the
|
46
|
+
gherkin examples available within the CCK. Here, we want to execute all of them with
|
47
|
+
the exception of the `retry` one.
|
48
|
+
|
49
|
+
`let(:messages)` executes the cucumber command. `example_path` is provided by the
|
50
|
+
CCK. It is the path to the folder which contains the feature, and the support code
|
51
|
+
required to execute the given example. As we use the `--format message` formatter,
|
52
|
+
`messages` will then contain the messages as a `ndjson` document.
|
53
|
+
|
54
|
+
You can use `gem open cucumber-compatibility-kit` in order to take a look on the
|
55
|
+
features, their support code, and the expected messages.They are available in the
|
56
|
+
`features` folder within the gem.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
Feature: Attachments
|
2
|
+
It is sometimes useful to take a screenshot while a scenario runs.
|
3
|
+
Or capture some logs.
|
4
|
+
|
5
|
+
Cucumber lets you `attach` arbitrary files during execution, and you can
|
6
|
+
specify a content type for the contents.
|
7
|
+
|
8
|
+
Formatters can then render these attachments in reports.
|
9
|
+
|
10
|
+
Attachments must have a body and a content type
|
11
|
+
|
12
|
+
Scenario: Strings can be attached with a media type
|
13
|
+
Beware that some formatters such as @cucumber/react use the media type
|
14
|
+
to determine how to display an attachment.
|
15
|
+
|
16
|
+
When the string "hello" is attached as "application/octet-stream"
|
17
|
+
|
18
|
+
Scenario: Log JSON
|
19
|
+
When the following string is attached as "application/json":
|
20
|
+
```
|
21
|
+
{"message": "The <b>big</b> question", "foo": "bar"}
|
22
|
+
```
|
23
|
+
|
24
|
+
Scenario: Log text
|
25
|
+
When the string "hello" is logged
|
26
|
+
|
27
|
+
Scenario: Log ANSI coloured text
|
28
|
+
When text with ANSI escapes is logged
|
29
|
+
|
30
|
+
Scenario: Byte arrays are base64-encoded regardless of media type
|
31
|
+
When an array with 10 bytes is attached as "text/plain"
|
32
|
+
|
33
|
+
Scenario: Streams are always base64-encoded
|
34
|
+
When a JPEG image is attached
|
35
|
+
|
36
|
+
Scenario: Attaching images in examples
|
37
|
+
When the <image> png is attached
|
38
|
+
|
39
|
+
Examples:
|
40
|
+
| image |
|
41
|
+
| cucumber.png |
|
@@ -0,0 +1,77 @@
|
|
1
|
+
{"meta":{"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"15.0.0"},"os":{"name":"linux","version":"5.11.0-34-generic"},"protocolVersion":"17.1.1","runtime":{"name":"node.js","version":"14.17.3"}}}
|
2
|
+
{"source":{"data":"Feature: Attachments\n It is sometimes useful to take a screenshot while a scenario runs.\n Or capture some logs.\n\n Cucumber lets you `attach` arbitrary files during execution, and you can\n specify a content type for the contents.\n\n Formatters can then render these attachments in reports.\n\n Attachments must have a body and a content type\n\n Scenario: Strings can be attached with a media type\n Beware that some formatters such as @cucumber/react use the media type\n to determine how to display an attachment.\n\n When the string \"hello\" is attached as \"application/octet-stream\"\n\n Scenario: Log JSON\n When the following string is attached as \"application/json\":\n ```\n {\"message\": \"The <b>big</b> question\", \"foo\": \"bar\"}\n ```\n\n Scenario: Log text\n When the string \"hello\" is logged\n\n Scenario: Log ANSI coloured text\n When text with ANSI escapes is logged\n\n Scenario: Byte arrays are base64-encoded regardless of media type\n When an array with 10 bytes is attached as \"text/plain\"\n\n Scenario: Streams are always base64-encoded\n When a JPEG image is attached\n\n Scenario: Attaching images in examples\n When the <image> png is attached\n\n Examples:\n | image |\n | cucumber.png |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"features/attachments/attachments.feature"}}
|
3
|
+
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":" Beware that some formatters such as @cucumber/react use the media type\n to determine how to display an attachment.","examples":[],"id":"10","keyword":"Scenario","location":{"column":3,"line":12},"name":"Strings can be attached with a media type","steps":[{"id":"9","keyword":"When ","location":{"column":5,"line":16},"text":"the string \"hello\" is attached as \"application/octet-stream\""}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"12","keyword":"Scenario","location":{"column":3,"line":18},"name":"Log JSON","steps":[{"docString":{"content":"{\"message\": \"The <b>big</b> question\", \"foo\": \"bar\"}","delimiter":"```","location":{"column":8,"line":20}},"id":"11","keyword":"When ","location":{"column":6,"line":19},"text":"the following string is attached as \"application/json\":"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"14","keyword":"Scenario","location":{"column":3,"line":24},"name":"Log text","steps":[{"id":"13","keyword":"When ","location":{"column":5,"line":25},"text":"the string \"hello\" is logged"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"16","keyword":"Scenario","location":{"column":3,"line":27},"name":"Log ANSI coloured text","steps":[{"id":"15","keyword":"When ","location":{"column":6,"line":28},"text":"text with ANSI escapes is logged"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"18","keyword":"Scenario","location":{"column":3,"line":30},"name":"Byte arrays are base64-encoded regardless of media type","steps":[{"id":"17","keyword":"When ","location":{"column":5,"line":31},"text":"an array with 10 bytes is attached as \"text/plain\""}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"20","keyword":"Scenario","location":{"column":3,"line":33},"name":"Streams are always base64-encoded","steps":[{"id":"19","keyword":"When ","location":{"column":5,"line":34},"text":"a JPEG image is attached"}],"tags":[]}},{"scenario":{"description":"","examples":[{"description":"","id":"24","keyword":"Examples","location":{"column":5,"line":39},"name":"","tableBody":[{"cells":[{"location":{"column":9,"line":41},"value":"cucumber.png"}],"id":"23","location":{"column":7,"line":41}}],"tableHeader":{"cells":[{"location":{"column":9,"line":40},"value":"image"}],"id":"22","location":{"column":7,"line":40}},"tags":[]}],"id":"25","keyword":"Scenario","location":{"column":3,"line":36},"name":"Attaching images in examples","steps":[{"id":"21","keyword":"When ","location":{"column":5,"line":37},"text":"the <image> png is attached"}],"tags":[]}}],"description":" It is sometimes useful to take a screenshot while a scenario runs.\n Or capture some logs.\n\n Cucumber lets you `attach` arbitrary files during execution, and you can\n specify a content type for the contents.\n\n Formatters can then render these attachments in reports.\n\n Attachments must have a body and a content type","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Attachments","tags":[]},"uri":"features/attachments/attachments.feature"}}
|
4
|
+
{"pickle":{"astNodeIds":["10"],"id":"27","language":"en","name":"Strings can be attached with a media type","steps":[{"astNodeIds":["9"],"id":"26","text":"the string \"hello\" is attached as \"application/octet-stream\""}],"tags":[],"uri":"features/attachments/attachments.feature"}}
|
5
|
+
{"pickle":{"astNodeIds":["12"],"id":"29","language":"en","name":"Log JSON","steps":[{"argument":{"docString":{"content":"{\"message\": \"The <b>big</b> question\", \"foo\": \"bar\"}"}},"astNodeIds":["11"],"id":"28","text":"the following string is attached as \"application/json\":"}],"tags":[],"uri":"features/attachments/attachments.feature"}}
|
6
|
+
{"pickle":{"astNodeIds":["14"],"id":"31","language":"en","name":"Log text","steps":[{"astNodeIds":["13"],"id":"30","text":"the string \"hello\" is logged"}],"tags":[],"uri":"features/attachments/attachments.feature"}}
|
7
|
+
{"pickle":{"astNodeIds":["16"],"id":"33","language":"en","name":"Log ANSI coloured text","steps":[{"astNodeIds":["15"],"id":"32","text":"text with ANSI escapes is logged"}],"tags":[],"uri":"features/attachments/attachments.feature"}}
|
8
|
+
{"pickle":{"astNodeIds":["18"],"id":"35","language":"en","name":"Byte arrays are base64-encoded regardless of media type","steps":[{"astNodeIds":["17"],"id":"34","text":"an array with 10 bytes is attached as \"text/plain\""}],"tags":[],"uri":"features/attachments/attachments.feature"}}
|
9
|
+
{"pickle":{"astNodeIds":["20"],"id":"37","language":"en","name":"Streams are always base64-encoded","steps":[{"astNodeIds":["19"],"id":"36","text":"a JPEG image is attached"}],"tags":[],"uri":"features/attachments/attachments.feature"}}
|
10
|
+
{"pickle":{"astNodeIds":["25","23"],"id":"39","language":"en","name":"Attaching images in examples","steps":[{"astNodeIds":["21","23"],"id":"38","text":"the cucumber.png png is attached"}],"tags":[],"uri":"features/attachments/attachments.feature"}}
|
11
|
+
{"stepDefinition":{"id":"1","pattern":{"source":"the string {string} is attached as {string}","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":8},"uri":"features/attachments/attachments.feature.ts"}}}
|
12
|
+
{"stepDefinition":{"id":"2","pattern":{"source":"the string {string} is logged","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":12},"uri":"features/attachments/attachments.feature.ts"}}}
|
13
|
+
{"stepDefinition":{"id":"3","pattern":{"source":"text with ANSI escapes is logged","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":16},"uri":"features/attachments/attachments.feature.ts"}}}
|
14
|
+
{"stepDefinition":{"id":"4","pattern":{"source":"the following string is attached as {string}:","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":22},"uri":"features/attachments/attachments.feature.ts"}}}
|
15
|
+
{"stepDefinition":{"id":"5","pattern":{"source":"an array with {int} bytes is attached as {string}","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":26},"uri":"features/attachments/attachments.feature.ts"}}}
|
16
|
+
{"stepDefinition":{"id":"6","pattern":{"source":"a stream with {int} bytes are attached as {string}","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":35},"uri":"features/attachments/attachments.feature.ts"}}}
|
17
|
+
{"stepDefinition":{"id":"7","pattern":{"source":"a JPEG image is attached","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":48},"uri":"features/attachments/attachments.feature.ts"}}}
|
18
|
+
{"stepDefinition":{"id":"8","pattern":{"source":"the {word} png is attached","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":52},"uri":"features/attachments/attachments.feature.ts"}}}
|
19
|
+
{"hook":{"id":"0","sourceReference":{"location":{"line":6},"uri":"features/attachments/attachments.feature.ts"}}}
|
20
|
+
{"testRunStarted":{"timestamp":{"nanos":0,"seconds":0}}}
|
21
|
+
{"testCase":{"id":"42","pickleId":"27","testSteps":[{"hookId":"0","id":"40"},{"id":"41","pickleStepId":"26","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[{"children":[{"children":[]}],"start":12,"value":"hello"},{"children":[{"children":[]}]}],"start":11,"value":"\"hello\""},"parameterTypeName":"string"},{"group":{"children":[{"children":[{"children":[]}],"start":35,"value":"application/octet-stream"},{"children":[{"children":[]}]}],"start":34,"value":"\"application/octet-stream\""},"parameterTypeName":"string"}]}]}]}}
|
22
|
+
{"testCase":{"id":"45","pickleId":"29","testSteps":[{"hookId":"0","id":"43"},{"id":"44","pickleStepId":"28","stepDefinitionIds":["4"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[{"children":[{"children":[]}],"start":37,"value":"application/json"},{"children":[{"children":[]}]}],"start":36,"value":"\"application/json\""},"parameterTypeName":"string"}]}]}]}}
|
23
|
+
{"testCase":{"id":"48","pickleId":"31","testSteps":[{"hookId":"0","id":"46"},{"id":"47","pickleStepId":"30","stepDefinitionIds":["2"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[{"children":[{"children":[]}],"start":12,"value":"hello"},{"children":[{"children":[]}]}],"start":11,"value":"\"hello\""},"parameterTypeName":"string"}]}]}]}}
|
24
|
+
{"testCase":{"id":"51","pickleId":"33","testSteps":[{"hookId":"0","id":"49"},{"id":"50","pickleStepId":"32","stepDefinitionIds":["3"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
|
25
|
+
{"testCase":{"id":"54","pickleId":"35","testSteps":[{"hookId":"0","id":"52"},{"id":"53","pickleStepId":"34","stepDefinitionIds":["5"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":14,"value":"10"},"parameterTypeName":"int"},{"group":{"children":[{"children":[{"children":[]}],"start":39,"value":"text/plain"},{"children":[{"children":[]}]}],"start":38,"value":"\"text/plain\""},"parameterTypeName":"string"}]}]}]}}
|
26
|
+
{"testCase":{"id":"57","pickleId":"37","testSteps":[{"hookId":"0","id":"55"},{"id":"56","pickleStepId":"36","stepDefinitionIds":["7"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
|
27
|
+
{"testCase":{"id":"60","pickleId":"39","testSteps":[{"hookId":"0","id":"58"},{"id":"59","pickleStepId":"38","stepDefinitionIds":["8"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":4,"value":"cucumber.png"},"parameterTypeName":"word"}]}]}]}}
|
28
|
+
{"testCaseStarted":{"attempt":0,"id":"61","testCaseId":"42","timestamp":{"nanos":1000000,"seconds":0}}}
|
29
|
+
{"testStepStarted":{"testCaseStartedId":"61","testStepId":"40","timestamp":{"nanos":2000000,"seconds":0}}}
|
30
|
+
{"testStepFinished":{"testCaseStartedId":"61","testStepId":"40","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":3000000,"seconds":0}}}
|
31
|
+
{"testStepStarted":{"testCaseStartedId":"61","testStepId":"41","timestamp":{"nanos":4000000,"seconds":0}}}
|
32
|
+
{"attachment":{"body":"hello","contentEncoding":"IDENTITY","mediaType":"application/octet-stream","testCaseStartedId":"61","testStepId":"41"}}
|
33
|
+
{"testStepFinished":{"testCaseStartedId":"61","testStepId":"41","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":5000000,"seconds":0}}}
|
34
|
+
{"testCaseFinished":{"testCaseStartedId":"61","timestamp":{"nanos":6000000,"seconds":0},"willBeRetried":false}}
|
35
|
+
{"testCaseStarted":{"attempt":0,"id":"62","testCaseId":"45","timestamp":{"nanos":7000000,"seconds":0}}}
|
36
|
+
{"testStepStarted":{"testCaseStartedId":"62","testStepId":"43","timestamp":{"nanos":8000000,"seconds":0}}}
|
37
|
+
{"testStepFinished":{"testCaseStartedId":"62","testStepId":"43","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":9000000,"seconds":0}}}
|
38
|
+
{"testStepStarted":{"testCaseStartedId":"62","testStepId":"44","timestamp":{"nanos":10000000,"seconds":0}}}
|
39
|
+
{"attachment":{"body":"{\"message\": \"The <b>big</b> question\", \"foo\": \"bar\"}","contentEncoding":"IDENTITY","mediaType":"application/json","testCaseStartedId":"62","testStepId":"44"}}
|
40
|
+
{"testStepFinished":{"testCaseStartedId":"62","testStepId":"44","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":11000000,"seconds":0}}}
|
41
|
+
{"testCaseFinished":{"testCaseStartedId":"62","timestamp":{"nanos":12000000,"seconds":0},"willBeRetried":false}}
|
42
|
+
{"testCaseStarted":{"attempt":0,"id":"63","testCaseId":"48","timestamp":{"nanos":13000000,"seconds":0}}}
|
43
|
+
{"testStepStarted":{"testCaseStartedId":"63","testStepId":"46","timestamp":{"nanos":14000000,"seconds":0}}}
|
44
|
+
{"testStepFinished":{"testCaseStartedId":"63","testStepId":"46","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":15000000,"seconds":0}}}
|
45
|
+
{"testStepStarted":{"testCaseStartedId":"63","testStepId":"47","timestamp":{"nanos":16000000,"seconds":0}}}
|
46
|
+
{"attachment":{"body":"hello","contentEncoding":"IDENTITY","mediaType":"text/x.cucumber.log+plain","testCaseStartedId":"63","testStepId":"47"}}
|
47
|
+
{"testStepFinished":{"testCaseStartedId":"63","testStepId":"47","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":17000000,"seconds":0}}}
|
48
|
+
{"testCaseFinished":{"testCaseStartedId":"63","timestamp":{"nanos":18000000,"seconds":0},"willBeRetried":false}}
|
49
|
+
{"testCaseStarted":{"attempt":0,"id":"64","testCaseId":"51","timestamp":{"nanos":19000000,"seconds":0}}}
|
50
|
+
{"testStepStarted":{"testCaseStartedId":"64","testStepId":"49","timestamp":{"nanos":20000000,"seconds":0}}}
|
51
|
+
{"testStepFinished":{"testCaseStartedId":"64","testStepId":"49","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":21000000,"seconds":0}}}
|
52
|
+
{"testStepStarted":{"testCaseStartedId":"64","testStepId":"50","timestamp":{"nanos":22000000,"seconds":0}}}
|
53
|
+
{"attachment":{"body":"This displays a \u001b[31mr\u001b[0m\u001b[91ma\u001b[0m\u001b[33mi\u001b[0m\u001b[32mn\u001b[0m\u001b[34mb\u001b[0m\u001b[95mo\u001b[0m\u001b[35mw\u001b[0m","contentEncoding":"IDENTITY","mediaType":"text/x.cucumber.log+plain","testCaseStartedId":"64","testStepId":"50"}}
|
54
|
+
{"testStepFinished":{"testCaseStartedId":"64","testStepId":"50","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":23000000,"seconds":0}}}
|
55
|
+
{"testCaseFinished":{"testCaseStartedId":"64","timestamp":{"nanos":24000000,"seconds":0},"willBeRetried":false}}
|
56
|
+
{"testCaseStarted":{"attempt":0,"id":"65","testCaseId":"54","timestamp":{"nanos":25000000,"seconds":0}}}
|
57
|
+
{"testStepStarted":{"testCaseStartedId":"65","testStepId":"52","timestamp":{"nanos":26000000,"seconds":0}}}
|
58
|
+
{"testStepFinished":{"testCaseStartedId":"65","testStepId":"52","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":27000000,"seconds":0}}}
|
59
|
+
{"testStepStarted":{"testCaseStartedId":"65","testStepId":"53","timestamp":{"nanos":28000000,"seconds":0}}}
|
60
|
+
{"attachment":{"body":"AAECAwQFBgcICQ==","contentEncoding":"BASE64","mediaType":"text/plain","testCaseStartedId":"65","testStepId":"53"}}
|
61
|
+
{"testStepFinished":{"testCaseStartedId":"65","testStepId":"53","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":29000000,"seconds":0}}}
|
62
|
+
{"testCaseFinished":{"testCaseStartedId":"65","timestamp":{"nanos":30000000,"seconds":0},"willBeRetried":false}}
|
63
|
+
{"testCaseStarted":{"attempt":0,"id":"66","testCaseId":"57","timestamp":{"nanos":31000000,"seconds":0}}}
|
64
|
+
{"testStepStarted":{"testCaseStartedId":"66","testStepId":"55","timestamp":{"nanos":32000000,"seconds":0}}}
|
65
|
+
{"testStepFinished":{"testCaseStartedId":"66","testStepId":"55","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":33000000,"seconds":0}}}
|
66
|
+
{"testStepStarted":{"testCaseStartedId":"66","testStepId":"56","timestamp":{"nanos":34000000,"seconds":0}}}
|
67
|
+
{"attachment":{"body":"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","contentEncoding":"BASE64","mediaType":"image/png","testCaseStartedId":"66","testStepId":"56"}}
|
68
|
+
{"testStepFinished":{"testCaseStartedId":"66","testStepId":"56","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":35000000,"seconds":0}}}
|
69
|
+
{"testCaseFinished":{"testCaseStartedId":"66","timestamp":{"nanos":36000000,"seconds":0},"willBeRetried":false}}
|
70
|
+
{"testCaseStarted":{"attempt":0,"id":"67","testCaseId":"60","timestamp":{"nanos":37000000,"seconds":0}}}
|
71
|
+
{"testStepStarted":{"testCaseStartedId":"67","testStepId":"58","timestamp":{"nanos":38000000,"seconds":0}}}
|
72
|
+
{"testStepFinished":{"testCaseStartedId":"67","testStepId":"58","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":39000000,"seconds":0}}}
|
73
|
+
{"testStepStarted":{"testCaseStartedId":"67","testStepId":"59","timestamp":{"nanos":40000000,"seconds":0}}}
|
74
|
+
{"attachment":{"body":"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","contentEncoding":"BASE64","mediaType":"image/png","testCaseStartedId":"67","testStepId":"59"}}
|
75
|
+
{"testStepFinished":{"testCaseStartedId":"67","testStepId":"59","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":41000000,"seconds":0}}}
|
76
|
+
{"testCaseFinished":{"testCaseStartedId":"67","timestamp":{"nanos":42000000,"seconds":0},"willBeRetried":false}}
|
77
|
+
{"testRunFinished":{"success":true,"timestamp":{"nanos":43000000,"seconds":0}}}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'stringio'
|
2
|
+
|
3
|
+
# Cucumber-JVM needs to use a Before hook in order to create attachments
|
4
|
+
Before do
|
5
|
+
# no-op
|
6
|
+
end
|
7
|
+
|
8
|
+
def attach_or_embed(world, data, media_type)
|
9
|
+
# Backward compatibility as the steps are also used by cucumber-ruby 3 which does not support `attach`
|
10
|
+
world.respond_to?(:attach) ? attach(data, media_type) : embed(data, media_type)
|
11
|
+
end
|
12
|
+
|
13
|
+
When('the string {string} is attached as {string}') do |text, media_type|
|
14
|
+
attach_or_embed(self, text, media_type)
|
15
|
+
end
|
16
|
+
|
17
|
+
When('the string {string} is logged') do |text|
|
18
|
+
# Backward compatibility
|
19
|
+
self.respond_to?(:log) ? log(text) : puts(text)
|
20
|
+
end
|
21
|
+
|
22
|
+
When('the following string is attached as {string}:') do |media_type, doc_string|
|
23
|
+
attach_or_embed(self, doc_string, media_type)
|
24
|
+
end
|
25
|
+
|
26
|
+
When('text with ANSI escapes is logged') do
|
27
|
+
text = "This displays a \x1b[31mr\x1b[0m\x1b[91ma\x1b[0m\x1b[33mi\x1b[0m\x1b[32mn\x1b[0m\x1b[34mb\x1b[0m\x1b[95mo\x1b[0m\x1b[35mw\x1b[0m"
|
28
|
+
|
29
|
+
self.respond_to?(:log) ? log(text) : puts(text)
|
30
|
+
end
|
31
|
+
|
32
|
+
When('an array with {int} bytes is attached as {string}') do |size, media_type|
|
33
|
+
data = (0..size-1).map {|i| [i].pack('C') }.join
|
34
|
+
attach_or_embed(self, data, media_type)
|
35
|
+
end
|
36
|
+
|
37
|
+
When('a stream with {int} bytes are attached as {string}') do |size, media_type|
|
38
|
+
stream = StringIO.new
|
39
|
+
stream.puts (0..size).map(&:to_s).join('')
|
40
|
+
stream.seek(0)
|
41
|
+
|
42
|
+
attach_or_embed(self, stream, media_type)
|
43
|
+
end
|
44
|
+
|
45
|
+
When('a JPEG image is attached') do
|
46
|
+
attach_or_embed(self, File.open("#{__dir__}/cucumber.png"), 'image/png')
|
47
|
+
end
|
48
|
+
|
49
|
+
When('the {word} png is attached') do |filename|
|
50
|
+
attach_or_embed(self, File.open("#{__dir__}/#{filename}"), 'image/png')
|
51
|
+
end
|
Binary file
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: Data Tables
|
2
|
+
Data Tables can be places underneath a step and will be passed as the last
|
3
|
+
argument to the step definition. They can be used to represent richer data
|
4
|
+
structures, and can also be transformed to other types.
|
5
|
+
|
6
|
+
Scenario: transposed table
|
7
|
+
When the following table is transposed:
|
8
|
+
| a | b |
|
9
|
+
| 1 | 2 |
|
10
|
+
Then it should be:
|
11
|
+
| a | 1 |
|
12
|
+
| b | 2 |
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{"meta":{"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"15.0.0"},"os":{"name":"linux","version":"5.11.0-34-generic"},"protocolVersion":"17.1.1","runtime":{"name":"node.js","version":"14.17.3"}}}
|
2
|
+
{"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","mediaType":"text/x.cucumber.gherkin+plain","uri":"features/data-tables/data-tables.feature"}}
|
3
|
+
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"8","keyword":"Scenario","location":{"column":3,"line":6},"name":"transposed table","steps":[{"dataTable":{"location":{"column":7,"line":8},"rows":[{"cells":[{"location":{"column":9,"line":8},"value":"a"},{"location":{"column":13,"line":8},"value":"b"}],"id":"2","location":{"column":7,"line":8}},{"cells":[{"location":{"column":9,"line":9},"value":"1"},{"location":{"column":13,"line":9},"value":"2"}],"id":"3","location":{"column":7,"line":9}}]},"id":"4","keyword":"When ","location":{"column":5,"line":7},"text":"the following table is transposed:"},{"dataTable":{"location":{"column":7,"line":11},"rows":[{"cells":[{"location":{"column":9,"line":11},"value":"a"},{"location":{"column":13,"line":11},"value":"1"}],"id":"5","location":{"column":7,"line":11}},{"cells":[{"location":{"column":9,"line":12},"value":"b"},{"location":{"column":13,"line":12},"value":"2"}],"id":"6","location":{"column":7,"line":12}}]},"id":"7","keyword":"Then ","location":{"column":5,"line":10},"text":"it should be:"}],"tags":[]}}],"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.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Data Tables","tags":[]},"uri":"features/data-tables/data-tables.feature"}}
|
4
|
+
{"pickle":{"astNodeIds":["8"],"id":"11","language":"en","name":"transposed table","steps":[{"argument":{"dataTable":{"rows":[{"cells":[{"value":"a"},{"value":"b"}]},{"cells":[{"value":"1"},{"value":"2"}]}]}},"astNodeIds":["4"],"id":"9","text":"the following table is transposed:"},{"argument":{"dataTable":{"rows":[{"cells":[{"value":"a"},{"value":"1"}]},{"cells":[{"value":"b"},{"value":"2"}]}]}},"astNodeIds":["7"],"id":"10","text":"it should be:"}],"tags":[],"uri":"features/data-tables/data-tables.feature"}}
|
5
|
+
{"stepDefinition":{"id":"0","pattern":{"source":"the following table is transposed:","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":5},"uri":"features/data-tables/data-tables.feature.ts"}}}
|
6
|
+
{"stepDefinition":{"id":"1","pattern":{"source":"it should be:","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":9},"uri":"features/data-tables/data-tables.feature.ts"}}}
|
7
|
+
{"testRunStarted":{"timestamp":{"nanos":0,"seconds":0}}}
|
8
|
+
{"testCase":{"id":"14","pickleId":"11","testSteps":[{"id":"12","pickleStepId":"9","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"13","pickleStepId":"10","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
|
9
|
+
{"testCaseStarted":{"attempt":0,"id":"15","testCaseId":"14","timestamp":{"nanos":1000000,"seconds":0}}}
|
10
|
+
{"testStepStarted":{"testCaseStartedId":"15","testStepId":"12","timestamp":{"nanos":2000000,"seconds":0}}}
|
11
|
+
{"testStepFinished":{"testCaseStartedId":"15","testStepId":"12","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":3000000,"seconds":0}}}
|
12
|
+
{"testStepStarted":{"testCaseStartedId":"15","testStepId":"13","timestamp":{"nanos":4000000,"seconds":0}}}
|
13
|
+
{"testStepFinished":{"testCaseStartedId":"15","testStepId":"13","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":5000000,"seconds":0}}}
|
14
|
+
{"testCaseFinished":{"testCaseStartedId":"15","timestamp":{"nanos":6000000,"seconds":0},"willBeRetried":false}}
|
15
|
+
{"testRunFinished":{"success":true,"timestamp":{"nanos":7000000,"seconds":0}}}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
Feature: Examples Tables
|
2
|
+
Sometimes it can be desireable to run the same scenario multiple times
|
3
|
+
with different data each time. This can be done by placing an Examples
|
4
|
+
section with an Examples Table underneath a Scenario, and use <placeholders>
|
5
|
+
in the Scenario, matching the table headers.
|
6
|
+
|
7
|
+
Scenario Outline: eating cucumbers
|
8
|
+
Given there are <start> cucumbers
|
9
|
+
When I eat <eat> cucumbers
|
10
|
+
Then I should have <left> cucumbers
|
11
|
+
|
12
|
+
@passing
|
13
|
+
Examples: These are passing
|
14
|
+
| start | eat | left |
|
15
|
+
| 12 | 5 | 7 |
|
16
|
+
| 20 | 5 | 15 |
|
17
|
+
|
18
|
+
@failing
|
19
|
+
Examples: These are failing
|
20
|
+
| start | eat | left |
|
21
|
+
| 12 | 20 | 0 |
|
22
|
+
| 0 | 1 | 0 |
|
23
|
+
|
24
|
+
@undefined
|
25
|
+
Examples: These are undefined because the value is not an {int}
|
26
|
+
| start | eat | left |
|
27
|
+
| 12 | banana | 12 |
|
28
|
+
| 0 | 1 | apple |
|
@@ -0,0 +1,68 @@
|
|
1
|
+
{"meta":{"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"15.0.0"},"os":{"name":"linux","version":"5.11.0-34-generic"},"protocolVersion":"17.1.1","runtime":{"name":"node.js","version":"14.17.3"}}}
|
2
|
+
{"source":{"data":"Feature: Examples Tables\n Sometimes it can be desireable to run the same scenario multiple times\n with different data each time. This can be done by placing an Examples\n section with an Examples Table underneath a Scenario, and use <placeholders>\n in the Scenario, matching the table headers.\n\n Scenario Outline: eating cucumbers\n Given there are <start> cucumbers\n When I eat <eat> cucumbers\n Then I should have <left> cucumbers\n\n @passing\n Examples: These are passing\n | start | eat | left |\n | 12 | 5 | 7 |\n | 20 | 5 | 15 |\n\n @failing\n Examples: These are failing\n | start | eat | left |\n | 12 | 20 | 0 |\n | 0 | 1 | 0 |\n\n @undefined\n Examples: These are undefined because the value is not an {int}\n | start | eat | left |\n | 12 | banana | 12 |\n | 0 | 1 | apple |\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"features/examples-tables/examples-tables.feature"}}
|
3
|
+
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[{"description":"","id":"10","keyword":"Examples","location":{"column":5,"line":13},"name":"These are passing","tableBody":[{"cells":[{"location":{"column":12,"line":15},"value":"12"},{"location":{"column":19,"line":15},"value":"5"},{"location":{"column":26,"line":15},"value":"7"}],"id":"7","location":{"column":7,"line":15}},{"cells":[{"location":{"column":12,"line":16},"value":"20"},{"location":{"column":19,"line":16},"value":"5"},{"location":{"column":25,"line":16},"value":"15"}],"id":"8","location":{"column":7,"line":16}}],"tableHeader":{"cells":[{"location":{"column":9,"line":14},"value":"start"},{"location":{"column":17,"line":14},"value":"eat"},{"location":{"column":23,"line":14},"value":"left"}],"id":"6","location":{"column":7,"line":14}},"tags":[{"id":"9","location":{"column":5,"line":12},"name":"@passing"}]},{"description":"","id":"15","keyword":"Examples","location":{"column":5,"line":19},"name":"These are failing","tableBody":[{"cells":[{"location":{"column":12,"line":21},"value":"12"},{"location":{"column":18,"line":21},"value":"20"},{"location":{"column":26,"line":21},"value":"0"}],"id":"12","location":{"column":7,"line":21}},{"cells":[{"location":{"column":13,"line":22},"value":"0"},{"location":{"column":19,"line":22},"value":"1"},{"location":{"column":26,"line":22},"value":"0"}],"id":"13","location":{"column":7,"line":22}}],"tableHeader":{"cells":[{"location":{"column":9,"line":20},"value":"start"},{"location":{"column":17,"line":20},"value":"eat"},{"location":{"column":23,"line":20},"value":"left"}],"id":"11","location":{"column":7,"line":20}},"tags":[{"id":"14","location":{"column":5,"line":18},"name":"@failing"}]},{"description":"","id":"20","keyword":"Examples","location":{"column":5,"line":25},"name":"These are undefined because the value is not an {int}","tableBody":[{"cells":[{"location":{"column":12,"line":27},"value":"12"},{"location":{"column":17,"line":27},"value":"banana"},{"location":{"column":29,"line":27},"value":"12"}],"id":"17","location":{"column":7,"line":27}},{"cells":[{"location":{"column":13,"line":28},"value":"0"},{"location":{"column":22,"line":28},"value":"1"},{"location":{"column":26,"line":28},"value":"apple"}],"id":"18","location":{"column":7,"line":28}}],"tableHeader":{"cells":[{"location":{"column":9,"line":26},"value":"start"},{"location":{"column":17,"line":26},"value":"eat"},{"location":{"column":26,"line":26},"value":"left"}],"id":"16","location":{"column":7,"line":26}},"tags":[{"id":"19","location":{"column":5,"line":24},"name":"@undefined"}]}],"id":"21","keyword":"Scenario Outline","location":{"column":3,"line":7},"name":"eating cucumbers","steps":[{"id":"3","keyword":"Given ","location":{"column":5,"line":8},"text":"there are <start> cucumbers"},{"id":"4","keyword":"When ","location":{"column":5,"line":9},"text":"I eat <eat> cucumbers"},{"id":"5","keyword":"Then ","location":{"column":5,"line":10},"text":"I should have <left> cucumbers"}],"tags":[]}}],"description":" Sometimes it can be desireable to run the same scenario multiple times\n with different data each time. This can be done by placing an Examples\n section with an Examples Table underneath a Scenario, and use <placeholders>\n in the Scenario, matching the table headers.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Examples Tables","tags":[]},"uri":"features/examples-tables/examples-tables.feature"}}
|
4
|
+
{"pickle":{"astNodeIds":["21","7"],"id":"25","language":"en","name":"eating cucumbers","steps":[{"astNodeIds":["3","7"],"id":"22","text":"there are 12 cucumbers"},{"astNodeIds":["4","7"],"id":"23","text":"I eat 5 cucumbers"},{"astNodeIds":["5","7"],"id":"24","text":"I should have 7 cucumbers"}],"tags":[{"astNodeId":"9","name":"@passing"}],"uri":"features/examples-tables/examples-tables.feature"}}
|
5
|
+
{"pickle":{"astNodeIds":["21","8"],"id":"29","language":"en","name":"eating cucumbers","steps":[{"astNodeIds":["3","8"],"id":"26","text":"there are 20 cucumbers"},{"astNodeIds":["4","8"],"id":"27","text":"I eat 5 cucumbers"},{"astNodeIds":["5","8"],"id":"28","text":"I should have 15 cucumbers"}],"tags":[{"astNodeId":"9","name":"@passing"}],"uri":"features/examples-tables/examples-tables.feature"}}
|
6
|
+
{"pickle":{"astNodeIds":["21","12"],"id":"33","language":"en","name":"eating cucumbers","steps":[{"astNodeIds":["3","12"],"id":"30","text":"there are 12 cucumbers"},{"astNodeIds":["4","12"],"id":"31","text":"I eat 20 cucumbers"},{"astNodeIds":["5","12"],"id":"32","text":"I should have 0 cucumbers"}],"tags":[{"astNodeId":"14","name":"@failing"}],"uri":"features/examples-tables/examples-tables.feature"}}
|
7
|
+
{"pickle":{"astNodeIds":["21","13"],"id":"37","language":"en","name":"eating cucumbers","steps":[{"astNodeIds":["3","13"],"id":"34","text":"there are 0 cucumbers"},{"astNodeIds":["4","13"],"id":"35","text":"I eat 1 cucumbers"},{"astNodeIds":["5","13"],"id":"36","text":"I should have 0 cucumbers"}],"tags":[{"astNodeId":"14","name":"@failing"}],"uri":"features/examples-tables/examples-tables.feature"}}
|
8
|
+
{"pickle":{"astNodeIds":["21","17"],"id":"41","language":"en","name":"eating cucumbers","steps":[{"astNodeIds":["3","17"],"id":"38","text":"there are 12 cucumbers"},{"astNodeIds":["4","17"],"id":"39","text":"I eat banana cucumbers"},{"astNodeIds":["5","17"],"id":"40","text":"I should have 12 cucumbers"}],"tags":[{"astNodeId":"19","name":"@undefined"}],"uri":"features/examples-tables/examples-tables.feature"}}
|
9
|
+
{"pickle":{"astNodeIds":["21","18"],"id":"45","language":"en","name":"eating cucumbers","steps":[{"astNodeIds":["3","18"],"id":"42","text":"there are 0 cucumbers"},{"astNodeIds":["4","18"],"id":"43","text":"I eat 1 cucumbers"},{"astNodeIds":["5","18"],"id":"44","text":"I should have apple cucumbers"}],"tags":[{"astNodeId":"19","name":"@undefined"}],"uri":"features/examples-tables/examples-tables.feature"}}
|
10
|
+
{"stepDefinition":{"id":"0","pattern":{"source":"there are {int} cucumbers","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":4},"uri":"features/examples-tables/examples-tables.feature.ts"}}}
|
11
|
+
{"stepDefinition":{"id":"1","pattern":{"source":"I eat {int} cucumbers","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":8},"uri":"features/examples-tables/examples-tables.feature.ts"}}}
|
12
|
+
{"stepDefinition":{"id":"2","pattern":{"source":"I should have {int} cucumbers","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":12},"uri":"features/examples-tables/examples-tables.feature.ts"}}}
|
13
|
+
{"testRunStarted":{"timestamp":{"nanos":0,"seconds":0}}}
|
14
|
+
{"testCase":{"id":"49","pickleId":"25","testSteps":[{"id":"46","pickleStepId":"22","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":10,"value":"12"},"parameterTypeName":"int"}]}]},{"id":"47","pickleStepId":"23","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":6,"value":"5"},"parameterTypeName":"int"}]}]},{"id":"48","pickleStepId":"24","stepDefinitionIds":["2"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":14,"value":"7"},"parameterTypeName":"int"}]}]}]}}
|
15
|
+
{"testCase":{"id":"53","pickleId":"29","testSteps":[{"id":"50","pickleStepId":"26","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":10,"value":"20"},"parameterTypeName":"int"}]}]},{"id":"51","pickleStepId":"27","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":6,"value":"5"},"parameterTypeName":"int"}]}]},{"id":"52","pickleStepId":"28","stepDefinitionIds":["2"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":14,"value":"15"},"parameterTypeName":"int"}]}]}]}}
|
16
|
+
{"testCase":{"id":"57","pickleId":"33","testSteps":[{"id":"54","pickleStepId":"30","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":10,"value":"12"},"parameterTypeName":"int"}]}]},{"id":"55","pickleStepId":"31","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":6,"value":"20"},"parameterTypeName":"int"}]}]},{"id":"56","pickleStepId":"32","stepDefinitionIds":["2"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":14,"value":"0"},"parameterTypeName":"int"}]}]}]}}
|
17
|
+
{"testCase":{"id":"61","pickleId":"37","testSteps":[{"id":"58","pickleStepId":"34","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":10,"value":"0"},"parameterTypeName":"int"}]}]},{"id":"59","pickleStepId":"35","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":6,"value":"1"},"parameterTypeName":"int"}]}]},{"id":"60","pickleStepId":"36","stepDefinitionIds":["2"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":14,"value":"0"},"parameterTypeName":"int"}]}]}]}}
|
18
|
+
{"testCase":{"id":"65","pickleId":"41","testSteps":[{"id":"62","pickleStepId":"38","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":10,"value":"12"},"parameterTypeName":"int"}]}]},{"id":"63","pickleStepId":"39","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"64","pickleStepId":"40","stepDefinitionIds":["2"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":14,"value":"12"},"parameterTypeName":"int"}]}]}]}}
|
19
|
+
{"testCase":{"id":"69","pickleId":"45","testSteps":[{"id":"66","pickleStepId":"42","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":10,"value":"0"},"parameterTypeName":"int"}]}]},{"id":"67","pickleStepId":"43","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":6,"value":"1"},"parameterTypeName":"int"}]}]},{"id":"68","pickleStepId":"44","stepDefinitionIds":[],"stepMatchArgumentsLists":[]}]}}
|
20
|
+
{"testCaseStarted":{"attempt":0,"id":"70","testCaseId":"49","timestamp":{"nanos":1000000,"seconds":0}}}
|
21
|
+
{"testStepStarted":{"testCaseStartedId":"70","testStepId":"46","timestamp":{"nanos":2000000,"seconds":0}}}
|
22
|
+
{"testStepFinished":{"testCaseStartedId":"70","testStepId":"46","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":3000000,"seconds":0}}}
|
23
|
+
{"testStepStarted":{"testCaseStartedId":"70","testStepId":"47","timestamp":{"nanos":4000000,"seconds":0}}}
|
24
|
+
{"testStepFinished":{"testCaseStartedId":"70","testStepId":"47","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":5000000,"seconds":0}}}
|
25
|
+
{"testStepStarted":{"testCaseStartedId":"70","testStepId":"48","timestamp":{"nanos":6000000,"seconds":0}}}
|
26
|
+
{"testStepFinished":{"testCaseStartedId":"70","testStepId":"48","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":7000000,"seconds":0}}}
|
27
|
+
{"testCaseFinished":{"testCaseStartedId":"70","timestamp":{"nanos":8000000,"seconds":0},"willBeRetried":false}}
|
28
|
+
{"testCaseStarted":{"attempt":0,"id":"71","testCaseId":"53","timestamp":{"nanos":9000000,"seconds":0}}}
|
29
|
+
{"testStepStarted":{"testCaseStartedId":"71","testStepId":"50","timestamp":{"nanos":10000000,"seconds":0}}}
|
30
|
+
{"testStepFinished":{"testCaseStartedId":"71","testStepId":"50","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":11000000,"seconds":0}}}
|
31
|
+
{"testStepStarted":{"testCaseStartedId":"71","testStepId":"51","timestamp":{"nanos":12000000,"seconds":0}}}
|
32
|
+
{"testStepFinished":{"testCaseStartedId":"71","testStepId":"51","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":13000000,"seconds":0}}}
|
33
|
+
{"testStepStarted":{"testCaseStartedId":"71","testStepId":"52","timestamp":{"nanos":14000000,"seconds":0}}}
|
34
|
+
{"testStepFinished":{"testCaseStartedId":"71","testStepId":"52","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":15000000,"seconds":0}}}
|
35
|
+
{"testCaseFinished":{"testCaseStartedId":"71","timestamp":{"nanos":16000000,"seconds":0},"willBeRetried":false}}
|
36
|
+
{"testCaseStarted":{"attempt":0,"id":"72","testCaseId":"57","timestamp":{"nanos":17000000,"seconds":0}}}
|
37
|
+
{"testStepStarted":{"testCaseStartedId":"72","testStepId":"54","timestamp":{"nanos":18000000,"seconds":0}}}
|
38
|
+
{"testStepFinished":{"testCaseStartedId":"72","testStepId":"54","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":19000000,"seconds":0}}}
|
39
|
+
{"testStepStarted":{"testCaseStartedId":"72","testStepId":"55","timestamp":{"nanos":20000000,"seconds":0}}}
|
40
|
+
{"testStepFinished":{"testCaseStartedId":"72","testStepId":"55","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":21000000,"seconds":0}}}
|
41
|
+
{"testStepStarted":{"testCaseStartedId":"72","testStepId":"56","timestamp":{"nanos":22000000,"seconds":0}}}
|
42
|
+
{"testStepFinished":{"testCaseStartedId":"72","testStepId":"56","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"message":"Expected values to be strictly equal:\n\n-8 !== 0\n\nfeatures/examples-tables/examples-tables.feature:10\nfeatures/examples-tables/examples-tables.feature:21","status":"FAILED"},"timestamp":{"nanos":23000000,"seconds":0}}}
|
43
|
+
{"testCaseFinished":{"testCaseStartedId":"72","timestamp":{"nanos":24000000,"seconds":0},"willBeRetried":false}}
|
44
|
+
{"testCaseStarted":{"attempt":0,"id":"73","testCaseId":"61","timestamp":{"nanos":25000000,"seconds":0}}}
|
45
|
+
{"testStepStarted":{"testCaseStartedId":"73","testStepId":"58","timestamp":{"nanos":26000000,"seconds":0}}}
|
46
|
+
{"testStepFinished":{"testCaseStartedId":"73","testStepId":"58","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":27000000,"seconds":0}}}
|
47
|
+
{"testStepStarted":{"testCaseStartedId":"73","testStepId":"59","timestamp":{"nanos":28000000,"seconds":0}}}
|
48
|
+
{"testStepFinished":{"testCaseStartedId":"73","testStepId":"59","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":29000000,"seconds":0}}}
|
49
|
+
{"testStepStarted":{"testCaseStartedId":"73","testStepId":"60","timestamp":{"nanos":30000000,"seconds":0}}}
|
50
|
+
{"testStepFinished":{"testCaseStartedId":"73","testStepId":"60","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"message":"Expected values to be strictly equal:\n\n-1 !== 0\n\nfeatures/examples-tables/examples-tables.feature:10\nfeatures/examples-tables/examples-tables.feature:22","status":"FAILED"},"timestamp":{"nanos":31000000,"seconds":0}}}
|
51
|
+
{"testCaseFinished":{"testCaseStartedId":"73","timestamp":{"nanos":32000000,"seconds":0},"willBeRetried":false}}
|
52
|
+
{"testCaseStarted":{"attempt":0,"id":"74","testCaseId":"65","timestamp":{"nanos":33000000,"seconds":0}}}
|
53
|
+
{"testStepStarted":{"testCaseStartedId":"74","testStepId":"62","timestamp":{"nanos":34000000,"seconds":0}}}
|
54
|
+
{"testStepFinished":{"testCaseStartedId":"74","testStepId":"62","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":35000000,"seconds":0}}}
|
55
|
+
{"testStepStarted":{"testCaseStartedId":"74","testStepId":"63","timestamp":{"nanos":36000000,"seconds":0}}}
|
56
|
+
{"testStepFinished":{"testCaseStartedId":"74","testStepId":"63","testStepResult":{"duration":{"nanos":0,"seconds":0},"status":"UNDEFINED"},"timestamp":{"nanos":37000000,"seconds":0}}}
|
57
|
+
{"testStepStarted":{"testCaseStartedId":"74","testStepId":"64","timestamp":{"nanos":38000000,"seconds":0}}}
|
58
|
+
{"testStepFinished":{"testCaseStartedId":"74","testStepId":"64","testStepResult":{"duration":{"nanos":0,"seconds":0},"status":"SKIPPED"},"timestamp":{"nanos":39000000,"seconds":0}}}
|
59
|
+
{"testCaseFinished":{"testCaseStartedId":"74","timestamp":{"nanos":40000000,"seconds":0},"willBeRetried":false}}
|
60
|
+
{"testCaseStarted":{"attempt":0,"id":"75","testCaseId":"69","timestamp":{"nanos":41000000,"seconds":0}}}
|
61
|
+
{"testStepStarted":{"testCaseStartedId":"75","testStepId":"66","timestamp":{"nanos":42000000,"seconds":0}}}
|
62
|
+
{"testStepFinished":{"testCaseStartedId":"75","testStepId":"66","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":43000000,"seconds":0}}}
|
63
|
+
{"testStepStarted":{"testCaseStartedId":"75","testStepId":"67","timestamp":{"nanos":44000000,"seconds":0}}}
|
64
|
+
{"testStepFinished":{"testCaseStartedId":"75","testStepId":"67","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":45000000,"seconds":0}}}
|
65
|
+
{"testStepStarted":{"testCaseStartedId":"75","testStepId":"68","timestamp":{"nanos":46000000,"seconds":0}}}
|
66
|
+
{"testStepFinished":{"testCaseStartedId":"75","testStepId":"68","testStepResult":{"duration":{"nanos":0,"seconds":0},"status":"UNDEFINED"},"timestamp":{"nanos":47000000,"seconds":0}}}
|
67
|
+
{"testCaseFinished":{"testCaseStartedId":"75","timestamp":{"nanos":48000000,"seconds":0},"willBeRetried":false}}
|
68
|
+
{"testRunFinished":{"success":false,"timestamp":{"nanos":49000000,"seconds":0}}}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Given('there are {int} cucumbers') do |initial_count|
|
2
|
+
@count = initial_count
|
3
|
+
end
|
4
|
+
|
5
|
+
When('I eat {int} cucumbers') do |eat_count|
|
6
|
+
@count -= eat_count
|
7
|
+
end
|
8
|
+
|
9
|
+
Then('I should have {int} cucumbers') do |expected_count|
|
10
|
+
expect(@count).to eq(expected_count)
|
11
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="ml-3 ml-md-0" viewBox="0 0 40.59 46.31" width="40.59" height="46.31">
|
2
|
+
<g>
|
3
|
+
<path fill="#23d96c" fill-rule="evenodd" d="M30.283 3.645q-.528-.317-1.08-.593a16.164 16.164 0 00-1.154-.518c-.124-.052-.247-.1-.372-.149-.343-.127-.689-.268-1.042-.371a19.427 19.427 0 10-9.792 37.51v5.56c11.676-1.753 22.016-10.979 22.787-23.093.459-7.289-3.193-14.73-9.347-18.346z"/>
|
4
|
+
<path fill="#173647" d="M15.787 46.307v-5.935A20.472 20.472 0 1126.959 1.015c.274.08.557.187.832.291l.248.093c.165.064.291.113.417.167.348.137.739.313 1.208.543q.589.295 1.153.633c6.393 3.756 10.354 11.518 9.857 19.316-.763 12-10.722 22.122-23.679 24.067zm4.8-44.214h-.026a18.366 18.366 0 00-3.524 36.408l.85.165v5.18c11.392-2.224 20.009-11.272 20.686-21.922.448-7.033-3.1-14.018-8.83-17.383l-.008-.005A14.691 14.691 0 0027.654 3.5a5.74 5.74 0 00-.344-.138l-.27-.1a9.49 9.49 0 00-.708-.249 18.425 18.425 0 00-5.743-.92z"/>
|
5
|
+
<path fill="#173647" fill-rule="evenodd" d="M16.666 10.58a1.8 1.8 0 011.583.608 4.184 4.184 0 01.728 1.107c.645 1.422 1.027 3.461.23 4.605a6.334 6.334 0 01-3.981-3.087 3.236 3.236 0 01-.347-1.339 1.957 1.957 0 011.787-1.894zm-5.683 8.025a7.742 7.742 0 001.218.737 5.789 5.789 0 004.883-.138 6.116 6.116 0 00-3.345-3.45 3.664 3.664 0 00-1.442-.321 1.884 1.884 0 00-.319 0 1.766 1.766 0 00-.995 3.172zm6.1 3.433c-.777-.518-2.379-.309-3.312-.292a4.416 4.416 0 00-1.666.352 3.5 3.5 0 00-1.218.738 1.817 1.817 0 001.409 3.171 3.3 3.3 0 001.442-.321c1.436-.62 3.141-2.32 3.346-3.648zm2.61 2a6.556 6.556 0 00-3.724 3.506 3.091 3.091 0 00-.321 1.314 1.907 1.907 0 003.3 1.346 7.422 7.422 0 00.7-1.218c.621-1.333.866-3.72.046-4.948zm2.557-7.167a5.941 5.941 0 003.7-3.167 3.243 3.243 0 00.319-1.346 1.915 1.915 0 00-1.794-1.954 1.832 1.832 0 00-1.6.641 7.382 7.382 0 00-.705 1.218c-.62 1.434-.842 3.48.081 4.603zm4.208 12.115a3.244 3.244 0 00-.321-1.345 5.869 5.869 0 00-3.554-3.269 5.386 5.386 0 00-.226 4.711 4.147 4.147 0 00.7 1.121c1.133 1.23 3.505.32 3.402-1.218zm4.2-6.28a7.466 7.466 0 00-1.217-.7 4.425 4.425 0 00-1.666-.352 6.4 6.4 0 00-3.188.555 5.959 5.959 0 003.316 3.386 3.672 3.672 0 001.442.32 1.8 1.8 0 001.31-3.209z"/>
|
6
|
+
</g>
|
7
|
+
</svg>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Feature: Hooks
|
2
|
+
Hooks are special steps that run before or after each scenario's steps.
|
3
|
+
They can also conditionally target specific scenarios, using tag expressions
|
4
|
+
|
5
|
+
Scenario: no tags, passed step
|
6
|
+
When a step passes
|
7
|
+
|
8
|
+
Scenario: no tags, failed step
|
9
|
+
When a step throws an exception
|
10
|
+
|
11
|
+
Scenario: no tags, undefined step
|
12
|
+
When a step throws an exception
|
13
|
+
|
14
|
+
@some-tag
|
15
|
+
Scenario: with a tag, passed step
|
16
|
+
When a step passes
|
17
|
+
|
18
|
+
@with-attachment
|
19
|
+
Scenario: with an attachment in the hook
|
20
|
+
When a step passes
|