-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
JUnit formater doesn't report Scenario outline example with -x argument #124
Comments
I managed to see what happen actually: when -x argument is passed, whenever an error (even error on asseertions) occurs in a scennario outline case, the other cases of the outline wont execute (and will be considerated as failed) |
Here is a scenario to reproduce the error on today's master. Steps to reproduce:
Feature: JUnit output formatter
In order for developers to create test reports with ant
Cucumber should be able to output JUnit xml files
Background:
Given I am in junit
And the tmp directory is empty
Scenario: Expand scenario outline into one passing and one failing scenario
When I run cucumber --format junit --expand --out tmp/ features/scenario_outline.feature
Then it should fail with
"""
"""
And "fixtures/junit/tmp/TEST-features-scenario_outline.xml" with junit duration "0.005" should contain
"""
<?xml version="1.0" encoding="UTF-8"?>
<testsuite errors="0" failures="1" name="Scenario outlines" skipped="0" tests="2" time="0.005">
<testcase classname="Scenario outlines.Using scenario outlines" name="Using scenario outlines (outline example : | passing |)" time="0.005">
</testcase>
<testcase classname="Scenario outlines.Using scenario outlines" name="Using scenario outlines (outline example : | failing |)" time="0.005">
<failure message="failed Using scenario outlines (outline example : | failing |)" type="failed">
<![CDATA[Scenario Outline: Using scenario outlines
Scenario: |failing|
Given a failing scenario
Message:
]]>
<![CDATA[ (RuntimeError)
features/scenario_outline.feature:4:in `Given a <type> scenario']]>
</failure>
</testcase>
</testsuite>
"""
Expected results: Actual results:
|
Any plans on fixing this, this seems like a fairly big issue for folks who want to use the 'expand' option with the junit formatter for scenario outlines. |
This is big issue for the people that are using cucumber with Jenkins, that depend on that junit output. |
This is affecting me as well, since I was probably one of the last people to touch the JUnit formatter, I'll look into fixing this up. |
@rtyler do you think you're still likely to fix this? |
Hands up if you still care about this issue. |
@brasmusson @richarda either of you fancy a crack at this one? |
Sure!
|
Closed in favour of #808 |
Jenkins chokes on JUnit XML results that contain no `testcase` elements, a scenario that can arise due to issue cucumber#124. This expedient workaround avoids writing out XML where no test results were actually handled.
Jenkins chokes on JUnit XML results that contain no `testcase` elements, a scenario that can arise due to issue cucumber#124. Backporting the fix to the latter proved to be insanely difficult so I wrote this expedient workaround that avoids writing out XML where no test results were actually handled.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello,
I noticed a little annoying bug. consider my Rakefile:
The cucumber proffiles only define environment variable to set selenium url and desired browser capabilities
When i execure rake cucumber:report, only Scenarios are reported to the JUnit result report, Scenario Outlines examples aren't.
When I remove the -x flag they are reported.
The text was updated successfully, but these errors were encountered: