Search code examples
junitserenity-bddcucumber-junitcucumber-serenity

Serenity Report aren't generated in case test is executed locally


I updated the serenity version. We used the 3.3.2 version and I updated to use the most recent one 3.9.8. The new version broke the serenity report generation. The report is not generated anymore in case we are running the test locally with a JUnit Runner:

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
    plugin = {"pretty"},
    glue = {"com.vicoland"},
    tags = ("not @ignore and @single"),
    features = "src/test/resources/features"
)
public class RunSingleTest {
}

The reports are generated in case the tests are running with maven since we are executing the serenity report generation from maven plugin.

Somebody knows which additional configuration should be make in order to generate the report when the tests are executed locally in IntelJIdea using the above Runner?


Solution

  • I enabled the DEBUG mode during the local test execution. It seems the default reporting mode was moved to JSON from HTML:

    DEBUG n.t.core.reports.ReportService - Reporting formats: [HTML]

    I changed inside the serenity.conf to use the html as output format: output.formats=html

    After this the html report was generated and it was enabled inside the test's log.