Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrade serenity to version 4.1.10 I get an error on test scenario details, test report is not generated correctly #3468

Open
fericeand opened this issue May 15, 2024 · 25 comments

Comments

@fericeand
Copy link

fericeand commented May 15, 2024

What happened?

After upgrading serenity to 4.1.10 and java to version 21 the serenity report is not generated correctly. When clicking on scenario link from generated report to see the details I'm getting the error
"NoSuchKey: The specified key does not exist.
status code: 404, request id: 806WFWKCBT5R3W18, host id: YvSr5k8vq1dnmgRlD4G59VIxjg8d2kg6UKwtdHgXnKxoEk9rvk1KTjCU8ZdcfYbeFynHsONCoG0="

I am using Junit5, Serenity 4.1.10, Java 21 and gradle.

What did you expect to happen?

I am expecting to see test result details when clicking on scenario link

Serenity BDD version

4.1.10

JDK version

21

Execution environment

The report is generated through Buildkite and we use Gradle

How to reproduce the bug.

Upgrading serenity to latest version and using junit5

How can we make it happen?

Work on this myself and propose a PR (with Serenity BDD team guidance)

@wakaleo
Copy link
Member

wakaleo commented May 19, 2024

Can you provide a sample project that reproduces this issue?

@fericeand
Copy link
Author

this is the build.gradle
`plugins {
id "io.freefair.lombok" version "8.6"
id "net.serenity-bdd.serenity-gradle-plugin" version "4.1.10"
id "java"
id "idea"
id 'checkstyle'
id 'com.adarshr.test-logger' version '4.0.0'
id "org.gradle.test-retry" version "1.5.9"
}

group = 'com.fanduel.fgp'
version '0.0.1-SNAPSHOT'

defaultTasks 'clean', 'test', 'aggregate'

repositories {
mavenCentral()
}

ext {
slf4jVersion = '2.0.13'
serenityCoreVersion = '4.1.10'
serenityCucumberVersion = '4.1.10'
junitVersion = '5.11.0-M1'
junitLauncher = '1.11.0-M1'
assertJVersion = '3.25.3'
logbackVersion = '1.5.6'
jacksonVersion = '2.17.0'
jacksonDataFormatVersion = '2.17.0'
serenityVersion = '5:4.1.10'
aws_version = '2.20.103'
}

dependencies {
implementation "ch.qos.logback:logback-classic:${logbackVersion}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${jacksonVersion}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}"
implementation group: 'org.jboss.aerogear', name: 'aerogear-otp-java', version: '1.0.0'
implementation "mysql:mysql-connector-java:8.0.32"

testImplementation "net.serenity-bdd:serenity-core:${serenityCoreVersion}"
testImplementation "net.serenity-bdd:serenity-screenplay-rest:${serenityCoreVersion}"
testImplementation "net.serenity-bdd:serenity-ensure:${serenityCoreVersion}"
testImplementation "org.junit.platform:junit-platform-launcher:${junitLauncher}"
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
testImplementation "org.junit.vintage:junit-vintage-engine:${junitVersion}"
testImplementation "org.assertj:assertj-core:${assertJVersion}"
testImplementation "net.serenity-bdd:serenity-junit${serenityVersion}"
testImplementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonDataFormatVersion}"

testImplementation platform("software.amazon.awssdk:bom:${aws_version}")
testImplementation 'software.amazon.awssdk:s3'
testImplementation 'software.amazon.awssdk:sts'

}

test {
testlogger {
theme 'standard-parallel' // task level
}
testLogging.showStandardStreams = true
systemProperties System.getProperties()
def test_suite = System.getenv().get("TEST_FLAG")
retry {
maxRetries = 1
maxFailures = 10
}
useJUnitPlatform {
excludeTags 'org.junit.jupiter.api.Disabled'

    if ((test_suite != null) && (test_suite != "full_suite")) {
        def tags = test_suite.replace(',', ' & ')
        includeTags tags
    }
}

}

gradle.startParameter.continueOnFailure = true
test.finalizedBy(aggregate)

`

@fericeand
Copy link
Author

in my case the report is generated but on test scenario details i got the error,, see in the below images
Screenshot 2024-05-20 at 09 01 17
Screenshot 2024-05-20 at 09 01 30
Screenshot 2024-05-20 at 09 01 40

@scormaq
Copy link
Contributor

scormaq commented May 20, 2024

@fericeand same, after upgrading to 4.1.12, generated report does not contain pages for scenario details.
I upgraded from 4.1.0

@wakaleo
Copy link
Member

wakaleo commented May 20, 2024

