Skip to content

Eclipse Junit plugin broken by multiline examples #872

@temyers

Description

@temyers

If I have a feature file containing a multiline argument in an example table, running it using the Cucumber JUnit runner through Eclipse, progress is not reported and the test never completes in the JUnit view and the process is still running under the debug view (although the process finishes as expected in the console)

Sample Cucumber runner:

package test.samples.acceptancetests;

import org.junit.runner.RunWith;

import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;

@RunWith(Cucumber.class)
@CucumberOptions(glue = { "test" }, features = "src/test/resources/features", format = {
        "pretty", "json:target/cucumber-reports/cucumber.json" }, tags = { "@complete,@accepted,@dev,@wip" })
public class DryRunTests {
}

Sample feature file:

Feature: Junit Eclipse

    In order to be productive
    As a tester
    I want to run Cucumber scenarios through Eclipse

    @dev
    Scenario Outline: test multiline output
        Given I have the text:
        """
        one
        two
        """
        When I look for text
        Then I should see <output>

        Examples:
        | output   |
        | one\ntwo |

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions