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.
Apparently, TestNG is wrong regarding generating the XML file for the testing suite.
Even though following their instructions to the letter, my tests were not running. I ended up with this testng.xml
file and my tests, started to run:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="TestingSuite" parallel="none">
<test name="Test1">
<classes>
<class name="tests.Page1"/>
</classes>
</test>
<test name="Test 2">
<classes>
<class name="tests.Page2"/>
</classes>
</test>
</suite>
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