(+N) Consulting Inc.

Consulting | Software Solutions | Training

Unit Testing as part of the build process in VS2005

We had a practice which included unit testing for a while now, but it entailed Nunit and MBunit with various build frameworks such as CruiseControl and VisualBuilder. We are running VS2005, and wanted to include running the tests on developer boxes as part of a build, so that failed tests will flunk the build. Using a post build event, this is easily done: In the Post Build Events, enter: CD $(TargetDir) "$(DevEnvDir)MSTEST.exe" /testcontainer:$(TargetFileName) The quotes around the MSTEST full path ensure that the space in the name "Program Files" is resolved correctly. Changing directory to the target directory is easier than setting all explicit paths etc. This could have b... [More]