Creating an Automated Test That Runs an Executable Using Generic Tests

You use generic tests to call external programs and tests. After you have done this, the generic test is treated by the test engine as any other test type. For example, you can run generic tests from the Test View window and the Test List Editor and you can obtain and publish results from generic tests just as you do from other tests.

The following table specifies the requirements to create generic tests:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional 

Visual Studio Express

Topic applies Topic applies Topic does not apply Topic does not apply

Tasks

Use the following topics to help you in creating generic tests:

Key Tasks

Associated Topics

Creating a generic test: You can create a generic test by using the generic test template provided in Microsoft Visual Studio 2010 and by specifying the program that you want to call.

How to: Create a Generic Test

Using environment variables in generic tests: You can use environment variables to represent paths to folders that contain files including your target executable and items to deploy.

Using Environment Variables in Generic Tests

Run generic tests: You can run the generic tests that you have created from the source code itself, from the test view window, by using test categories, test lists from the test list editor, or from the command line.

How to: Run Automated Tests from Microsoft Visual Studio

Running Automated Tests from the Command Line

Defining Test Categories to Group Your Tests

Determining code coverage: To know how much you are improving the quality of your code, you must determine how much of the code your generic tests are covering when you run them.

Create Test Settings to Run Automated Tests from Visual Studio

How to: Configure Code Coverage Using Test Settings for Automated Tests

See Also

Other Resources

Creating Automated Tests