Поделиться через


Creating a Web Test

A Web test simulates how an end user might interact with a Web application. Typically, you create Web test by recording HTTP requests using the Web Test Recorder in a browser session, but you can also build Web tests manually using the Web Test Editor. For more information, see How to: Record a Web Test.

Web Tests

When you open a .webtest file, Visual Studio opens the file in the Web Test Editor, which displays a tree structure of nodes. The nodes can be edited by using the Properties window in Visual Studio.

Although a recorded Web test provides powerful Web testing capabilities, it lacks the flow control and looping constructs that are provided by more advanced programming languages. Team Edition for Testers provides the functionality to generate a coded test directly from a recorded test. A coded Web test is a .NET code file inherits from WebTest in Visual C# or ThreadedWebTest in Visual Basic. It generates a sequence of HTTP requests. Coded Web tests should be used when advanced flow-control or looping constructs are required. Code generation is the primary and recommended means to create coded Web tests.

For more information, see How to: Create a Coded Web Test.

What to Test

Although you can run a Web test against any Web site, that is not the typical way in which this Web testing tool is used. Generally, you test a Web site that you have under development, not your public, production Web site. This site you test is called your non-production Web site.

See Also

Tasks

How to: Record a Web Test
How to: Set Think Times in a Web Test
How to: Create a Coded Web Test