is it possible for ccnet to say that the build has failed in the ccnet tray and the web site if a unit test fails for the project?
Anyone know of a tutorial for this?
Of course ! And it is the goal for continuous integration !
Just add a task to run your unit test after compilation. It depends heavily on the programming language you use, but you can consider running the EXE for unit tests.
So to summarize, sample task order :
You ask for a tutorial, I can give you an example :
<!-- SVN implementation -->
<sourcecontrol type="svn">
<trunkUrl>http://dephicodetodoc.svn.sourceforge.net/svnroot/dephicodetodoc/trunk/DelphiCodeToDoc/</trunkUrl>
<workingDirectory>$(WorkingBaseDir)\DelphiCodeToDoc</workingDirectory>
</sourcecontrol>
<!-- Build tasks to implement -->
<tasks>
<!-- Compile main application -->
<msbuild>
<executable>$(MSBuildPath)\MSBuild.exe</executable>
<workingDirectory>$(WorkingBaseDir)\DelphiCodeToDoc\Source</workingDirectory>
<projectFile>DelphiCodeToDoc.dproj</projectFile>
<buildArgs>/target:Build /p:Config=Debug</buildArgs>
</msbuild>
<!-- Compile tests -->
<msbuild>
<executable>$(MSBuildPath)\MSBuild.exe</executable>
<workingDirectory>$(WorkingBaseDir)\DelphiCodeToDoc\Test</workingDirectory>
<projectFile>DelphiCodeToDoc_Tests.dproj</projectFile>
<buildArgs>/target:Build /p:Config=XmlOutput</buildArgs>
</msbuild>
<!-- Execute unit tests -->
<exec>
<executable>$(WorkingBaseDir)\DelphiCodeToDoc\Exe\DelphiCodeToDoc_Tests.exe</executable>
<baseDirectory>$(WorkingBaseDir)\DelphiCodeToDoc\Exe\</baseDirectory>
</exec>