Cucumber-jvm: Cucumber report junit 5

Created on 3 Jun 2020  ·  2Comments  ·  Source: cucumber/cucumber-jvm

Unable to generate the report with junit 5 and cucumber platform engine

Only use platform engine @Cucumber

Generate a report at the end of the test.

The json file is needed to complete my dashboard.

windows 10
eclipse

bug waiting-for-feedback

Most helpful comment

Have you configured the appropriate plugin through src/test/resources/junit-platform.properties ? When I have such a file containing:

cucumber.plugin=pretty,json:target/cucumber/report.json

And I run my tests through something like:

package my.company.cucumber;
@io.cucumber.junit.platform.engine.Cucumber
public class RunCucumberIT {
    // Allow Maven failsafe to discover Cucumber tests
}

Then I get pretty output on stdout, and json output in target/cucumber/report.json.
The relevant documentation for all of this is here. Does any of that help?

If not then we definitely need more information on what you are and aren't using to run your tests.

All 2 comments

Have you configured the appropriate plugin through src/test/resources/junit-platform.properties ? When I have such a file containing:

cucumber.plugin=pretty,json:target/cucumber/report.json

And I run my tests through something like:

package my.company.cucumber;
@io.cucumber.junit.platform.engine.Cucumber
public class RunCucumberIT {
    // Allow Maven failsafe to discover Cucumber tests
}

Then I get pretty output on stdout, and json output in target/cucumber/report.json.
The relevant documentation for all of this is here. Does any of that help?

If not then we definitely need more information on what you are and aren't using to run your tests.

Please feel free to reopen with more information.

Was this page helpful?
0 / 5 - 0 ratings