Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

HOW TO: Test ASP.NET Web Services with the Web Application Stress Tool


Summary

This article describes how to test ASP.NET Web services with the WAS tool. The WAS tool generates an artificial load on a Web server. The purpose of the WAS tool is to:
  • measure responsiveness
  • test scalability
  • tune performance
The WAS tool simulates requests from multiple users with Web browsers. While ASP.NET Web services are not intended to be used by Web browsers, ASP.NET Web services do generate browser-friendly pages. Therefore, ASP.NET Web services can be tested by using the WAS tool. To simulate Web service requests by using the WAS tool, follow these steps:

back to the top

Simulate Web Services Requests

To simulate the Web services HTTP GET request by using Microsoft Internet Explorer, follow these steps:

  1. Start Internet Explorer. In the
    Address field, type the URL to your Web services (.asmx) file.


    For example, a Web service that is named WebServiceTest with a .asmx file that is named MyWebService must be identified with the URL
    http://servername/WebServiceTest/MyWebService.asmx. Type this URL and then click Go.
  2. The ASP.NET Web service generates a browser-friendly page that describes the methods that are available in the Web service. Click the method that you want to issue a request to.
  3. The Web service generates another browser-friendly page with a detailed description of the method that you select. Scroll down to view sample requests and responses in all available Web service protocols.
  4. At the top of the page, type the parameters that are requested. Skip this step if no parameters are requested
  5. Click Invoke to issue an HTTP GET request to the Web service.

    Internet Explorer opens a new window and then issues the request. The Web service responds by returning an XML file that is displayed by Internet Explorer. Note the URL that appears in the address bar of the browser. The path that is shown after the hostname in the URL identifies the Web service and includes all parameters that are passed to the Web service.
back to the top

Configure the Web Application Stress (WAS) Tool for Web Services

Because ASP.NET Web services can communicate with a browser, this enables the WAS tool to issue Web service requests to ASP.NET.

To create a WAS script to simulate Web service methods, follow these steps:
  1. In the WAS tool, create a new WAS database.
  2. To create a new script, on the Scriptsmenu, point to Create and then click Manual.


    A new, blank script is created.
  3. In the right pane, type the hostname of the ASP.NET server in the Server field.

    This name is the hostname of the ASP.NET server that hosts the Web service.
  4. In the script grid, create a new grid item. To do this, select GET from the Verb drop-down list box on the first blank line.
  5. In the Path text box, type the absolute path of the Web service. This path must not include the http:// prefix or the hostname.

    For example, to issue a request to a Web service that is named WebServiceTest, with a .asmx file that is named MyWebService, a method that is named HelloWorld, and the single parameter cycles with a value of 3, type the path:
    /WebServiceTest/MyWebService.asmx/HelloWorld?cycles=3.
  6. Repeat step 4 and step 5 to add additional Web service requests.

    You may have to adjust the settings.
  7. On the Scripts menu, click
    Run.
  8. After the script completes, on the Viewmenu, click Reports to view the results.
back to the top

↑ Back to the top


References

For more information about deploying applications, visit the following Microsoft Web sites:For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
818015 HOW TO: Tune and Scale Performance of Applications That Are Built on the .NET Framework
back to the top

↑ Back to the top


Keywords: kbwebservices, kbconfig, kbweb, kbwiprotr, kbwiproauthor, kbhowtomaster, kb

↑ Back to the top

Article Info
Article ID : 815160
Revision : 3
Created on : 3/30/2017
Published on : 3/30/2017
Exists online : False
Views : 139