UI to Control Unit Tests


G

Guest

I'm working in Visual Studio 2005 Team Edition for Software Developers

I've used the wizard under the Test menu to create a bunch of unit tests.
When I click "Test -> Start Selected Test Project with Debugger" the tests
run.

I'd really like to create a WinForm User Interface to run the Unit Tests.
The idea would be to give the user a list of Unit Tests in a table, and let
the user select any combination of tests they like. The user then clicks Run,
the tests run, and the user sees the results.

My first thought is to have the WinForm project generate a batch file that
runs the selected tests using MSTest at the command line.

Before I go down this road, can anyone point me toward articles or ideas on
better ways to do this? This approach seems awfully 15 years ago.

Thanks,
Randy
 
Ad

Advertisements

J

Jon Skeet [C# MVP]

randy1200 said:
I'm working in Visual Studio 2005 Team Edition for Software Developers

I've used the wizard under the Test menu to create a bunch of unit tests.
When I click "Test -> Start Selected Test Project with Debugger" the tests
run.

I'd really like to create a WinForm User Interface to run the Unit Tests.
The idea would be to give the user a list of Unit Tests in a table, and let
the user select any combination of tests they like. The user then clicks Run,
the tests run, and the user sees the results.

My first thought is to have the WinForm project generate a batch file that
runs the selected tests using MSTest at the command line.

Before I go down this road, can anyone point me toward articles or ideas on
better ways to do this? This approach seems awfully 15 years ago.

I guess my first question would be why you want to do it in the first
place. What does VS not do that you want to do?
 
A

Andreas Mueller

randy1200 said:
I'm working in Visual Studio 2005 Team Edition for Software Developers

I've used the wizard under the Test menu to create a bunch of unit tests.
When I click "Test -> Start Selected Test Project with Debugger" the tests
run.

I'd really like to create a WinForm User Interface to run the Unit Tests.
The idea would be to give the user a list of Unit Tests in a table, and let
the user select any combination of tests they like. The user then clicks Run,
the tests run, and the user sees the results.

My first thought is to have the WinForm project generate a batch file that
runs the selected tests using MSTest at the command line.

Before I go down this road, can anyone point me toward articles or ideas on
better ways to do this? This approach seems awfully 15 years ago.

Thanks,
Randy

Have you thought about using another unit test runner? NUnit can run
MSTest unit tests and its UI offers the possibility to select tests as
you describe it.
Testdriven.net has no UI, but is highly integrated and lets you run
tests on method, class, file, folder project and solution level.

HTH,
Andy
 
J

Jon Skeet [C# MVP]

Have you thought about using another unit test runner? NUnit can run
MSTest unit tests and its UI offers the possibility to select tests as
you describe it.
Testdriven.net has no UI, but is highly integrated and lets you run
tests on method, class, file, folder project and solution level.

There's also the free unit test runner from JetBrains (http://
www.jetbrains.com/unitrun/ - it's hard to find on the web site, IME!).
It's not quite as good as the one in the full edition of ReSharper,
which is *well* worth getting IMO, but hey, it's free :)

Unfortunately I believe MSTest tests aren't supported - at least not
yet!

Jon
 
G

Guest

There are people around here who don't have Visual Studio who want to be able
to run tests. Writing a WinForm front end for Unit Tests created in Visual
Studio should not be a big deal. I find it hard to believe I'm the first
person to go down this road, so I thought there might be some articles or
insights on the subject.
 
Ad

Advertisements

J

Jon Skeet [C# MVP]

There are people around here who don't have Visual Studio who want to be able
to run tests. Writing a WinForm front end for Unit Tests created in Visual
Studio should not be a big deal. I find it hard to believe I'm the first
person to go down this road, so I thought there might be some articles or
insights on the subject.

I guess the reason it's not common is that unit tests don't normally
mean much to non-developers. Are your unit tests actually acceptance
tests etc? (Not that it's a bad idea to write those with a unit test
tool...)

To echo the comments of others, using NUnit you'd be able to run
NUnitGUI, although that's far from pleasant.

Jon
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top