Martin Fowler的文章:Continuous Integration 中文翻译:持续集成
传统工具:VisualStudio.Net,VisualSourceSafe,Rational ClearCase
自动编译工具:Ant
回归测试工具:JUnit
代码检查工具:CheckStyle
持续集成工具:CruiseControl
CruiseControl监控远程版本控制系统的变化
变化发生时CruiseControl调用编译工具进行编译(Ant等)
编译成功后调用JUnit进行回归测试
编译成功后调用CheckStyle进行代码检查
完毕后将编译结果、测试结果、代码检查结果发送至开发人员、主管经理,并发布至网站,甚至报警器
所有这一切都是按照编制好的脚本自动进行的
目前我们使用的是ClearCase,主控软件为CruiseControl,其脚本文件为cccc.xml
配置远程版本控制系统
配置编译工具
配置测试用例(在ant的配置文件中)
<target name="web.checkstyle"><mkdir dir="${target.temp}/checkstyle" /><mkdir dir="${target.web}/checkstyle" />- <taskdef resource="checkstyletask.properties">- <classpath><fileset dir="${support.tools}/checkstyle31" includes="**/*.jar" /></classpath></taskdef>- <copy file="${support.tools}/checkstyle31/custom.xml" overwrite="true" tofile="${target.temp}/checkstyle/custom.xml">- <filterset><filter token="source.java" value="${basedir}/${source.java}" /><filter token="target.checkstyle" value="${basedir}/${target.temp}/checkstyle" /></filterset></copy>- <checkstyle config="${target.temp}/checkstyle/custom.xml" failOnViolation="false"><fileset dir="${source.java}/main" includes="**/*.java" /><formatter type="plain" /><formatter type="xml" toFile="${target.temp}/checkstyle/checkstyle_errors.xml" /></checkstyle><style basedir="${target.temp}/checkstyle" destdir="${target.web}/checkstyle" includes="checkstyle_errors.xml" style="${support.tools}/checkstyle31/checkstyle-noframes.xsl" /></target>
新闻热点
疑难解答