您的位置:首页 > 其它

TestNG - How to run TestNG from command line successfully

2016-07-06 16:17 567 查看
Install Java environment and set Java environment.
Download TestNG archive, set TestNG environment and set the CLASSPATH for the testng.jar in the environment variables.
Create a new folder "XTest".
Compile all your test classes and put them (.class files) in the folder "XTest".
Put your "testng.xml" and ".properties" files to "XTest".
Put your test data files to "XTest" (Remember to keep test data directory structure, or the test class will not find test data).
Create a new subfolder "XTest\lib".
Put "testng.jar" and "jcommander.jar" to subfolder "XTest\lib".
Put all your test project dependent .jar files to subfolder "XTest\lib".
Browse to the folder "XTest" via command line and run the command 
java -cp "lib\*;" org.testng.TestNG testng.xml
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  TestNG Command Line