Ant -- junit and junitreport task

[b]junit task[/b]
用于跑junit框架下的测试,使用它需要将junit jar 添加到构建路径。

属性:
haltonerror: 默认off, 当test error时 是否停止构建
haltonfailure: 默认off, 当test failure 时 是否停止构建
printsummary: 默认off,打印testcase的相关统计信息(on,off,
withOutAndErr)
errorProperty: test error的时候设置property
failureProperty: test failure的时候设置property
fork:在一个新的单独的JVM中运行测试,设置此属性为真, 可以进行如下设置----jvm,timeout,maxmemory等)
forkmode:包括三种模式----perTest(为每一个test class创建一个新的JVM进程,此项为默认的),perBatch(为每一个<batchtest>创建新jvm进程),once(仅仅只创建一个jvm进程)

内嵌元素:
<formatter>:type输出格式, 有xml, plain, brief or failure
usefile 是否输出到文件,默认true
<batchtest>:todir 存在报告的地方, 默认是当前目录


[b]junitreport task[/b]
通过junit task 生成的xml文件和stylesheet来生成可视的测试报告。 needs Apache Xalan 2.4.1+ or Xalan XSLTC

属性:
todir:报告文件的存放位置

内嵌元素:
<fileset>
<report>: format 生成的报告格式,有frame和noframe
styledir 样式文件的位置, 名字为junit-frames.xsl or junit-
noframes.xsl
todir 转化的报告文件存储位置
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值