Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a web service load test using Visual Studio 2010?

Is there a way to test a Web Service using VS2010 like it's used to test a web site?

For a web site I can create a set of WebTestRequest objects that emulate the loading and the parsing of a web page from the test and then, implementing the GetRequestEnumerator I can yield results to the load test so that the execution time and payload of any single page could be evaluated by the test runner and published in my test run reports.

I would like to do the same for a test using web service call so that each time I call the web service (there is some logic in calling it, like logging in, getting a security token and pass a proper formatted XML document to the web service method) I can yield the result to my test runner and evaluate it.

Is there a way to do it or do I need to implement a specific class inheriting from the WebTestItem abstract class?

Regards Massimo

like image 813
massimogentilini Avatar asked May 03 '10 15:05

massimogentilini


1 Answers

Yes, it is possible to test Web Services using Web Performance Tests in Visual Studio 2010 Ultimate.

Here's a couple of useful links:

  • How to: Create a Web Service test (MSDN)
  • How to: Web Service Load Testing Using VSTS 2010 (Blog)

As a starting point, you can use a web proxy tool like Fiddler to intercept the HTTP requests made to the Web Services, copy the contents of the SOAP envelopes in the Web Performance Tests and then tweak them accordingly based on the test scenario you want to simulate.

like image 196
Enrico Campidoglio Avatar answered Oct 13 '22 18:10

Enrico Campidoglio