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

Unable to generate serenity-reports #33

Open
u-sandeep opened this issue Nov 1, 2022 · 3 comments
Open

Unable to generate serenity-reports #33

u-sandeep opened this issue Nov 1, 2022 · 3 comments

Comments

@u-sandeep
Copy link

I see the below stack trace on standard output

java.lang.NoSuchMethodError: 'java.lang.Class org.junit.platform.engine.support.descriptor.MethodSource.getJavaClass()'
at net.serenitybdd.junit5.SerenityTestExecutionListener.testingThisTest(SerenityTestExecutionListener.java:425) ~[serenity-junit5-3.1.15.jar:na]
at net.serenitybdd.junit5.SerenityTestExecutionListener.testStarted(SerenityTestExecutionListener.java:396) ~[serenity-junit5-3.1.15.jar:na]
at net.serenitybdd.junit5.SerenityTestExecutionListener.executionStarted(SerenityTestExecutionListener.java:236) ~[serenity-junit5-3.1.15.jar:na]
at org.junit.platform.launcher.core.TestExecutionListenerRegistry$CompositeTestExecutionListener.lambda$executionStarted$6(TestExecutionListenerRegistry.java:99) ~[junit-platform-launcher-1.6.3.jar:1.6.3]
at org.junit.platform.launcher.core.TestExecutionListenerRegistry.lambda$notifyEach$1(TestExecutionListenerRegistry.java:67) ~[junit-platform-launcher-1.6.3.jar:1.6.3]
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) ~[na:na]

java.lang.NoSuchMethodError: 'java.lang.reflect.Method org.junit.platform.engine.support.descriptor.MethodSource.getJavaMethod()'
at net.serenitybdd.junit5.SerenityTestExecutionListener.updateResultsUsingTestAnnotations(SerenityTestExecutionListener.java:356) ~[serenity-junit5-3.1.15.jar:na]
at net.serenitybdd.junit5.SerenityTestExecutionListener.testFinished(SerenityTestExecutionListener.java:334) ~[serenity-junit5-3.1.15.jar:na]
at net.serenitybdd.junit5.SerenityTestExecutionListener.executionFinished(SerenityTestExecutionListener.java:277) ~[serenity-junit5-3.1.15.jar:na]
at org.junit.platform.launcher.core.TestExecutionListenerRegistry$CompositeTestExecutionListener.lambda$executionFinished$10(TestExecutionListenerRegistry.java:109) ~[junit-platform-launcher-1.6.3.jar:1.6.3]
at org.junit.platform.launcher.core.TestExecutionListenerRegistry.lambda$notifyEach$1(TestExecutionListenerRegistry.java:67) ~[junit-platform-launcher-1.6.3.jar:1.6.3]
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541) ~[na:na]

@u-sandeep
Copy link
Author

u-sandeep commented Nov 1, 2022

Dependencies used:

implementation('org.codehaus.groovy:groovy-all:3.0.13') {
exclude group: 'org.codehaus.groovy', module: 'groovy-test-junit5'
}

implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.boot:spring-boot-starter-actuator:2.7.4'
implementation 'org.springframework.cloud:spring-cloud-context'
implementation 'org.springframework.security:spring-security-rsa'

testImplementation 'net.serenity-bdd:serenity-core:3.1.15'
testImplementation "net.serenity-bdd:serenity-junit5:3.1.15"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.9.0"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.9.0"
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.9.0'
testImplementation 'org.junit.vintage:junit-vintage-engine:5.9.0'
testImplementation 'net.serenity-bdd:serenity-rest-assured:3.1.15'
testImplementation 'net.serenity-bdd:serenity-spring:3.1.15'

@u-sandeep
Copy link
Author

Screenshot 2022-11-01 at 9 36 23 AM

This screenshot is from serenity-junit-starter project report

@u-sandeep
Copy link
Author

Screenshot 2022-11-01 at 9 37 14 AM

This is from my project. I added spring integration also to the project by using @SpringBootTest annotation and running with @ExtendsWith(SerenityJunit5Extension.class)

Previously, we were using serenity, junit4 & springboot and running tests with @RunWith(SpringIntegrationSerenityRunner)...This works fine and reports are generated.

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

1 participant