views:

91

answers:

2

Is there a tool for automated test discovery for .NET. I am using the Visual Studio unit testing stuff and wanted functionality similar to Python Nose. I need to have a tool automatically discover all the unit test available and run for example the ones "marked" as unit and in different scenarios run the tests "marked" as Integration and so on. I have found an individual that has created his own implementation of the MSBuild test task and an considering creating my own with annotation attributes to do what Nose does but wanted to see if anyone was aware of an existing tool that could work.

Thanks

A: 

Try ReSharper from JetBrains. It does what you want with unit tests plus a whole lot more.

ryber
We do use resharper but I do not see where we can integrate this into a command line build w/out using the vsmdi stuff and do not see how to "tag/catagorize" tests as being unit, component, system, etc, tests.
mako
Almost everything in nUnit is scriptable. nUnit will even find all tests in a assembly. Thats what we do with our CI server. You can even have it only run certain categories. Some guys on my team wrote a Ruby rake file for running the tests. Let me know if you would like it and I can probably share parts of it (need to extract it from more proprietary bits though or I'd just post the whole thing here)
ryber
A: 

Visual Studio integrated test framework does exactly that when running from the IDE. If you need a command line tool that does exactly the same functionality (finds all the tests in a specific directory/solution) I guess you have to write something.

Because MSTest command line needs at least the assembly to be specified. I suggest you write a short script that iterates all the assemblies and find if they have tests in them and then run each assembly using MSTest.exe

Update: I've just published a new CodePlex project called #Nose that does exactly what you need. Currently it only supports NUnit but I plan on adding VSTest as well.

Dror Helper
Until we find something we are probably going to write something. Anyone out there interested in co-authoring something like this maybe on codeplex with us?
mako