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: 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 "fixtures/junit/tmp/TEST-features-one_passing_one_failing.xml" with junit duration "0.005" should contain """ """ Scenario: one feature in a subdirectory, one passing scenario, one failing scenario When I run cucumber --format junit --out tmp/ features/some_subdirectory/one_passing_one_failing.feature --require features Then it should fail with """ """ And "fixtures/junit/tmp/TEST-features-some_subdirectory-one_passing_one_failing.xml" with junit duration "0.005" should contain """ """ Scenario: pending and undefined steps are reported as skipped When I run cucumber --format junit --out tmp/ features/pending.feature Then it should pass with """ """ And "fixtures/junit/tmp/TEST-features-pending.xml" with junit duration "0.009" should contain """ """ Scenario: pending and undefined steps with strict option should fail When I run cucumber --format junit --out tmp/ features/pending.feature --strict Then it should fail with """ """ And "fixtures/junit/tmp/TEST-features-pending.xml" with junit duration "0.000160" should contain """ """ Scenario: run all features When I run cucumber --format junit --out tmp/ features Then it should fail with """ """ And "fixtures/junit/tmp/TEST-features-one_passing_one_failing.xml" should exist And "fixtures/junit/tmp/TEST-features-pending.xml" should exist Scenario: show correct error message if no --out is passed When I run cucumber --format junit features Then STDERR should not match """ can't convert .* into String \(TypeError\) """ And STDERR should match """ You \*must\* specify \-\-out DIR for the junit formatter """ Scenario: one feature, one scenario outline, two examples: one passing, one failing When I run cucumber --format junit --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 """ scenario']]> """