简体   繁体   中英

Visual Studio Web Performance Test - Can I make a non-coded web test execute requests in parallel

Using Visual Studio 2013 Ultimate for Load Testing.

The main problem I'm facing is that the Web Performance Tests execute all containing web-requests sequentially. This is not how browsers would work (with multiple parallel threads being used instead).

Simplified Example

  • Call to page (1 sec)
  • AJAX call 1 (1 sec)
  • AJAX call 2 (1 sec)
  • AJAX call 3 (1 sec)

The browser will execute all AJAX calls simultaneously and complete the page in 2 seconds.

The Web Performance Test executes them sequentially (one at a time) and reports that the test took 4 seconds to complete.

I am aware that I can use a Coded Web test to do these in parallel, but I would like to stick to the tooling if at all possible.

Is this possible?

Add the requests as dependant requests of another request.

Create a top level request that does not load anything useful. I have been using " http://localhost/ " for something similar. Set the "Parse dependant requests" and "Follow redirects" properties of this request to false. That is to avoid the test suite adding more requests. Add the requests to be performed in parallel as explicit dependant requests to this top level request.

Browsers work by extracting a list of dependant requests and then sending several of them at the same time so they are processed in parallel. As responses to these requests are received others from the list are sent. This continues until the list is empty. The number of requests that will be issued in parallel depends upon the browser (possibly modified by configuration data for the user or the computer). The parallelism that Visual Studio uses when simulating browsers can be seen in the MaxConnections values in the files in directory C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\Templates\\LoadTest\\Browsers (modified as needed for your Visual Studio version and install directory). See also the top of page 45 of the "Visual Studio Performance Testing Quick Reference Guide" (Version 3.6) which implies that ".browser" files without an explicit MaxConnections value only support two connections.

Possibly one of the requests to be done in parallel would be better as the top level request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM