You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NullPointerException in ReportPortalTestNGListener with version testNG 6.9.13. *
Method addListener(Object listener) in this version is marked as @deprecated, possible cause of the error somehow connected with it.
Do you support the version testNG 6.9.13.0 and above?
Code
public static void main(String[] args) throws JAXBException, IOException {
ReportPortalTestNGListener reportPortalTestNGListener = new ReportPortalTestNGListener();
TestNG testNG = new TestNG();
List<XmlSuite> suites = new ArrayList<>();
suites.add(new TestRailApiSuite());
suites.add(new YandexDNSApiSuite());
testNG.setXmlSuites(suites);
testNG.setSuiteThreadPoolSize(SUITE_THREAD_POOL_SIZE);
List<Class<? extends ITestNGListener>> listeners = new ArrayList<>();
listeners.add(SuiteListener.class);
testNG.setListenerClasses(listeners);
testNG.addListener((Object) reportPortalTestNGListener);
testNG.setUseDefaultListeners(false);
testNG.run();
}
Run result
Exception in thread "pool-1-thread-1" Exception in thread "pool-1-thread-2" java.lang.NullPointerException
at com.epam.reportportal.testng.ReportPortalTestNGListener.onStart(ReportPortalTestNGListener.java:68)
at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:210)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
java.lang.NullPointerException
at com.epam.reportportal.testng.ReportPortalTestNGListener.onStart(ReportPortalTestNGListener.java:68)
at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:210)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
UPD
The reason for errors in multithreaded start on suites.
If you set testNG.setSuiteThreadPoolSize(1); еrror do not arise
The text was updated successfully, but these errors were encountered:
NullPointerException in ReportPortalTestNGListener with version testNG 6.9.13. *
Method addListener(Object listener) in this version is marked as @deprecated, possible cause of the error somehow connected with it.
Do you support the version testNG 6.9.13.0 and above?
Code
Run result
UPD
The reason for errors in multithreaded start on suites.
If you set
testNG.setSuiteThreadPoolSize(1);
еrror do not ariseThe text was updated successfully, but these errors were encountered: