When i\'m trying to run the test suite, am getting this exception. We are using maven project here and i am done with refreshing, cleaning, reinstalling testNG and then impo
I had this same problem when I imported my project from one PC to another on IntelliJ IDEA.
Below Solution worked for me:
For me the problem was very strange.
I have a testng.xml file at the root of my Eclipse project. When I changed the file through Eclipse, it wasn't changing the testng.xml file in my directory.
Turns out it made a copy of the folder into the eclipse workspace..
Hope this helps someone out
Go to Project>Build Path>Configure Build Path>Libraries>Remove Error libraries
After Refresh project and run again program.
I had similar issue and the project had some build errors. I did sudo -R 777 to the project and then I cleaned my project. After that it worked fine.
Hope it helps.
Note: You have to specify class name along with packages as given below.
<suite name="testNGLearning">
<test name="simpleTest">
<classes>
<class name="testngTests.TestNGSimpleTest" />
<class name="testngTests.TestMessageUtil" />
</classes>
</test>
</suite>
I had no problems with this until recently.
Now I had to move the suite's xml test file into the root of the project I was testing.
It may be that there is a setting to point at the classes I am testing, but I have not found it.