Continuous integration. Net Manual

Source: Internet
Author: User
Tags version control system

Continuous integration. Net manual I. Concepts

Martin Fowler's article: continuous integration

Ii. Tools

Traditional tools: visualstudio. net, visualsourcesafe, rational clearcase

Automatic compilation tools: Nant and nantcontrib

Regression testing tool: nunit

Code Check Tool: fxcop

Continuous integration tool: cruisecontrol. net

Step 3
  • Cruisecontrol. Net monitors changes in the remote version control system

  • When the change occurs, cruisecontrol. Net calls the compilation tool for compilation (Nant or visualstudio. net)

  • Call nunit for regression testing after compilation is successful

  • Call fxcop to check the code after compilation is successful.

  • After compilation results, test results, and code check results are sent to developers and supervisors and published to the website.

Figure:

All of this is automatically performed according to the prepared script.

IV. Implementation example

Currently, we use clearcase.

The main control software is cruisecontrol. net, and its script file is ccnet. config.

  • Configure remote version control system

-<Sourcecontrol type =" Clearcase">  <Viewpath> D:/cc_view/use_tech_dept/platform/nucleus/2 Product Development/2 Implementation/nucleus 1.0/source</Viewpath>  <Uselabel> False</Uselabel>  </Sourcecontrol>
  • Configure 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>
  • Configure 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>
  • Configuration 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>
  • Among them, cruisecontrol. net does not provide support for the code check tool fxcop. In this document, we recommend that you use the Nant <exec> task to call fxcop until the <fxcop> task appears. Therefore, configure the Nant script file:
-<Target name =" Fxcop"Depends =" Build">  <Exec program =" D:/program files/Microsoft fxcop 1.30/fxcopcmd.exe"CommandLine =" /P: Y:/nucleus us. fxcop/O: Y:/nucleus us. xml"Failonerror =" False"/>  </Target>
5. Tips
  • Cruisecontrol. Net automatically monitors remote vob based on the Local clearcase View
  • In fact, all tasks except monitoring the remote version control system can be completed by Nant. ccnet only monitors changes and calls Nant.
  • You can directly configure the Visual Studio. NET solution for ccnet "<build type ="Devenv"Solutionfile ="D:/dev/myproject. sln"Configuration ="Debug"/>", But fxcop cannot be configured, at least for the moment;
  • The ccnetservice.exe. config clause "<add key ="Ccnet. config"Value ="C:/downloads/testdata/ccnet. config"/>" Should be the path for configuring ccnet. config, but now it seems that ccnet. config has to be put in the server directory.
  • It is best to avoid Chinese paths. Otherwise, several files in XML format need to be manually added, such as. csproj. "<? XML version = "1.0" encoding = "UTF-8"?> ", Or map the Chinese path to a virtual hard disk:" subst y: "D:/cc_view/use_tech_dept/platform/synus/2 Product Development/2 Implementation/synus1.0/source ""
  • Nunit has the visualstudio. Net plug-in nunitaddin, fxcop, etc. It can also be configured as a Visual Studio external tool. It is recommended to use
  • The installation and use of various tools are detailed in their respective documents, and there are countless resources on the Internet
Vi. References
  • Full introduction to dailybuild
  • Draco. net
  • Java manual for continuous integration

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.