Aracılığıyla paylaş


How to: Set Credentials on a Web Test

You can set the credentials for any Web site that uses basic authentication or Integrated Windows authentication. Web sites that contain personal information often require user authentication before displaying any information through the browser. By setting the credentials for a Web test, you can conduct tests on sites that require this level of authentication.

You set credentials in Web tests in the Web Test Editor. For more information about how to edit a Web test, see How to: Edit an Existing Web Test.

To set credentials on a Web test

  1. Open a test project that contains a Web test for a secure site that requires authentication.

    For more information about how to create a test project, see How to: Create a Test Project.

  2. From the Test project, open a Web test.

    For more information about how to create a Web test, see Creating a Web Test. Your Web test opens in the Web Test Editor.

  3. Click the Set Credentials button on the toolbar.

  4. In the Set Credentials dialog box, type the name of a user and the associated password.

    These properties support data binding. For more information about how to add data binding in a Web test, see How to: Add Data Binding to a Web Request.

  5. Click OK.

See Also

Tasks

How to: Add Data Binding to a Web Request

Reference

IIS Authentication

Other Resources

Data-Driven Unit Tests