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
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
相关文章推荐
- 使用 Spring 进行单元测试
- TestNG基本概念和注解
- 在Spring 3.2中使用Flyway与TestNG配合进行单元测试
- TestNG
- [selenium + eclipse + testng]Build environment
- 集成 Jenkins 和 TestNG 实现自助式自动化测试平台
- TestNG 中 ParallelMode.METHODS,ParallelMode.CLASSES,ParallelMode.TESTS区别
- ant testng 问题
- ant testng eclipse 环境调试
- cmd方式的Testng+Appium
- appium+testng报告更改
- Testng+eclipse+seleniumdriver+ant------之Testng在线问题和离线安装;运行失败,运行报错
- JUnit 4 Vs TestNG 对比
- TestNG使用Eclipse建立Test Case - 就是爱Java
- Effective Java单元测试TestNG - 就是爱Java
- testng集成spring测试
- intellij idea 使用:can't use subversion command line client : svn
- 使用ant运行testng的testng.xml并且使用testng-results.xsl美化结果
- Selenium+TestNG+ReportNG Demo
- TestNG分组测试