简体   繁体   中英

Waiting for a dependent request to complete within a Visual Studio Web test

A request within my web test has multiple dependent requests:

REQUEST
 DEP REQUEST A
 DEP REQUEST B

I need for the request to B to wait until A has completed because I need to extract a value from the response of A and put it into the request for B.

Is this something that is possible?

You might remove dependant request A from that top level request and add it as a totally new request. Dependant requests can be removed with a plugin. A web search for "WebTestDependentFilter" will find an example of the code, or see page 189 of the Visual Studio Performance Testing Quick Reference Guide on Codeplex .

I ended up taking the dependent request out and pasting it back as a separate request. When recording the scenario within Fiddler I could see the order of the requests and which were requests/dependent requests and so the Visual Studio web test recorder got this wrong.

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