Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Ruby: Track Steps/Results for each Example in a Scenario Outline using Json Formatter #224

Open
fcbeyer opened this issue Jan 24, 2013 · 2 comments

Comments

@fcbeyer
Copy link
Contributor

fcbeyer commented Jan 24, 2013

When using the json formatter with a regular scenario, the json formatter records each step of the scenario and the results of each step. This is great for reports and tracking this data historically.

When using the json formatter with a scenario outline, the json formatter records the steps that make up the scenario, but only shows their results once. It then has an array of all the examples used (inferring to the user that these steps were executed N times). Would it make sense to modify the json formatter to instead dump out the steps results for each example? Treat each example as a new scenario object. That way you could track duration/status for each example you are using in the outline. It would also allow reports to inform the user which specific example and step failed and why. Yes, the json output would be a lot larger but wouldn't the added information be beneficial to most users?

@fcbeyer
Copy link
Contributor Author

fcbeyer commented Jan 24, 2013

not sure if this should be filed under the Cucumber project or Gherkin, I will open a similar issue for Cucumber, we can close whichever is incorrect.

@fcbeyer
Copy link
Contributor Author

fcbeyer commented Jan 24, 2013

so it looks like when I use the --expand call I get what I want for scenario outline examples being run as individual scenarios, but when I add --format json --o cucumber.json the --expand option is ignored

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant