Flex (RTMP/AMF) Correlation

This task describes how to correlate Flex (RTMP/AMF) Vuser scripts. For details on how to use XPath correlation in Flex Vuser scripts, see Flex XPath Correlation.

  1. Locate the step in your script that failed due to dynamic values that need correlation.

    Use the Replay Log to assist you in finding the problematic step. These errors are not always obvious, and you may detect them only by carefully examining Vuser log files.

    Action.c(16): Error Server returned error for message #1 : "Incorrect session ID sent"/
    Action.c(16): There was an error during the Flex Call ("ConnStatus")
    
  2. Identify the server response with the correct value in one of the previous steps.

    Double-Click the error in the Replay log to go to the step with the error. Examine the preceding steps in the Step Navigator and look for the value in the Server Response tab.

  3. Save the entire server response to a parameter.

    Before you extract the value, the entire server response should be saved to a parameter as follows:

    • Right-click the step node (in the left Action pane) corresponding to the server response containing the value and select Properties.

    • In the Flex (or AMF) Call Properties dialog box, type a Response parameter name.

    • Click OK to save the new parameter name.

  4. Save the original server response value to a parameter.

    • In the XML tree of the Server Response, right-click the node above the value (for example, string), and select Save value in parameter.

    • In the XML Parameter Properties dialog, specify a parameter Name. You will use this name in subsequent steps.

    • Click OK. The script now contains a new function, lr_xml_get_values.

  5. Insert the parameter in the subsequent calls.

    In the VuGen Editor, beginning with the call that failed, replace the value in all subsequent calls to the object with the parameter that you defined:

    • Right-click the step node (in the Action pane) corresponding to the failed call and select Properties.

    • Locate the argument that required correlation.

    • In the Value box, type the parameter name in curly brackets, for example, {ParamValue_string}.

    • Click OK.

  6. Run the script.

    Make sure that VuGen properly substitutes the argument value with the parameter value that you saved.

Back to top