Extracting Values From RIA Responses

Applies to LoadComplete 4.97, last modified on May 20, 2019

To extract values from a Rich Internet Application (RIA) response, such as JSON, XML or AMF:

  1. Open the scenario in the Scenario editor. To do this, double-click the scenario in the Project Explorer.

  2. Find the response containing data you want to extract. To do this, select the request that returns the needed response and then switch to the Response tab.

  3. Switch to the Response Body tab at the bottom of the editor. It shows the tree-like structure of the response data.

    The Response | Response Body Panel

    Click the image to enlarge it.

  4. Select the parameter whose value you want to extract.

  5. In the Variable column, enter the name of the variable that will store the extracted value, or click and select the needed variable in the dialog. Remember to specify the @ prefix, that is, @variableName:

    Specifying the Variable

    Click the image to enlarge it.

    Use existing project and scenario variables only if they do not pass other data. Otherwise, LoadComplete will replace the data they contain with the extracted values during the test run.

  6. Select File | Save from the LoadComplete main menu to save the changes.

Further Steps

Once you extract a value from a Rich Internet Application (RIA) response, you can:

  • Validate the extracted value to make sure that the server returns correct data. To do that, create a validation rule that will compare the extracted value against a baseline value.

    For step-by-step instructions, see Validating Response Contents.

  • (Optional) Modify the extracted data if needed. See Modifying Correlation Data.

  • Pass extracted data to subsequent requests.

    You can use the extracted value only in requests that follow the response from which you extract the value.

    If the structure of a response returned by the server during the test run differs from the structure of the same response obtained during test recording, LoadComplete will fail to retrieve parameter values from the response. It will not save the values to variables and the correlation rules will fail.

    For step-by-step instructions, see Using Variables in Requests.


If you use the extracted data for data correlation, LoadComplete will wait for the server to return the response containing the needed value until the correlation timeout expires. See About Data Correlation.

See Also

Extracting Data From Responses
About Data Correlation
Using Variables in Requests

Highlight search results