I\'m trying to run a testing suite using XML and TestNG, but I\'m always getting the same message using both: Eclipse and the command line:
[TestNG] Running:
/
I also had this problem, and none of the above solutions worked. Restarting Eclipse, however, did. I know this seems like an unnecessary answer, but I myself would have saved a lot of time if I had done it sooner, so I'll post it anyway.
I was facing the same issue , i have updated/installed TestNG from eclipse marketplace it worked for me
I had done all possible solution that everyone shared here and still does not work.
Heard someone mentioned creating a new workspace.
So I started a new workspace and recreated the whole TestNG suite & methods.
It worked!
Most probably my other TestNg stuff in my previous workspace could have conflicted with the recent Testng setup.
So starting a new workspace solved!
You could also check imports for imported Test annotation, should be:
import org.testng.annotations.Test;
@Test
public myTest(){ ... }
and not for example:
import org.junit.Test;
I experienced a similar issue and it was resolved by performing a project clean within Eclipse (Project-> Clean-> Clean Selected project)
Very simple but sometimes hard to spot. @Test
is not picked when no data is returned by the corresponding dataprovider.