Cruisecontrol Cruisecontrol 测试工具配置总结

chengfei112233 · 发布于 2009年9月25日 · 66 次阅读
96

[align=center][color=#099ff][font=AR PL UMing CN,serif][b]Cruisecontrol[/b][/font][b]测试工具配置总结[/b] [/align][align=center][color=#099ff]以 [font=AR PL UMing CN,serif][color=#099ff]Checkstyle [/font][color=#099ff]为例 [/align]

[align=left][color=#099ff]一[font=AR PL UMing CN,serif].[/font]配置[font=AR PL UMing CN,serif]maven2[/font]项目[font=AR PL UMing CN,serif] [/font] [/align] [align=left][color=#099ff]在[font=AR PL UMing CN,serif]maven2[/font]项目中添加[font=AR PL UMing CN,serif]Checkstyle[/font]插件 [/align] [align=left][color=#099ff][font=AR PL UMing CN,serif]1.[/font]在[font=AR PL UMing CN,serif]build[/font]下插入[font=AR PL UMing CN,serif][font=Monospace]Checkstyle[/font][/font][font=Monospace]插件代码[/font] [/align][align=left][color=#3f7f7f][font=Monospace][/font] [/align][align=left][font=Monospace] < [color=#3f7f7f]plugins > [/font][/align][align=left][color=#3f7f7f] [font=Monospace][/font] [/align][align=left][color=#3f7f7f] [font=Monospace]org.apache.maven.plugins[/font] [/align][align=left][color=#3f7f7f] [font=Monospace]maven-checkstyle-plugin[/font] [/align][align=left][color=#3f7f7f] [font=Monospace][/font] [/align][align=left][color=#3f7f7f] [font=Monospace]false[/font] [/align][align=left][color=#3f7f7f] [font=Monospace][/font] [/align][align=left][color=#3f7f7f] [font=Monospace]
[/font] [/align][align=left][color=#3f7f7f][font=Monospace] [/font] [/align][align=left][font=AR PL UMing CN,serif][color=#1a1a1a] [font=Monospace]</[/font] [color=#3f7f7f][font=Monospace]build[/font] [font=Monospace]>[/font] [/font][/align] [align=left][color=#099ff][font=Monospace]2.[/font][font=Monospace]在[/font][font=Monospace]reporting[/font][font=Monospace]下插入[/font][font=Monospace]Checkstyle[/font][font=Monospace]插件代码以生成测试结果[/font] [/align][align=left] [font=Monospace] < [color=#3f7f7f]reporting > [/font][/align][align=left][font=AR PL UMing CN,serif] [font=Monospace]<[/font] [color=#3f7f7f][font=Monospace]plugin[/font] [font=Monospace]>[/font] [/font][/align][align=left] [font=Monospace] < [color=#3f7f7f]groupId > [color=#1a1a1a]org.apache.maven.plugins </ [color=#3f7f7f]groupId > [/font][/align][align=left] [font=Monospace] < [color=#3f7f7f]artifactId > [color=#1a1a1a]maven-checkstyle-plugin </ [color=#3f7f7f]artifactId > [/font][/align][align=left] [font=AR PL UMing CN,serif] [font=Monospace]</[/font] [color=#3f7f7f][font=Monospace]plugin[/font] [font=Monospace]>[/font] [/font][/align][align=left] [font=Monospace] </ [color=#3f7f7f]reporting > [/font][/align]

[align=left] [font=Monospace]二[/font][font=Monospace].[/font][font=Monospace]配置[/font][font=Monospace]cruisecontrol[/font][font=Monospace]的[/font][font=Monospace]config.xml[/font][font=Monospace]文件[/font] [/align] [align=left] [font=AR PL UMing CN,serif][color=#1a1a1a][font=Monospace] [/font] [/font][/align][align=left][color=#1a1a1a] [font=Monospace] [/font] [/align][align=left][color=#1a1a1a][font=Monospace] [/font] [/align][align=left][color=#1a1a1a][font=Monospace] [/font] [/align][align=left][color=#1a1a1a][font=Monospace] [/font] [/align][align=left][color=#1a1a1a][font=Monospace] [/font] [/align][align=left][color=#1a1a1a][font=Monospace] [/font] [/align][align=left][color=#1a1a1a][font=Monospace] [/font] [/align][align=left][color=#1a1a1a] [font=Monospace][/font] [/align] [align=left][color=#099ff][font=Monospace]备注:通过[/font][font=Monospace]mvnsite[/font][font=Monospace]命令后会在[/font][font=Monospace]target[/font][font=Monospace]目录下会生成[/font][font=Monospace]checkstyle- result.xml[/font][font=Monospace]的报告,我们需要通过[/font][font=Monospace]merge[/font][font=Monospace]来合并项目编译脚本中产生的结果。 [/font][font=Monospace]Config.xml[/font][font=Monospace]中其它配置可参考网上其它文章。[/font] [/align]

[align=left] [font=Monospace]三[/font][font=Monospace].[/font][font=Monospace]配置[/font][font=Monospace]cruisecontrol[/font][font=Monospace]的[/font][font=Monospace]/webapps/cruisecontrol[/font][font=Monospace]目录下文件[/font] [/align]

[align=left][color=#099ff][font=Monospace]在[/font][font=Monospace]main.jsp[/font][font=Monospace]中添加代码[/font] [/align][align=left][color=#3f7f7f][font=Monospace] [/font] [/align][align=left][color=#3f7f7f] [font=Monospace]<%@ includefile="checkstyle.jsp" %> [/font] [/align][align=left][color=#3f7f7f][font=Monospace]/cruisecontrol:tab[/font] [/align] [align=left][color=#099ff][font=Monospace]即可在[/font][font=Monospace]tab[/font][font=Monospace]中显示[/font][font=Monospace]checkstyle[/font][font=Monospace]这一项[/font] [/align] [align=left][color=#099ff][font=Monospace]cruisecontrol-bin-2.8.2.zip[/font][font=Monospace]中默认已经有了[/font][font=Monospace]checkstyle.jsp[/font][font=Monospace]文件[/font] [/align][align=left][color=#099ff][font=Monospace]以及[/font][font=Monospace]checkstyle.xsl[/font][font=Monospace],因此不需要额外添加。[/font] [/align][align=left] [/align][align=left][color=#099ff][font=Monospace]让[/font][font=Monospace]jdepend[/font][font=Monospace]等没有自带,应此需要到网上,或者自己写[/font][font=Monospace]/webapps/cruisecontrol[/font][font=Monospace]目录下的[/font][font=Monospace]jsp[/font][font=Monospace]文件,和[/font][font=Monospace]/webapps/cruisecontrol/xsl[/font][font=Monospace]下的[/font][font=Monospace]xsl[/font][font=Monospace]文件。[/font] [/align] [align=left][color=#099ff][font=Monospace]参考网站:[/font][font=Monospace]http://confluence.public.thoughtworks.org/display/CC/IntegratingWithOtherTools/font][ [/align]

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册