serenity-bdd / serenity-core

Serenity BDD is a test automation library designed to make writing automated acceptance tests easier, and more fun.
http://serenity-bdd.info
Other
723 stars 518 forks source link

Json Report not generating in Gitlab CI/CD pipeline using Gradle #3567

Open ZakiZoubian opened 3 weeks ago

ZakiZoubian commented 3 weeks ago

What happened?

It was observed that when running the serenity cucumber starter project with Serenity 4.2.6, when using the json plugin the json report does not generate in a Gitlab CI/CD pipeline when using Gradle.

However, when the automation is running locally on machine (MacOS), the report generates successfully.

What did you expect to happen?

Report generates in Gitlab CI/CD.

Serenity BDD version

4.2.6

JDK version

jdk17

Execution environment

Using docker image: gradle:jdk17-alpine

How to reproduce the bug.

Setup a gitlab project with the follow .gitlab-ci.yml, and serenity cucumber starter project. test: image: gradle:jdk17-alpine before_script:

CucumberTestSuite.java: @Suite @IncludeEngines("cucumber") @SelectClasspathResource("/features") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "io.cucumber.core.plugin.SerenityReporterParallel,pretty,timeline:build/test-results/timeline,json:target/cucumber/cucumber_report.json") public class CucumberTestSuite { }

How can we make it happen?

Add it to the Serenity BDD backlog and wait for a volunteer to pick it up

ZakiZoubian commented 3 weeks ago

Works on: distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip

Stops working starting at: distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip

ZakiZoubian commented 3 weeks ago

i guess i have a way around this issue, we can use these gradle wrappers with the recent serenity releases: Gradle 7.6.4, or Gradle 8.3 to 8.7.

wakaleo commented 2 weeks ago

Sound's like it's related to Gradle versions. Please feel free to propose a PR or request commercial support if this is important to your organisation and/or if you need it fixed in a defined time frame.