Intellij |Create testng.xml | Class name

985 views
Skip to first unread message

Satnam Singh

unread,
Dec 26, 2019, 2:42:49 PM12/26/19
to testng-users



Hello Group,

I am creating testng.xml for intellij. 
And I am getting errors as -- Cannot resolve class or package ..

Has someone faced this issue? Pls hlep.

TestNg_xml.JPG

⇜Krishnan Mahadevan⇝

unread,
Dec 26, 2019, 11:37:47 PM12/26/19
to testng...@googlegroups.com
You have provided the package name incorrectly.
You need to first create a package under "src/test/java" and house your class inside that package, and then provide the fully qualified class name in your suite xml file.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/3f32a832-5566-4d00-9ead-50fab6fe2f3a%40googlegroups.com.

Satnam Singh

unread,
Dec 30, 2019, 6:12:11 AM12/30/19
to testng-users
Thank you @Krishnan. I was able to make it work. 

On Friday, 27 December 2019 10:07:47 UTC+5:30, Krishnan Mahadevan wrote:
You have provided the package name incorrectly.
You need to first create a package under "src/test/java" and house your class inside that package, and then provide the fully qualified class name in your suite xml file.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


On Fri, Dec 27, 2019 at 1:12 AM Satnam Singh <satn...@gmail.com> wrote:



Hello Group,

I am creating testng.xml for intellij. 
And I am getting errors as -- Cannot resolve class or package ..

Has someone faced this issue? Pls hlep.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng...@googlegroups.com.

Oscar

unread,
Apr 8, 2022, 10:14:20 PM4/8/22
to testng-users
What am I doing wrong? Because if I open with Eclipse it works appropiately.
2022-04-08 10_35_40-GradleTestNGProject – testng.xml [GradleTestNGProject].png

Oscar

unread,
Apr 8, 2022, 10:14:20 PM4/8/22
to testng-users
I'm in the same situation but creating a package didn't resolve the issue, the curious thing is that if I open the project in Eclipse works correctly.

Does anybody knows why?

2022-04-08 10_35_40-GradleTestNGProject – testng.xml [GradleTestNGProject].png

El lunes, 30 de diciembre de 2019 a la(s) 05:12:11 UTC-6, satn...@gmail.com escribió:

⇜Krishnan Mahadevan⇝

unread,
Apr 10, 2022, 1:30:23 AM4/10/22
to testng-users
Oscar,

You might want to close Intellij, delete intellij specific files ( *.iml, .idea directory ) , re-import the project, build it and try it once again.
There's really nothing that is specific to TestNG to be honest.
Also what happens when you run the suite xml file ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/722a1a02-8544-47c9-a549-10715ea4de17n%40googlegroups.com.

Oscar

unread,
Jun 20, 2022, 2:23:25 PM6/20/22
to testng-users
If I try tu run it, I get an NoClassDefFoundError Exception because it doesn't know where does these classes there are.
Reply all
Reply to author
Forward
0 new messages