views:

322

answers:

4

We have loads of DLLs with tests. I'm looking for a test runner (GUI) that either allows me to load all DLLs in a folder or that can load all tests from Visual Studio solution files. Ideas?

(I would like to use it as a complement rather than a replacement to our nightly builds (that runs all tests)).

A: 

I must be missing something - the standard NUnit GUI runner allows you to load multiple assemblies and run them as a batch.

Update 16 July

Apologies, I'm guilty of not reading the question properly. Still, I hope the following will be helpful.

I'm assuming that you have a (possibly large) collection of test assemblies, and want to avoid having to load them all manually each time you run tests. NUnit "project files" can help.

Within the NUnit GUI runner, select File|New Project and create a new .nunit file at the top of your projects directory structure. Add each of your test assemblies to this project (Unfortunately, this seems to be a one-by-one task, as there's no search nor even multiselect). Once you've added all assemblies, save the project file.

Next time you want to run your tests, you can just load your .nunit file and all of your assemblies will be picked up for testing.

This isn't as convenient as a wildcard, and it does require a little maintenance, but does avoid having to manually select a whole bunch of assemblies every time.

Bevan
I can't find a way to load them all without having to select them one at the time. I'm probably the one missing something here ^_^
Ola
Yeah, I have used nunit project files and that kind of work. I'll see if I can find anything better. Thanks a lot anyways.
Ola
+1  A: 

I may be missing something of your problem but if your approach is really to run a test over all DLLs in a specific folder it seems an easy task to write a small script or tool that puts a list of the names of all DLLs located in a specific folder into a generated .nunit file.

These are simple XML files that can be automatically composed quite easily.

Uwe Honekamp
A: 

You may run tests from multiple assemblies in one run using the console interface even if you have not defined an NUnit test project file. The following command would run a suite of tests contained in assembly1.dll, assembly2.dll and assembly3.dll. nunit-console assembly1.dll assembly2.dll assembly3.dll

Rohit
"The following command.." did you miss to post the command?
Ola
A: 

You should take a look at TestDriven.Net - it integrates with Visual Studio and allows you to right-click a solution, project, file, or method and run all the associated unit tests. It's free for students and open source developers - otherwise you do have to shell out for it.

Chris Shouts