Continuous integration. NET Handbook

Source: Internet
Author: User
Continuous integration. NET Handbook
First, the concept
Martin Fowler's article: Continuous integration Chinese translation: continuous integration

Second, tools
Traditional tools: Visualstudio.net,visualsourcesafe,rational ClearCase

Automatic Compilation tool: Nant,nantcontrib

Regression testing Tool: NUnit

Code checking tool: FxCop

Continuous Integration tools: cruisecontrol.net

Third, step
Cruisecontrol.net monitor changes in remote version control system

When a change occurs, Cruisecontrol.net invokes the compilation tool to compile (Nant or visualstudio.net)

Call NUnit for regression testing after successful compilation

Call FxCop for code checking after successful compilation

Post the results of the compilation, test results, and code checks to the developer, the executive manager, and publish to the Web site

Icon:



All of this is done automatically in accordance with the prepared script.

Iv. implementation of the example
Now we're using ClearCase.

The Master software is cruisecontrol.net and its script file is Ccnet.config

Configuring a remote version control system

-<sourcecontrol type= "ClearCase" >
<viewpath>d:\cc_view\use_tech_dept\platform\nucleus\2 product Development \2 realize \nucleus1.0\source</viewpath>
<useLabel>false</useLabel>
</sourcecontrol>
Configuring the Compilation Tool

-<build type= "Nant" >
<executable>F:\software\Agile.Net\nant-0.85-nightly\bin\nant.exe</executable>
<baseDirectory>F:\software\Agile.Net\nant-0.85-nightly\bin</baseDirectory>
<buildFile>Y:\nucleus.build</buildFile>
<logger>NAnt.Core.XmlLogger</logger>
-<targetList>
<target>build</target>
<target>fxcop</target>
</targetList>
</build>
Configuring Test Cases

-<tasks>
-<nunit>
<path>d:\program Files\nunit 2.2\bin\nunit-console.exe</path>
-<assemblies>
<assembly>Y:\NewPDObject\TestNewPDObject\bin\Debug\TestNewPDObject.exe</assembly>
</assemblies>
</nunit>
</tasks>
Configure Report Form
<publishers>
-<xmllogger>
<logdir> \web\log</logdir>
-<mergeFiles>
<file>Y:\nucleus.xml</file>
</mergeFiles>
</xmllogger>
-<email from= "ajaxchelsea@163.com" mailhost= "163.com" includedetails= "TRUE" >
<projectUrl>http://ajaxchelsea/ccnetweb</projectUrl>
-<users>
<user name= "Buildguru" group= "Buildmaster" address= "ajaxchelsea@163.com"/>
<user name= "Chelsea" group= "developers" address= "chelsea@chelseafc.com"/>
<user name= "Ajax" group= "developers" address= "ajax@ajaxfc.com"/>
</users>
-<groups>
<group name= "Developers" notification= "Always"/>
<group name= "Buildmaster" notification= "Always"/>
</groups>
</email>
</publishers>
Where cruisecontrol.net does not provide support for the code-checking tool FxCop, its documentation recommends using the Nant <exec> task to invoke FxCop until the <fxcop> task is present, so Need to configure Nant script files:
-<target name= "FxCop" depends= "Build" >
<exec program= "D:\Program Files\Microsoft FxCop 1.30\fxcopcmd.exe" commandline= Nucleus.xml "failonerror= false"/>
</target>
V. Some tips
Cruisecontrol.net automatically monitors remote VOB based on local ClearCase view
In fact, in addition to monitoring remote version control system outside the other tasks can be completed by Nant, ccnet only responsible for monitoring changes and call Nant can
You can configure the VisualStudio.NET solution "<build type= devenv" solutionfile= "D:\dev\MyProject\MyProject.sln" directly for CCNet configuration= "Debug"/>, but this will not be able to configure FxCop, at least for now;
It is best to avoid the Chinese path, or you will need to manually add encoding "<?xml version=" 1.0 "encoding=" UTF-8 "?>" to several XML-formatted files, such as. csproj, or map the Chinese path to a virtual hard disk: "subst Y : "D:\cc_view\USE_TECH_DEPT\Platform\Nucleus\2 product development \2 realize \nucleus1.0\source" "
NUnit has visualstudio.net plug-in Nunitaddin,fxcop can also be configured as Visual Studio external tools, recommended use
The installation and use of various tools are very detailed in their respective documents, and there are countless resources on the Internet.
Vi. reference materials
Dailybuild Full Raiders
Draco.net



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.