features/json_formatter.feature in cucumber-0.8.0 vs features/json_formatter.feature in cucumber-0.8.1
- old
+ new
@@ -37,11 +37,12 @@
"name": "Passing",
"file_colon_line": "features/one_passing_one_failing.feature:5",
"steps": [
{
"status": "passed",
- "name": "Given a passing step",
+ "keyword": "Given ",
+ "name": "a passing step",
"file_colon_line": "features/step_definitions/steps.rb:1"
}
]
},
{
@@ -60,11 +61,12 @@
"./features/step_definitions/steps.rb:6:in `/a failing step/'",
"features/one_passing_one_failing.feature:10:in `Given a failing step'"
]
},
"status": "failed",
- "name": "Given a failing step",
+ "keyword": "Given ",
+ "name": "a failing step",
"file_colon_line": "features/step_definitions/steps.rb:5"
}
]
}
]
@@ -95,16 +97,18 @@
"name": "",
"file_colon_line": "features/tables.feature:3",
"steps": [
{
"status": "skipped",
- "name": "Given I add <a> and <b>",
+ "keyword": "Given ",
+ "name": "I add <a> and <b>",
"file_colon_line": "features/step_definitions/steps.rb:13"
},
{
"status": "skipped",
- "name": "When I pass a table argument",
+ "keyword": "When ",
+ "name": "I pass a table argument",
"file_colon_line": "features/step_definitions/steps.rb:25",
"table": [
{"cells":
[{"text":"foo", "status": null},
{"text":"bar", "status": null}]},
@@ -113,11 +117,12 @@
{"text": "baz", "status": null}]}
]
},
{
"status": "skipped",
- "name": "Then I the result should be <c>",
+ "keyword": "Then ",
+ "name": "I the result should be <c>",
"file_colon_line": "features/step_definitions/steps.rb:17"
}
],
"examples": {
"name": "Examples ",
@@ -209,11 +214,12 @@
"name": "",
"file_colon_line": "features/pystring.feature:3",
"steps": [
{
"status": "passed",
- "name": "Then I should see",
+ "keyword": "Then ",
+ "name": "I should see",
"file_colon_line": "features/step_definitions/steps.rb:21",
"py_string": "a string"
}
]
}
@@ -238,11 +244,12 @@
],
"background": {
"steps": [
{
"status": "passed",
- "name": "Given a passing step",
+ "keyword": "Given ",
+ "name": "a passing step",
"file_colon_line": "features/step_definitions/steps.rb:1"
}
]
},
"elements": [
@@ -254,11 +261,12 @@
"name": "",
"file_colon_line": "features/background.feature:6",
"steps": [
{
"status": "passed",
- "name": "Given a passing step",
+ "keyword": "Given ",
+ "name": "a passing step",
"file_colon_line": "features/step_definitions/steps.rb:1"
},
{
"exception": {
"class": "RuntimeError",
@@ -267,15 +275,59 @@
"./features/step_definitions/steps.rb:6:in `/a failing step/'",
"features/background.feature:7:in `Given a failing step'"
]
},
"status": "failed",
- "name": "Given a failing step",
+ "keyword": "Given ",
+ "name": "a failing step",
"file_colon_line": "features/step_definitions/steps.rb:5"
}
]
}
]
}
]
}
"""
+
+ Scenario: embedding screenshot
+ When I run cucumber --format json_pretty features/embed.feature
+ Then STDERR should be empty
+ And it should pass with JSON
+ """
+ {
+ "features": [
+ {
+ "file": "features/embed.feature",
+ "name": "A screenshot feature",
+ "tags": [
+
+ ],
+ "elements": [
+ {
+ "tags": [
+
+ ],
+ "keyword": "Scenario",
+ "name": "",
+ "file_colon_line": "features/embed.feature:3",
+ "steps": [
+ {
+ "status": "passed",
+ "keyword": "Given ",
+ "name": "I embed a screenshot",
+ "file_colon_line": "features/step_definitions/steps.rb:29",
+ "embedded": [
+ {
+ "file": "tmp/screenshot.png",
+ "mime_type": "image/png",
+ "data": "Zm9v\n"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ """
\ No newline at end of file