I'm receiving the following error once my selenium/testNG test suite has completed execution, and as a result the HTML report is not being generated.
[TestNG] Reporter org.testng.reporters.jq.Main@6218d77b failed
java.lang.NullPointerException
at org.testng.reporters.FileStringBuffer.append(FileStringBuffer.java:50)
at org.testng.reporters.FileStringBuffer.append(FileStringBuffer.java:28)
at org.testng.reporters.XMLUtils.xml(XMLUtils.java:27)
at org.testng.reporters.XMLUtils.xmlRequired(XMLUtils.java:63)
at org.testng.reporters.XMLStringBuffer.addRequired(XMLStringBuffer.java:201)
at org.testng.reporters.XMLStringBuffer.addRequired(XMLStringBuffer.java:204)
at org.testng.reporters.jq.ReporterPanel.getContent(ReporterPanel.java:40)
at org.testng.reporters.jq.BaseMultiSuitePanel.generate(BaseMultiSuitePanel.java:24)
at org.testng.reporters.jq.Main.generateReport(Main.java:63)
at org.testng.TestNG.generateReports(TestNG.java:1115)
at org.testng.TestNG.run(TestNG.java:1074)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:91)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:204)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:107)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:113)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
It's a somewhat intermittent issue, as I can run 2-3 tests without a problem. Executing any more than that causes the error. This is preventing me from being able to review the results of running multiple tests locally before committing the new tests. This test suite runs in a Jenkins job and publishes the results using the TestNG plugin. I am seeing the error there as well, but the plugin is able to display the results of the tests.
I'm using TestNG version 6.8.8 and executing the tests with maven-surefire-plugin 2.16.