软件测试__findbugs+ant使用导出Html缺陷文档
2014-07-17 12:08
1131 查看
1. 准备工作
;
2. 将这两个压缩包解压到本地;
3. 分别配置环境变量:
创建系统变量ANT_HOME,并添加到path
中:
创建系统变量FINDBUGS_HOME,并添加到path
中:
4. 开始任务:
编写ant脚本,即:build.xml文件,讲解如图所示:
源码:
<project name="QYOA">
<path id="findbugs.path">
<fileset dir ="D:\zyy\findbugs-2.0.3\findbugs">
<include name ="**/*.jar"/>
</fileset>
</path>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref ="findbugs.path"/>
<property name ="findbugs.home" value ="D:\zyy\findbugs-2.0.3\findbugs"/>
<target name ="findbugs">
<findbugs home ="D:\zyy\findbugs-2.0.3\findbugs" jvmargs="-Xmx884m" output ="html" outputFile ="D:/findbugs.html">
<class location ="D:\zyy\apache-tomcat-6.0.39\webapps\qyoa\WEB-INF\classes"/>
<auxClasspath path="D:\zyy\findbugs-2.0.3\findbugs\lib\findbugs-ant.jar"/>
<auxClasspath>
<fileset dir="D:\zyy\apache-tomcat-6.0.39\webapps\qyoa\WEB-INF\lib" includes="**/*.jar"/>
</auxClasspath>
<sourcePath path ="E:\workspace\qyoa\src"/>
</findbugs>
</target>
</project>
5. 生成Findbugs Repost:
运行 cmd 进入Dos窗口,进入到build.xml所在的目录,输入 ant findbugs
回车。
导出成功如图:
6. 可能遇到的问题:
由于工程比较大,在导出html时可能会产生一个空白的html。此时可能是JVM内存的错误(堆栈信息之类的),此时将<findbugs>的jvmargs属性改大,如改为jvmargs=”-Xmx1000m”,c此属性是可选的,也可以省略。
7.
最主要的是FindBugs可以帮助我们找出那些bugs。可以参考:http://findbugs.sourceforge.net/bugDescriptions.html
8. 部分参数说明:
;
2. 将这两个压缩包解压到本地;
3. 分别配置环境变量:
创建系统变量ANT_HOME,并添加到path
中:
创建系统变量FINDBUGS_HOME,并添加到path
中:
4. 开始任务:
编写ant脚本,即:build.xml文件,讲解如图所示:
源码:
<project name="QYOA">
<path id="findbugs.path">
<fileset dir ="D:\zyy\findbugs-2.0.3\findbugs">
<include name ="**/*.jar"/>
</fileset>
</path>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref ="findbugs.path"/>
<property name ="findbugs.home" value ="D:\zyy\findbugs-2.0.3\findbugs"/>
<target name ="findbugs">
<findbugs home ="D:\zyy\findbugs-2.0.3\findbugs" jvmargs="-Xmx884m" output ="html" outputFile ="D:/findbugs.html">
<class location ="D:\zyy\apache-tomcat-6.0.39\webapps\qyoa\WEB-INF\classes"/>
<auxClasspath path="D:\zyy\findbugs-2.0.3\findbugs\lib\findbugs-ant.jar"/>
<auxClasspath>
<fileset dir="D:\zyy\apache-tomcat-6.0.39\webapps\qyoa\WEB-INF\lib" includes="**/*.jar"/>
</auxClasspath>
<sourcePath path ="E:\workspace\qyoa\src"/>
</findbugs>
</target>
</project>
5. 生成Findbugs Repost:
运行 cmd 进入Dos窗口,进入到build.xml所在的目录,输入 ant findbugs
回车。
导出成功如图:
6. 可能遇到的问题:
由于工程比较大,在导出html时可能会产生一个空白的html。此时可能是JVM内存的错误(堆栈信息之类的),此时将<findbugs>的jvmargs属性改大,如改为jvmargs=”-Xmx1000m”,c此属性是可选的,也可以省略。
7.
最主要的是FindBugs可以帮助我们找出那些bugs。可以参考:http://findbugs.sourceforge.net/bugDescriptions.html
8. 部分参数说明:
相关文章推荐
- robotium+TMTS混合使用,ant构建成html测试报告
- 软件测试使用测试文档
- robotium+TMTS混合使用,ant构建成html测试报告
- eclipse下软件测试合集,findbugs,PMD,Sourcemonitor,Junit的安装和使用详细图文
- 软件测试基础--使用测试文档
- 软件测试使用测试文档
- [60] 测试技术常见的十一种问题之八:软件文档测试主要包含什么?
- 笔记本应用/测试软件大全(个人使用心得)
- 最全,最强的软件测试资料汇总 (性能测试,性能调优,功能测试,自动化测试,测试管理,测试工具,测试用例设计,缺陷分析预防,前沿测试技术...)
- 最全,最强的软件测试资料汇总 (性能测试,性能调优,功能测试,自动化测试,测试管理,测试工具,测试用例设计,缺陷分析预防,前沿测试技术...)
- 一款比较不错的由word制作帮助文档的好软件!wordToChm 专业版!推荐使用!
- 软件测试过程中产生的文档
- 软件测试模型的使用
- http://sourceforge.net/projects/easymock/ ant结合junit进行软件自动测试
- [软件测试]几个软件的使用心得
- html文件中标签的顺序以及使用ant的小TIPS
- JAVA中使用Htmlparse解析HTML文档,使用htmlparse遍历出HTML文档的所有超链接(标记)
- 软件开发项目-文档编写标准化--测试分析报告
- [原创]软件测试CheckList文档
- Ant 使用Junit自动测试要注意的问题