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 data tables #16

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

charlieok
Copy link

ci_reporter_cucumber was not distinguishing between data tables and tables of examples. The latter should be processed as individual test cases while the former should not.

This update adds that feature.

Charlie O'Keefe added 9 commits October 18, 2016 15:36
If a row doesn't respond to scenario_outline,
assume it is a data table rather than an example
table for a scenario outline. It doesn't make
sense to create a test case for a row in a data
table.
The main reason for this addition is to
consolidate calls to instance_of? into a method
that can be easily stubbed, since mock objects
won't play nicely with instance_of?
Only create a TestCase if we are in a Scenario.

Steps in a ScenarioOutline don't by themselves
define a TestCase to be executed, timed, and
reported. Not until we get to the example rows
will we want to do that.
@shepmaster
Copy link
Member

This is great, thank you! I'm a bit swamped for the next week or so helping with a conference, but please feel free to ping me if I let this sit for too long!

@charlieok
Copy link
Author

So after writing this I discovered that cucumber actually has a built-in junit formatter which does what I was attempting to add here. Wondering whether there is still a reason to use ci_reporter_cucumber given that alternative.

In any case, I hope this addition is useful to somebody :)

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

Successfully merging this pull request may close these issues.

2 participants