ant构建testNG测试输出测试报告
来源:互联网 发布:草图大师 mac 编辑:程序博客网 时间:2024/06/06 17:34
1.在Eclipse中安装testNG插件
在线安装地址:http://beust.com/eclipse
2.build.xml
<project basedir="." default="regression" name="automation test"> <property name="base.dir" value="."/> <property name="testng.output.dir" value="${base.dir}/test-output"/> <property name="3rd.lib.dir" value="${base.dir}/libs"/> <property name="testng.file" value="testNG.xml"/> <taskdef resource="testngtasks" classpath="${3rd.lib.dir}/testng.jar"/> <target name="clean"> <delete dir="${base.dir}/bin"/> </target> <target name="compile" depends="clean"> <mkdir dir="${base.dir}/bin"/> <javac srcdir="${base.dir}/src" destdir="${base.dir}/bin" classpathref="classes" includeantruntime="off" debug="on" debuglevel="lines,vars,source"/> </target> <path id="classes"> <fileset dir="${3rd.lib.dir}" includes="*jar"/> <fileset dir="${3rd.lib.dir}" includes="*zip"/> <pathelement location="${base.dir}/bin"/> </path> <target name="regression" depends="compile"> <testng outputdir="${testng.output.dir}" classpathref="classes" delegateCommandSystemProperties="true"> <xmlfileset dir="${base.dir}" includes="${testng.file}"/> </testng> </target><target name="copyResult"> <copy todir="${basedir}" overwrite="yes"> <fileset dir="${base.dir}/test-output"> <include name="testng-failed.xml"/> <include name="testng-results.xml"/> </fileset></copy></target></project>
3.注意:
(1)需要在工程的根目录下创建一个libs文件夹,将testNG.jar放在里面
(2)需要在根目录下创建一个testNG.xml文件
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="Suite1" verbose="1" > <test name="TestNGTest" > <classes> <class name="com.android.build.TestNGTest" /> <methods> <include name="testRun" /> </methods> </classes> </test></suite>
- ant构建testNG测试输出测试报告
- ant构建Junit测试并输出测试报告
- TestNG+Ant 测试报告美化
- TestNG+Ant 测试报告美化
- ant+TestNG-xslt生成selenium测试报告
- ant+testng-xslt生成selenium测试报告
- TestNG设置输出测试报告的内容级别和设置测试用例按顺序执行
- ANT:自动测试、生成测试报告
- 使用TestNG-xslt+ant来美化selenium测试报告
- TestNG+Ant自动运行测试
- TestNG+Ant自动运行测试
- TestNG+Ant自动运行测试
- 使用jmeter+ant进行接口集成测试,输出测试报告的方法
- selenium+testng+gitblit+jenkins+ant自动化测试系列十:Jenkins配置自动化持续集成构建
- ant + junit 测试。并生成测试报告
- WebDriver+testng+reportng+ant测试框架整合
- jenkins+testng+ant+webdriver持续集成测试
- jenkins+testng+ant+webdriver持续集成测试
- 猜数系统
- 周赛问题 福州 B - Somali Pirates
- Ubuntu打开终端的方法四种
- jquery取checkbox的状态
- UITextField 详解-- IOS (解决键盘遮住view及密文設定的问题实例)
- ant构建testNG测试输出测试报告
- R学习总结
- xdg-user-dirs
- 当年第几天
- 周赛问题 福州 L - Guess the Price
- 第十二周-某年某月某日是第几天
- 2013.11.18
- 【菜鸟入门】stm32 之 iic
- Yarn资源管理中的哲学