I decided to add some unit tests into my first CI Factory project. First I used a reference to MbUnit.Framework.dll in my test project, this is the unit test framework which ships with CI Factory, and all worked fine.
No disrespect to MbUnit, but I decided I really wanted to use NUnit so I can utilise the larger amount of documentation and community knowledge that exists for NUnit (even though it might not be as flexible as MbUnit). So I added NUnit 2.2.8 (.NET 2.0 version) underneath my CI Factory Third Party folder and flipped the test project over to use NUnit with a reference to NUnit.Framework.dll instead of MbUnit.Framework.dll.
Cruise Control blew up with an error in the NAnt Output log;
External Program Failed: C:\Program Files\NCover\NCover.Console.exe (return code was 1)
Oops!! I know the issue is within the file Build/Packages/NCover/NCover.Target.xml, probably leading to Build/Packages/DotNetUnitTest/UnitTest.Target.xml but I couldn't find anything obvious to edit.
In the end the Solution was horribly simple and I let out a loud DOH!. I just left the reference to MbUnit.Framework.dll in my test project, in addition to the NUnit.Framework.dll reference which actually performs the unit tests.
I can now run the NUnit GUI to run my tests on my development machine. If they pass, I check in, Cruise Control builds the project and happily runs my unit tests in automated mode.
Happy, happy, joy, joy
P.S. I did muse that it could be the lack of an
NUnit.Tasks.dll for NAnt to hook into which might be the issue, but I'm no expert so this is a bit of a wild stab in the dark.
Technorati tags:
ci factory,
Continuous Integration
Print | posted on Monday, April 16, 2007 12:24 AM