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

Getting NullPointerException for org.junit.Assert.assertTrue() #154

Open
kumaprem-flutterint opened this issue Jul 12, 2024 · 1 comment

Comments

@kumaprem-flutterint
Copy link

Error log:
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:87)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.junit.Assert.assertTrue(Assert.java:53)
at steps.KinesisSteps.theEventsShouldBe(KinesisSteps.java:284)

java.lang.NullPointerException
6572
at net.thucydides.model.domain.failures.AssertionErrorMessagesAggregator.stripLeadingLineBreakFrom(AssertionErrorMessagesAggregator.java:26)
6573
at net.thucydides.model.domain.failures.AssertionErrorMessagesAggregator.aggregateErrorMessages(AssertionErrorMessagesAggregator.java:18)
6574
at net.thucydides.model.domain.MultipleAssertionErrors.(MultipleAssertionErrors.java:11)
6575
at net.thucydides.model.domain.TestOutcome.determineTestFailureCause(TestOutcome.java:1722)
6576
at net.thucydides.core.steps.BaseStepListener.testFailed(BaseStepListener.java:1349)
6577
at net.thucydides.core.steps.StepEventBus.testFailed(StepEventBus.java:757)
6578
at net.thucydides.core.steps.StepEventBus.testFailed(StepEventBus.java:744)
6579
at net.thucydides.core.steps.events.TestFailedEvent.play(TestFailedEvent.java:16)
6580
at io.cucumber.core.plugin.ScenarioContextParallel.replayAllTestCaseEventsForLine(ScenarioContextParallel.java:384)
6581
at io.cucumber.core.plugin.ScenarioContextParallel.lambda$playAllTestEvents$4(ScenarioContextParallel.java:365)
6582
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
6583
at java.base/java.util.Collections$SynchronizedCollection.forEach(Collections.java:2067)
6584
at io.cucumber.core.plugin.ScenarioContextParallel.playAllTestEvents(ScenarioContextParallel.java:365)
6585
at io.cucumber.core.plugin.SerenityReporterParallel.lambda$handleTestRunFinished$5(SerenityReporterParallel.java:520)
6586
at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807)
6587
at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
6588
at io.cucumber.core.plugin.SerenityReporterParallel.handleTestRunFinished(SerenityReporterParallel.java:519)
6589
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
6590
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
6591
at io.cucumber.core.runtime.SynchronizedEventBus.send(SynchronizedEventBus.java:47)
6592
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:117)
6593
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:104)
6594
at io.cucumber.junit.platform.engine.CucumberEngineExecutionContext.finishTestRun(CucumberEngineExecutionContext.java:126)
6595
at io.cucumber.junit.platform.engine.CucumberEngineDescriptor.ifChildren(CucumberEngineDescriptor.java:63)
6596
at io.cucumber.junit.platform.engine.CucumberEngineDescriptor.cleanUp(CucumberEngineDescriptor.java:48)
6597
at io.cucumber.junit.platform.engine.CucumberEngineDescriptor.cleanUp(CucumberEngineDescriptor.java:12)
6598
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$cleanUp$10(NodeTestTask.java:167)
6599
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
6600
at org.junit.platform.engine.support.hierarchical.NodeTestTask.cleanUp(NodeTestTask.java:167)
6601
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:98)
6602
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
6603
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
6604
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
6605
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198)
6606
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
6607
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
6608
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:76)
6609
at org.junit.platform.suite.engine.SuiteLauncher.execute(SuiteLauncher.java:63)
6610
at org.junit.platform.suite.engine.SuiteTestDescriptor.execute(SuiteTestDescriptor.java:128)
6611
at org.junit.platform.suite.engine.SuiteTestEngine.lambda$execute$0(SuiteTestEngine.java:73)
6612
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
6613
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
6614
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
6615
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
6616
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
6617
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
6618
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
6619
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
6620
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
6621
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
6622
at org.junit.platform.suite.engine.SuiteTestEngine.execute(SuiteTestEngine.java:73)
6623
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:198)
6624
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169)
6625
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93)
6626
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58)
6627
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141)
6628
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57)
6629
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
6630
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
6631
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
6632
at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
6633
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
6634
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
6635
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
6636
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
6637
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
6638
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
6639
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

@kaylezhangzhaoLin
Copy link

The bug has been fixed. please using <serenity.version>4.1.20</serenity.version> and retry.

image

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

2 participants