google / polymorphicDSL

Apache License 2.0
11 stars 7 forks source link

Maven surefire report generation stage interruption [FailedTestResults.getStackTrace]. #69

Open YuriiChukhrai opened 1 year ago

YuriiChukhrai commented 1 year ago

We are observing the interruption in Maven surefire report generation stages. If the TC pass, it all goes fine, but if the TC FAILED we see this stackTrace:

# Created at 2023-04-13T20:49:17.349
org.apache.maven.surefire.testset.TestSetFailedException: Test mechanism :: null
    at org.apache.maven.surefire.common.junit4.JUnit4RunListener.rethrowAnyTestMechanismFailures(JUnit4RunListener.java:223)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:167)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
    at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.NullPointerException
    at com.pdsl.reports.TestRunResults$FailedTestResults.getStackTrace(TestRunResults.java:49)
    at org.apache.maven.surefire.report.SmartStackTraceParser.<init>(SmartStackTraceParser.java:62)
    at org.apache.maven.surefire.common.junit4.JUnit4StackTraceWriter.smartTrimmedStackTrace(JUnit4StackTraceWriter.java:98)
    at org.apache.maven.surefire.booter.ForkingRunListener.encode(ForkingRunListener.java:409)
    at org.apache.maven.surefire.booter.ForkingRunListener.encode(ForkingRunListener.java:393)
    at org.apache.maven.surefire.booter.ForkingRunListener.toString(ForkingRunListener.java:348)
    at org.apache.maven.surefire.booter.ForkingRunListener.testError(ForkingRunListener.java:171)
    at org.apache.maven.surefire.common.junit4.JUnit4RunListener.testFailure(JUnit4RunListener.java:128)
    at org.junit.runner.notification.SynchronizedRunListener.testFailure(SynchronizedRunListener.java:94)
    at org.junit.runner.notification.RunNotifier$6.notifyListener(RunNotifier.java:177)
    at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:72)
    at org.junit.runner.notification.RunNotifier.fireTestFailures(RunNotifier.java:173)
    at org.junit.runner.notification.RunNotifier.fireTestFailure(RunNotifier.java:167)
    at org.apache.maven.surefire.common.junit4.Notifier.fireTestFailure(Notifier.java:114)
    at com.pdsl.runners.junit.PdslGherkinJUnit4Runner.runChild(PdslGherkinJUnit4Runner.java:233)
    at com.pdsl.runners.junit.PdslGherkinJUnit4Runner.run(PdslGherkinJUnit4Runner.java:190)
    at com.pdsl.runners.PdslTestSuite.runChild(PdslTestSuite.java:172)
    at com.pdsl.runners.PdslTestSuite.runChild(PdslTestSuite.java:27)
    at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
    at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
    at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
    at com.pdsl.runners.PdslTestSuite.run(PdslTestSuite.java:148)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
    ... 4 more