in my case the report is generated but on test scenario details i got the error,, see in the below images Screenshot 2024-05-20 at 09 01 17 Screenshot 2024-05-20 at 09 01 30 Screenshot 2024-05-20 at 09 01 40

"NoSuchKey..." is not a Serenity error. Can you provide a sample project that reproduces this behaviour locally?

@wakaleo
Copy link
Member

wakaleo commented May 20, 2024

@fericeand same, after upgrading to 4.1.12, generated report does not contain pages for scenario details. I upgraded from 4.1.0

Try running with the filenames uncompressed - not much has changed between 4.1.12 and 4.1.0 though.

@scormaq
Copy link
Contributor

scormaq commented May 20, 2024

@wakaleo I played with versions a little bit, it has nothing to do with serenity-core. Issue happens when to upgrade net.serenity-bdd.serenity-gradle-plugin from 4.0.46 to 4.1.3

@wakaleo
Copy link
Member

wakaleo commented May 20, 2024

I don't use Gradle so most of the Gradle changes are community driven. Can you have a look at the code and see if you can see anything?

@scormaq
Copy link
Contributor

scormaq commented May 20, 2024

@wakaleo as I see it's a known issue
serenity-bdd/serenity-gradle-plugin#29

@fericeand
Copy link
Author

downgraading the serenity gradle plugin version to 4.0.1 fixes the problem

@wakaleo
Copy link
Member

wakaleo commented May 21, 2024

downgraading the serenity gradle plugin version to 4.0.1 fixes the problem

Can you tell me the first version where you see the issue occurring?

@fericeand
Copy link
Author

I've tried directly with 4.1.10 and it fails. before I've used 3.. version

@wakaleo
Copy link
Member

wakaleo commented May 21, 2024

It appears to be a Gradle-specific issue caused by a PR. I will roll back the PR.

@wakaleo
Copy link
Member

wakaleo commented May 21, 2024

Can you try with version 4.1.13?

@fericeand
Copy link
Author

I get this error with 4.1.13

  | fatal: failed to download artifacts: No artifacts found for downloading

@wakaleo
Copy link
Member

wakaleo commented May 21, 2024

Try again in an hour or so - the plugin was deployed recently

@fericeand
Copy link
Author

Starting a Gradle Daemon (subsequent builds will be faster)

  |  
  | FAILURE: Build failed with an exception.
  |  
  | * Where:
  | Build file '/workdir/build.gradle' line: 79
  |  
  | * What went wrong:
  | A problem occurred evaluating root project 'fgp-api-tests'.
  | > Could not create task ':aggregate'.
  | > Could not get unknown property 'generateOutcomes' for extension 'serenity' of type net.serenitybdd.plugins.gradle.SerenityPluginExtension.
  |  
  | * Try:

@wakaleo
Copy link
Member

wakaleo commented May 22, 2024

Starting a Gradle Daemon (subsequent builds will be faster)

  |     | FAILURE: Build failed with an exception.   |     | * Where:   | Build file '/workdir/build.gradle' line: 79   |     | * What went wrong:   | A problem occurred evaluating root project 'fgp-api-tests'.   | > Could not create task ':aggregate'.   | > Could not get unknown property 'generateOutcomes' for extension 'serenity' of type net.serenitybdd.plugins.gradle.SerenityPluginExtension.   |     | * Try:

OK, looks like there's a bug in the PR that tried to fix the bug in the original PR. I am not familiar with Gradle or these changes, so unless someone from the community can test locally and raise a PR, I will just revert to an older version which will have some other known issues.

@wakaleo
Copy link
Member

wakaleo commented May 22, 2024

Can you try with 4.1.14?

@fericeand
Copy link
Author

same error with no such key for 4.1.14

@wakaleo
Copy link
Member

wakaleo commented May 23, 2024

same error with no such key for 4.1.14

It could be project specific, as the reports now work correctly for the test suites I have been testing with (see for example https://github.com/serenity-bdd/screenplay-pattern-todomvc.git). For project-specific support you will need to get some commercial support so we can help with that.

@Hammadkhan199
Copy link

Does serenity version 4.1.14 supports java 21 ? The build passes but not able to run Test Cases

@wakaleo
Copy link
Member

wakaleo commented Sep 3, 2024

Yes

@Hammadkhan199
Copy link

I tried serenity version 4.1.14 with java 18 and java 21. It does not run. But java 11 runs. Any changes needed to be done ?

@wakaleo
Copy link
Member

wakaleo commented Sep 3, 2024

Check your dependencies. Serenity 4.1.x and 4.2.x runs fine with Java 21, but JUnit can be more fiddly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants