Executing Tests with MSTest
You can also review our Telerik TV episode on Executing Tests with MSTest for a video walk-through of this process.
- Open Visual Studio. Create a project containing two tests. In this example, I've create two simple Web Tests: GoogleSearch and BingSearch.
- Click Test > Windows > Test List Editor.

- Right click List of Tests and choose New Test List.

- Name the New Test List and click OK.

- From the Test View pane, drag and drop the tests into the Test List Editor and Save the project.

- Close Visual Studio and open the Visual Studio Command Prompt.
- Navigate to the project's directory.
- C:\Users\Admin\Documents\Visual Studio 2010\Projects\MSTest-Tutorial\MSTest-Tutorial
- To execute a single test, enter the following:
- mstest /testcontainer:.\GoogleSearch.tstest
- To execute a test list, enter the following:
- mstest /testlist:SampleTestList /testmetadata:..\MSTest-Tutorial.vsmdi

- Open Visual Studio and load the same project. Go the Solution Explorer pane.
- Right click "Solution Items"and choose Add > New Item.

Note: In Visual Studio 2008, the default configuration file is LocalTestRun.testrunconfig.
- Highlight Test Settings on the left, again in the center, and give it a unique name. Click Add.

- The Test Settings window appears. Click Telerik Test Studio on the left, and then click the Web tab.

- Change the browser to Firefox and click Apply and Close. Save the project.
- Close Visual Studio and open the Visual Studio Command Prompt.
- Navigate to the project's directory.
- C:\Users\Admin\Documents\Visual Studio 2010\Projects\MSTest-Tutorial\MSTest-Tutorial
- To execute a test list with a custom settings file:
- mstest /testlist:SampleTestList /testmetadata:..\MSTest-Tutorial.vsmdi /testsettings:..\FF.testsettings

Note: Visual Studio 2008 uses runconfig instead of testsettings.