testng-xslt美化测试报告

转载:testng-xslt美化测试报告

<?xml version="1.0" encoding="UTF-8"?>
<project name= "httpclientch0401" basedir= ".">
<property name= "lib.dir" value= "lib" />
<path id= "test.classpath" >
<!-- adding the saxon jar to your classpath -->
<fileset dir= "${lib.dir}" includes= "*.jar" />
</path>
<target name= "httpclientch0401" >
<xslt in= "E:\Third_Grade_Up\work_entity\api_workspace\httpclientch0401\test-output\testng-results.xml" 
	   style= "E:\Third_Grade_Up\work_entity\api_workspace\httpclientch0401\test-output\testng-results.xsl"
       out= "E:\Third_Grade_Up\work_entity\api_workspace\httpclientch0401\test-output\index.html" >
<!-- you need to specify the directory here again -->
<param name= "testNgXslt.outputDir" expression= "E:\Third_Grade_Up\work_entity\api_workspace\httpclientch0401\test-output" />
<classpath refid= "test.classpath" />
</xslt>
</target>
</project>

【注】
1.build.xml 文件必须在test-output下面,否则找不到
2.lib文件不是项目的lib文件,而是test-output下新建的lib文件,方便buid.xml文件查找,(应该和参数关系,用默认参数就要都放在test-output下面),build.xml使用ant运行时,会引用到lib下的jar包
3.运行:1)先将想要生成测试报告的类运行一遍,再将build.xml 运行一遍。就会生成刚刚那个类的报告

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值