web test use values in response as parameters for next request

asp.net, asp.net-mvc, c#, testing, visual-studio-2012

Solution

I know that this is an old question about Visual Studio 2012, however perhaps this might help someone trying to achieve this for Visual Studio 2015. There are probably many ways to get this done; here's how I've handled it:

- For the login `Request`, setup an extraction rule: right click on the `Request` and select `Add Extraction Rule...`. This will allow you to store data from the response to use in later requests. There are several ways to extract the data, such as from a POST field. The data is stored in a named variable, the `Context Parameter Name`. Let's suppose you've set this to `sessionid`.

- I've added all additional URLs to the original request using `Add Dependent Request`. You can add access the context variable anywhere by surrounding it with double curly brackets: `{{sessionid}}`.

Problem

How can I pass a field/value that will be part of the response received from the current request as a parameter for next request? I am able to set only static Form POST parameters. Is there a way to do this in the available UI for configuring the web test? I have searched around but these seem possible with jMeter and other web test frameworks. And seeing those lead me to giving up (for now) and start exploring the Coded Web Test approach in the meantime. Any suggestions/pointers appreciated.

Original source