TestNg + ReprotNG Commandline
来源:互联网 发布:欧文体测数据 编辑:程序博客网 时间:2024/05/16 14:12
Execute test cases by commandline for TestNG
1. Add reportng listener to Testng.xml
a. ReportNG need add jars: reportng-*.jar, Velocity-*.jar, guice-3.0.jar
add below Listener to testng.xml
org.uncommons.reportng.HTMLReporter
org.uncommons.reportng.JUnitXMLReporter
like:
- <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
- <suite name="Online Test" verbose="1" preserve-order="true">>
- <listeners>
- <listener class-name="org.uncommons.reportng.HTMLReporter" />
- </listeners>
- ...
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" ><suite name="Online Test" verbose="1" preserve-order="true">> <listeners> <listener class-name="org.uncommons.reportng.HTMLReporter" /> </listeners>...
2. Execute ways:
2.1 Execute in Eclipse,
b. Set disable default report as false: Eclipse Project-> Properties -> TestNG -> Diable deafult
listeners.
c. Run as TestNg
2.2 Execute in commandline:
bat file like:
- @echo off
- set LIB=E:\Libs
- set CLASSPATH=%LIB%\Guice\guice-3.0.jar;%LIB%\Velocity\velocity-1.7\velocity-1.7-dep.jar;
- %LIB%\Selenium\selenium-server-standalone-2.42.2.jar;%LIB%\ReportNg\reportng-1.1.4.jar;E:\Test\bin\;E:\RZC\Code\TestCore\bin\
- java org.testng.TestNG E:\Test\src\OnlineTest.xml -d %cd%\TestNG-tempResult
@echo offset LIB=E:\Libsset CLASSPATH=%LIB%\Guice\guice-3.0.jar;%LIB%\Velocity\velocity-1.7\velocity-1.7-dep.jar;%LIB%\Selenium\selenium-server-standalone-2.42.2.jar;%LIB%\ReportNg\reportng-1.1.4.jar;E:\Test\bin\;E:\RZC\Code\TestCore\bin\java org.testng.TestNG E:\Test\src\OnlineTest.xml -d %cd%\TestNG-tempResult
set result output dir use -d command.
0 0
- TestNg + ReprotNG Commandline
- TestNg + ReprotNG Commandline
- selenium+testng+reprotng+ant框架搭建配置
- 分享selenium+testng+reprotng+ant配置
- CommandLine
- Pyscada---CommandLine
- rar commandline
- TestNG
- testng
- testng
- TestNG
- TestNG
- TestNG
- TestNG
- testng
- TestNG
- testNG
- TestNG
- 推荐几款pdf文件转换Excel表格在线转换
- I/O函数
- Ubuntu13.10编译Android4.3源码(一)
- 大数据时代下的个性化服务
- 修改Android系统的build.prop
- TestNg + ReprotNG Commandline
- 去除VMware 全屏时的屏幕上方的快捷键会话提示
- Cocos2Dx之处理键盘输入
- 判断当前浏览器类型
- 解决win7没有找到suite objects.dll 导致rational rose不能启动的问题
- 技术简历精益求精
- rack
- 引用于指针
- COM:IUnknown、IClassFactory、IDispatch