I'm using NUNIT 2.1 and it very easy to integrate with VisualBuild. I have a "Run Program" action that calls the command line version of nunit, and passes in the path to the dll that it needs to test, something like:
C:\Program Files\NUnit V2.1\bin\nunit-console.exe "blah\bin\Release\mynunitproject.dll"
NUNIT returns zero as the exit code if tests pass, and non-zero otherwise, and the "Run Program" action automatically checks that.
In practice I have a have a single C# solution that contains a number of sub projects for a n-tier application. This solution contains nunit projects for each tier. I adopted the convention of naming the project nunitDataLayer.csproj, nunitBusinessLogic.csproj etc.
Developers typically work on one part of the code at a time and therefore only run one nunit project. Visual Build ensures all of nunit projects are alsoways re-run as part of the build process.
|