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 had to change my method access modifier to public from private to get it working .
This can also happen when there is groups usage in suite.xml and @BeforeXXX annotations have missing alwaysRun = true.
@BeforeTest(alwaysRun = true)
public void setUp() throws IOException {
}
I had this same issue, here is what worked for me:
I put all of the TestNG libraries in a separate lib folder in my project
a. com.beust.jcommander_1.72.0.jar
b. org.apache-extras.beanshell.bsh_2.0.0.b6.jar
c. org.testng_6.14.2.r201802161450.jar
d. or.yaml.snakeyaml_1.17.0.jar
I also put a copy of selenium-server and chromedriver in the lib folder as well
From my project folder (with testng.xml
located in the project root) I ran:
java -cp .\lib\*;.\target\classes org.testng.TestNG testng.xml