NAnt, NUnit and Cruise Control pt2
I first treaded (thanks Tim) this path a little under a year ago, since then technology as moved on and with a requirement to set such an enviroment up I revisited it.
I was struggling to find a build system that I could use with VS 2002 as my previous post indicated. However with 1.1 installed it opened up lots of doors. I quickly had the NUnit tests updated but it left the questoion of a build system. Running 2.0 b1 was certainly out of the question, this left me with the SDC Build Tools and NAnt. I wanted to go with NAnt so I could run NUnit and use with VSS, while I could still use the SDC build tools it ment I would have to use Cruise Control for those stages and I wanted to keep it in one place. I was however a little concerned that last time I tried this it struggled with ASP.NET resource files. a quick search however showed me this and sure enough NAnt was running sweet with no need to convert the solution file, nice !!
With NAnt working I tried NUnit, I however kept getting a nunit.framework file not found error. Even with the config mappings it refused to work and in the end I added NAnts version of this file to the GAC. Sure enough it worked a treat. I then made the test fail, confrmed in the NUnit GUI and tried NAnt again.....still says its fine. Hmm remembering I changed the tests to use the new test types, I added the old method to the test I had broken and tried again. Still works? At this point it occured to me that NAnt was using its version of NUnit while the test them selfs were compiled with a newer version. I downloaded the nightly build of NAnt and tried again.....the failed tests are reported...success!
Next was cruise control, when I attempted to obtain the code the site was down (and is up and down at the moment) so I used SourceForge. The docs that come with cruise control are great, when you have unzipped the code eveything you need is in the docs folder. The config it talks about in the server folder you will need to create, a dummy file that a user can mod would have been handy but thats just a side issue. I would recommend you get the console application working first (using NAnt to do the build) and then switch to the server. I have noticed that any issues in the config file will allow the server to start but the application log then indicates its failed, the service then fails to stop (I had to kill it manually). With that all up and running you then setup the web project, set tray application running and bingo its running, time for a coffee to celebrate !!
With the system now up and running I will add in FxCop and NDoc. Code coverage is something I wanted to do but I can't get any of the tools to run, not sure why but every installer I have tried has failed. It could be a security thing but if I need to be a admin to run these tools then forget it.