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.
Web Test Benefits
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.
Coded Web Tests
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.
Considerations for Load Testing
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.
Web tests and Web test results contain potentially sensitive information that could be used to build an attack against a computer or network. Web tests and Web test results contain URLs and connection strings. You should be aware of this when you share tests or test results with others.