TestRunner is designed to be as simple as possible. Rather than a large manual, this online resource provides instructions on the features of TestRunner.

What is new in this version?

Check out the Change Log

How do I start TestRunner?

The first step is to show the TestRunner window by picking it from the Tools|TestRunner menu. You can also run without the test window and execute tests directly from the editor right click context menu.

How do I start Code Coverage?

Show the coverage tool window from Tools|TestRunner Coverage. Make sure that in the options in TestRunner Coverage window you have Profiler selected or set to true. Now all you have to do is run a test.

How do I configure the editor boxes or colors?

Tools|Options|TestRunner has integrated options directly into Visual Studio. From here you can alter which marks and boxes are drawn.

What are the hotkeys?

  • Ctrl-r,t to run a single test from the editor. This figures out what test you are in from the text cursor.
  • Ctrl-r,d to debug a single test from the editor.
  • Ctrl-r,a to run the last test again.

How do I run just one test case?

In the TestRunner panel, after test cases are loaded, you can right mouse on any individual test and pick Run. You can do this at any level in the test tree. You can also debug/run a single test from directly in the source editor using the right-mouse context menu. You can also hit Ctrl-r,t keyboard chord to run the test under the cursor.

 

What about the context menus?

From the text editor, a simple extension to the normal context menu provides:

  • Run Test: run the test currently under the cursor.
  • Debug Test: debug the test currently under the cursor.

What languages are supported?

TestRunner supports VB .NET and C# .NET.

My build keeps reporting that one of my files is in use, preventing a compile. What should I do?

The first thing to try is unloading the test cases. Failing that, restart the test service. If neither of those work, there is another process keeping the file locked. This is most common when writing COM applications.

I have tests in a 2005 Web directory project and they won't load.

The best advice is to move them to a separate library project. TestRunner isn't able to load tests directly from code behind in a web side or App_Code, the dynamic compilation confuses it.