views:

77

answers:

1

After much confusion, I have finally managed to successfully deploy a instance of Cruise Control .net on our build server. It polls the server every few minutes and builds only if it detects changes in the svn repository. For building and testing, I am using a combination of MSBuild and NUnit. MSBuild deletes all the previously generated test result xml files, builds the projects and runs NUnit. Finally I include the results generated from the test results into the current Cruise Control build result using Publisher\Merge option in the ccnet.config

The results are pretty great. However the logs generated are enormous and hard to go thru. I was looking the the cruise control's own instance at http://ccnetlive.thoughtworks.com/ccnet/server/CCNet%20Live/project/NetReflector/ViewProjectReport.aspx and there build report has more options included on the side like NUnit results etc.

I have tried to install multiple packages from the CCnet Administer Dashboard but none of the newly installed packages appear on the dashboard. I am guessing that I have to do more than just install these packages like tinker with the configuration files but I cannot figure out how. Does anyone have any experience in that regard?

A: 

The best way is to call Nunit directly from your Cruise Control :

<tasks>
    <msbuild>
       <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
       <workingDirectory>D:\Compil\src\net-3.5\MyProject\trunk</workingDirectory>
       <projectFile>MyProject.sln</projectFile>
       <buildArgs>/p:Cible="DEV"</buildArgs>
       <targets>Clean;Build</targets>
       <timeout>600</timeout>
       <logger>D:\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MSBuild.dll</logger>
   </msbuild>
   <nunit>
       <path>C:\Program Files\NUnit 2.5.7\bin\net-2.0\nunit-console.exe</path>
        <assemblies>
            <assembly>D:\Compil\src\net-3.5\MyProject\trunk\Tester\Tester.exe</assembly>
        </assemblies>
   </nunit>
</tasks>

Doing this you don't have to manually merge files nor to manually delete nunit results file.

Finally if your report doesn't suit you, check the xsl files used to create it ( see http://stackoverflow.com/questions/3705502/cruise-control-net-not-showing-nant-build-errors/3709184#3709184 )

Hope this helps.

Benjamin Baumann
I was going to use the nunit task directly but Cruise Control .net says that its not recommented to do it this way. Here is the link: http://confluence.public.thoughtworks.org/display/CCNET/NUnit+Task. I am pretty satisified with the way its working right now. As far as the packages are concerned .. that seemed to be that the IIS worker process does not have the rights to access the dashboard folder to make changes.
shake
OK that's a good reason not to use the nunit task. If you have a specific tests configuration, it's better to put it in a msbuild target, available from everywhere than to put it in the ccnet conf. As for your report problem, check the xsl included in your dashboard.config file (and ccservice.exe.config for the emails), check that IIS user has access to your dashboard folder and restart IIS. This should do the trick.
Benjamin Baumann
Yeah thats precisely what I did and it did the trick. Thanks for all your help
shake