80 lines
5.2 KiB
HTML
Executable File
80 lines
5.2 KiB
HTML
Executable File
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<title>CruiseControl.NET : Using CruiseControl.NET with NCover</title>
|
|
<link rel="stylesheet" href="styles/site.css" type="text/css" />
|
|
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
</head>
|
|
|
|
<body>
|
|
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
|
|
<tr>
|
|
<td valign="top" class="pagebody">
|
|
<div class="pageheader">
|
|
<span class="pagetitle">
|
|
CruiseControl.NET : Using CruiseControl.NET with NCover
|
|
</span>
|
|
</div>
|
|
<div class="pagesubheading">
|
|
This page last changed on Aug 31, 2005 by <font color="#0050B2">mroberts</font>.
|
|
</div>
|
|
|
|
<p>This page shows how you can integrate NCover, a code coverage tool, with NUnit into your CruiseControl .NET build for test coverage purpose. NCover is a code coverage analysis tool and it is designed to work with compiled shipping code.</p>
|
|
|
|
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>
|
|
<p>There are several different NCover projects available. We assume that you are using <a href="http://ncover.org">NCover.org</a> version.</p></td></tr></table></div>
|
|
|
|
<h2><a name="UsingCruiseControl.NETwithNCover-RunNCoveraspartofyourintegration"></a>Run NCover as part of your integration</h2>
|
|
|
|
<h4><a name="UsingCruiseControl.NETwithNCover-RunNCoveraspartofyourNAntbuild"></a>Run NCover as part of your NAnt build</h4>
|
|
|
|
<p>In order to get the results of NCover included in the CruiseControl.NET build results, you will need to include a call to NCover in your NAnt build file. We recommend you use a NAnt fragment like this:</p>
|
|
|
|
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
|
|
<pre class="code-xml"><exec
|
|
program=<span class="code-quote">"tools\ncover\ncover.exe"</span>
|
|
workingdir=<span class="code-quote">"build\unittests"</span>
|
|
commandline=<span class="code-quote">"/c &quot;..\..\tools\nunit\nunit-console.exe MyUnitTests.dll /xml:../MyUnitTests.dll-results.xml /nologo&quot;"</span>/></pre>
|
|
</div></div>
|
|
<p>For a thorough example, look at the CruiseControl.NET source distribution and look at how we use NCover ourselves.</p>
|
|
|
|
<h4><a name="UsingCruiseControl.NETwithNCover-RunNCoverasaCruiseControl.NETTask"></a>Run NCover as a CruiseControl.NET Task</h4>
|
|
|
|
<p>We don't currently support running NCover directly from CruiseControl.NET, but we plan on enabling this in a later release.</p>
|
|
|
|
<h2><a name="UsingCruiseControl.NETwithNCover-MergeNCoverresultsintoyourCruiseControl.NETresults"></a>Merge NCover results into your CruiseControl.NET results</h2>
|
|
|
|
<p>The next step is to merge the NCover report file into the integration result using the <a href="File Merge Task.html" title="File Merge Task">File Merge Task</a>. Your <a href="CruiseControl.NET Server.html" title="CruiseControl.NET Server">CruiseControl.NET Server</a> config file will have something in it like :</p>
|
|
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
|
|
<pre class="code-xml"><span class="code-tag"><tasks></span>
|
|
<span class="code-tag"><merge></span>
|
|
<span class="code-tag"><files></span>
|
|
<span class="code-tag"><file></span>d:\sourceforge\ccnet\build\unittests\Coverage.xml<span class="code-tag"></file></span>
|
|
<span class="code-tag"><span class="code-comment"><!-- Other files to merge for your build would also be included here --></span></span>
|
|
<span class="code-tag"></files></span>
|
|
<span class="code-tag"></merge></span>
|
|
<span class="code-tag"></tasks></span></pre>
|
|
</div></div>
|
|
|
|
<h2><a name="UsingCruiseControl.NETwithNCover-ConfiguringyourReportingApplicationtodisplayNCoverresults"></a>Configuring your Reporting Application to display NCover results</h2>
|
|
|
|
<p>For displaying the results, CruiseControl.NET <b>currently supports NCover 1.3.3</b>.</p>
|
|
|
|
<p>If you are using the <a href="Web Dashboard.html" title="Web Dashboard">Web Dashboard</a>, edit your <tt>web.config</tt> file and include the <tt>ThoughtWorks.CruiseControl.WebDashboard.Plugins.NCover.NCoverReportBuildPlugin</tt> Build Plugin.</p>
|
|
|
|
<p>If you are using Project Report Web Application, edit your <tt>web.config</tt> file and include the <tt>Coverage.aspx</tt> Build Plugin.</p>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tr>
|
|
<td height="12" background="http://confluence.public.thoughtworks.org//images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center"><font color="grey">Document generated by Confluence on Mar 14, 2009 02:55</font></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html> |