This repository was archived by the owner on Jul 21, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
This repository was archived by the owner on Jul 21, 2025. It is now read-only.
Inaccurate output of scenario outlined with parameterized nameΒ #25
Copy link
Copy link
Open
Description
π What did you see?
There's a difference in outputted JSON from cucumber-js compared to its messages piped through cucumber-json-formatter when the scenario outline contains a parameter.
β What did you expect to see?
The JSON output of cucumber-js in case of such scenario.
[
{
"description": "",
"elements": [
{
"description": "",
"id": "a-feature;foo",
"keyword": "Scenario Outline",
"line": 2,
"name": "foo",
"steps": [
{
"arguments": [],
"keyword": "Given ",
"line": 3,
"name": "a step",
"match": {
"location": "features/definitions.js:3"
},
"result": {
"status": "passed",
"duration": 306941
}
}
],
"tags": [],
"type": "scenario"
}
],
"id": "a-feature",
"line": 1,
"keyword": "Feature",
"name": "a feature",
"tags": [],
"uri": "features/foo.feature"
}
]However, when piping the messages output through cucumber-json-formatter I get the following.
[
{
"description": "",
"elements": [
{
"description": "",
"id": "a-feature;\u003cvalue\u003e;;2",
"keyword": "Scenario Outline",
"line": 6,
"name": "\u003cvalue\u003e",
"steps": [
{
"keyword": "Given ",
"line": 3,
"name": "a step",
"result": {
"duration": 306941,
"status": "passed"
},
"match": {
"location": "features/definitions.js:3"
}
}
],
"type": "scenario"
}
],
"id": "a-feature",
"keyword": "Feature",
"line": 1,
"name": "a feature",
"uri": "features/foo.feature"
}
]Notice the diff (using json-diff), IE. the parameter in the name property has not been replaced with the value.
[
{
- tags: [
- ]
elements: [
{
- tags: [
- ]
- id: "a-feature;foo"
+ id: "a-feature;<value>;;2"
- line: 2
+ line: 6
- name: "foo"
+ name: "<value>"
steps: [
{
- arguments: [
- ]
}
]
}
]
}
]π¦ Which tool/library version are you using?
- cucumber-js: 8.5.1
- cucumber-json-formatter: 19.0.0
π¬ How could we reproduce it?
Steps to reproduce the behavior:
git clone https://github.com/badeball/reproducible-issues.gitcd reproducible-issues/cucumber/outline-name-parameternpx @cucumber/cucumbernpx json-diff report.json <(cat report.ndjson | cucumber-json-formatter)
ffengGP
Metadata
Metadata
Assignees
Labels
No labels