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
@mri186 @diffxml
Scenario: one feature, one passing scenario, one failing scenario
When I run cucumber --format junit --out tmp/ features/one_passing_one_failing.feature
Then it should fail with
"""
"""
And "examples/junit/tmp/TEST-One_passing_scenario__one_failing_scenario.xml" should contain XML
"""
(RuntimeError)
./features/step_definitions/steps.rb:6:in `/a failing scenario/'
features/one_passing_one_failing.feature:7:in `Given a failing scenario'
"""
@mri186 @diffxml
Scenario: pending step
When I run cucumber --format junit --out tmp/ features/pending.feature
Then it should pass with
"""
"""
And "examples/junit/tmp/TEST-Pending_step.xml" should contain XML
"""
TODO (Cucumber::Pending)
./features/step_definitions/steps.rb:10:in `/a pending step/'
features/pending.feature:4:in `Given a pending step'
"""
Scenario: run all features
When I run cucumber --format junit --out tmp/ features
Then it should fail with
"""
"""
And "examples/junit/tmp/TEST-One_passing_scenario__one_failing_scenario.xml" should exist
And "examples/junit/tmp/TEST-Pending_step.xml" should exist