testngreportportal

Reportportal 4.0.0 getting error "ItemID cannot be null"


I upgraded to latest version (4.0.0) of reportportal today and when I try to run the test, I get the following error.

java.lang.IllegalArgumentException: ItemID should not be null
at rp.com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at com.epam.reportportal.service.LaunchImpl.finishTestItem(LaunchImpl.java:206)
at com.epam.reportportal.testng.TestNGService.finishTestMethod(TestNGService.java:156)
at com.epam.reportportal.testng.BaseTestNGListener.onTestFailure(BaseTestNGListener.java:98)

The other error I am getting is : Exception in thread "main" java.lang.NoSuchMethodError: com.epam.ta.reportportal.ws.model.StartTestItemRQ.setRetry(Z)V at

com.epam.reportportal.testng.TestNGService.buildStartStepRq(TestNGService.java:280) at com.epam.reportportal.testng.TestNGService.startTestMethod(TestNGService.java:140) at

com.epam.reportportal.testng.TestNGService.finishTestMethod(TestNGService.java:152) at com.epam.reportportal.testng.BaseTestNGListener.onTestSkipped(BaseTestNGListener.java:103)

customListener = new CustomTestListener();
ReportPortalTestNGListener listener = newReportPortalTestNGListener();
TestNG myTestNG = new TestNG();
myTestNG.addListener((ITestNGListener) customReporter);
myTestNG.addListener((ITestNGListener) customListener);
myTestNG.addListener((Object)listener);

I am using the following versions

compile 'com.epam.reportportal:agent-java-testng:4.0.0'
compile 'com.epam.reportportal:logger-java-logback:4.0.0'
compile 'com.epam.reportportal:logger-java-log4j:4.0.0'

Solution

  • Issue has been fixed in latest agent versions (4.0.x). Please, make sure you are up to date for all dependencies. Please, submit issue on github in case you still have problem.