-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
With Serenity 4.1.14 test reporting to qtest fails with step listener error #3547
Comments
@wakaleo or serenity team please help with this. |
Hi @RemyaAnoop sure, we can help take a look at that for you. Please take a look at the support options here: https://www.serenitydojo.academy/serenity-bdd-support-packages-page - once you decide the option that would work for you, you can get in touch using the form on the page or email me directly. |
@wakaleo our firm reached out to you for serenity dojo and support quote. Could you please share those information. |
@wakaleo Since finalizing on the support option and dojo will be mostly from T3 and we need to release serenity 4 in 2 weeks, can you please provide some input on this issue? |
Hi @RemyaAnoop, what is the name of your firm? |
@wakaleo please share your email. Will provide the details |
@RemyaAnoop john.smart[at]wakaleo.com |
What happened?
Our project recently got updated to serenity 4.1.14 and when execute cucumber test, it fails with step listener error. I believe it’s due to cucumber and junit platform engine.
we have listener extending AbstractStepListener. Even directly implemented step listener.
Issue is only with cucumber tests
I feel it’s coming from here : serenity-core/serenity-core/src/main/java/net/thucydides/core/steps/StepEventBus.java at c6553835fd88ec0267579339dae7d87bd8fc3d09 · serenity-bdd/serenity-core · GitHub
error :
11:53:36 [ERROR] 2024-09-25 13:53:35.957 29 StepEventBus - CurrentListener is null
11:53:36
11:53:36 CucumberTestSuite > Cucumber STANDARD_ERROR
11:53:36 java.lang.Exception: Stack trace
11:53:36 at java.base/java.lang.Thread.dumpStack(Thread.java:1380)
11:53:36 at net.thucydides.core.steps.StepEventBus.getBaseStepListener(StepEventBus.java:212)
11:53:36 at net.serenitybdd.core.reports.ReportDataSaver.doAddContents(ReportDataSaver.java:49)
11:53:36 at net.serenitybdd.core.reports.ReportDataSaver.addReportContent(ReportDataSaver.java:42)
11:53:36 at net.serenitybdd.core.reports.ReportDataSaver.andContents(ReportDataSaver.java:37)
11:53:36 at com.xxxx.automation.listeners.qTestRegressionListener.testFinished(qTestRegressionListener.java:40)
11:53:36 at net.thucydides.core.steps.StepEventBus.testFinished(StepEventBus.java:471)
11:53:36 at net.thucydides.core.steps.events.TestFinishedEvent.play(TestFinishedEvent.java:58)
11:53:36 at io.cucumber.core.plugin.ScenarioContextParallel.replayAllTestCaseEventsForLine(ScenarioContextParallel.java:401)
11:53:36 at io.cucumber.core.plugin.ScenarioContextParallel.playAllTestEvents(ScenarioContextParallel.java:367)
11:53:36 at io.cucumber.core.plugin.SerenityReporterParallel.handleTestRunFinished(SerenityReporterParallel.java:522)
11:53:36 at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
11:53:36 at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
11:53:36 at io.cucumber.core.runtime.SynchronizedEventBus.send(SynchronizedEventBus.java:47)
11:53:36 at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:117)
11:53:36 at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:104)
11:53:36 at io.cucumber.junit.platform.engine.CucumberEngineExecutionContext.finishTestRun(CucumberEngineExecutionContext.java:126)
11:53:36 at io.cucumber.junit.platform.engine.CucumberEngineDescriptor.ifChildren(CucumberEngineDescriptor.java:63)
11:53:36 at io.cucumber.junit.platform.engine.CucumberEngineDescriptor.cleanUp(CucumberEngineDescriptor.java:48)
11:53:36 at io.cucumber.junit.platform.engine.CucumberEngineDescriptor.cleanUp(CucumberEngineDescriptor.java:12)
11:53:36 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167)
11:53:36 at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
11:53:36 at org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167)
11:53:36 at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98)
11:53:36 at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:202)
11:53:36 at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
11:53:36 at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
11:53:36 at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
11:53:36 at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
11:53:36 at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
11:53:36 at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
11:53:36
**11:53:36 CucumberTestSuite > Cucumber STANDARD_OUT
11:53:36 [ERROR] 2024-09-25 13:53:35.958 29 qTestETRListener - Error submitting test results No BaseStepListener has been registered - are you running your test using the Serenity runners?
11:53:36 [ERROR] 2024-09-25 13:53:35.958 29 StepEventBus - CurrentListener is null**
11:53:36
What did you expect to happen?
Test should be successful with no issues
Serenity BDD version
4.1.14
JDK version
Java 17
Execution environment
Have multiple browsers , chrome 122 etc.
How to reproduce the bug.
Update build.gradle with 4.1.14 of serenity , gradle plugin 4.1.14
Cucumber junit platform engine: 7.16.1
We have a listener class which implements AbstractStepListener{
Which has override method for testFinished(TestOutcom result, Boolean isInDaraDrivenTesr, ZonedDatetime)
in this method we have qTestApPI object is called and do
serenity.recordReportData().withTitle(“post test run status”)
}
The test failing in line recordReportData()
How can we make it happen?
Work on this myself and propose a PR (with Serenity BDD team guidance)
The text was updated successfully, but these errors were encountered: