Understanding Web Tests
Web tests are used to test the functionality of Web applications and to test Web applications under load. Web tests are used both in performance tests and stress tests.
You can create Web tests by recording your activities in a browser session. You can also build Web tests manually by using the Web Test Editor.
To test Web applications, you create Web tests by recording a test that navigates through a Web application.
You can create Web tests for use in an extensive set of testing purposes:
Create functional tests that exercise your Web applications.
Create data-driven tests.
Create and run tests that can test the performance of your applications.
Use .NET languages for test authoring, debugging, and test extensibility.
Web tests automatically handle these aspects of HTTP:
Hidden field correlation including VIEWSTATE
Security through HTTPS/SSL
By using the Web Test Viewer, you can view and debug your Web tests for verification. For more information, see How to: Run a Web Test.
A Web test starts as a list of URLs, representing Web requests, in the Web Test Editor. If necessary, these requests can be converted to Visual C# or Visual Basic code, called a coded Web test. After a Web test has been converted to its coded format, looping and branching constructs can be added. For more information about how to create a coded Web test, see How to: Create a Coded Web Test.
Web tests, although useful by themselves, are also used in load tests. Load tests allow you to aggregate several Web tests that simulate a real user load on your Web site. Before you can exercise the load test functionality, you must first create a Web test or several Web tests.
You can set properties on load tests that broadly apply to the individual Web tests. You can combine Web tests with unit tests in a load test, when appropriate in your test plans.
For more information about load tests, see Working with Load Tests.