Skip to content
derabbink edited this page Aug 7, 2013 · 2 revisions

All tests are written with NUnit (v2.6.2.12296).

Running tests can be done in either of two ways: From the IDE or with an external NUnit runner.

From Visual Studio

You'll need to have an extension that can discover the NUnit tests. Examples are Visual NUnit 2010, or ReSharper. Depending on the extension you use, you'll need to find the appropriate test explorer window and run/debug tests from there. See your particula extension's documentation.

Config files

All NUnit runners look for a config file with the name TestAssembly.dll.config. Unfortunately the VS compiler does not take care of copying/renaming test projects' config files according to that scheme. For this reason you need to make sure that DistrEx test projects (those projects who's name ends with .Test) have a Post-build event set to copy any NUnit-style .dll.config files to the bin\ folder. Normally, the .dll.config files in question contain a comment with the appropriate Post-build command.

From an external NUnit runner

Take e.g. the nunit console runner. Using that tool, you can simply run all NUnit tests in an assembly with the following command

nunit-console-x86 DistrEx.Coordinator.Test\bin\Debug\DistrEx.Coordinator.Test.dll /framework:net-4.0

Pay attention to the architecture of your NUnit runner and your test-assembly; they have to match.

Clone this wiki locally