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

[v5]agent-java-testng - ItemID should not be null (Test item is not getting created) #93

Closed
arunkumar-muthusamy opened this issue Mar 28, 2020 · 3 comments

Comments

@arunkumar-muthusamy
Copy link

While running the tests on Java+TestNG+LogBack with new version of agent-java-testng by pointing to V5 ReportPortal, i'm getting following exception. It used to work well until 5.0.0-BETA-6 version.

Exception in thread "TestNG-test=Multiple-1" java.lang.NullPointerException: ItemID should not be null
	at java.util.Objects.requireNonNull(Objects.java:228)
	at com.epam.reportportal.service.LaunchImpl.finishTestItem(LaunchImpl.java:283)
	at com.epam.reportportal.testng.TestNGService.finishTestMethod(TestNGService.java:167)
	at com.epam.reportportal.testng.BaseTestNGListener.onTestFailure(BaseTestNGListener.java:93)
	at org.testng.internal.TestListenerHelper.runTestListeners(TestListenerHelper.java:67)
	at org.testng.internal.Invoker.runTestListeners(Invoker.java:1389)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1042)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

pom.xml

		<dependency>
			<groupId>com.epam.reportportal</groupId>
			<artifactId>agent-java-testng</artifactId>
			<version>5.0.0-BETA-9</version>
		</dependency>
		<dependency>
			<groupId>com.epam.reportportal</groupId>
			<artifactId>logger-java-logback</artifactId>
			<version>5.0.0-BETA-9</version>
		</dependency>

TestNG.xml

<?xml version="1.0" encoding="UTF-8"?> 
	<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Login" parallel="classes" thread-count="2"
	data-provider-thread-count="2">
	<listeners>
		<listener class-name="com.epam.reportportal.testng.ReportPortalTestNGListener" />
	</listeners>
	<test name="Login">
		<classes>
			<class name="com.saucedemo.tests.login.AUTO123456_SauceDemo_Login_With_Valid_User" />
		</classes>
	</test>
</suite>

OS: Mac, java version "1.8.0_201"
Note: You can run any TestNG test to reproduce it.

image

@HardNorth HardNorth transferred this issue from reportportal/reportportal Mar 29, 2020
@HardNorth
Copy link
Member

Unfortunately, TestNG made version 7 binary incompatible with version 6. We have to follow TestNG versions since there are a batch of users who want to move forward. And we have very limited resources to support many versions of TestNG.

@arunkumar-muthusamy
Copy link
Author

Thank you, @HardNorth !

For anyone who end up with same issue, please update the TestNG version from 6.x.x to 7.x.x and update the TestNG version in IDE (in my case its Eclipse).

		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>7.1.0</version>
		</dependency>

Update/Install TestNG plugin version 7.1.1 in Eclipse

@parthamaiti-hub
Copy link

thanks. I got the issue . The solution works for me. much appreciated.

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

3 participants