We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

How to: Run a Web Test from the Command Line

You can run your Web tests from the command-line. For more information, see How to: Run Tests from the Command Line.

To run a Web test from the command line

  1. Open a Visual Studio command prompt, and change directory to the folder that contains your Web test.

    For more information, How to: Run Tests from the Command Line.

  2. Type the following command:

    mstest /testcontainer:WebTest1.webtest

    where Webtest1.webtest is the name of your Web test.

  3. (Optional) You can use other options with the MSTest command. For example, you can save results to a specific test results file; publish test results; or run with specific run configuration settings to, for example, change the files that are deployed. For more information, see MSTest.exe Command-Line Options.

See Also