0

Performance Engineering tool: LoadRunner 11

Protocol: Silverlight

The scenario: 1. A call is made (by the Silverlight application) to the web server to generate a unique identifier (UID) 2. The server returns a response with the UID 3. The application uses that UID to save Patient record (in this scenario, UID is Unique Patient Id)

The problem: We would like to use the ID received in the Step 2's Web Response (say, as a local variable) and replace it in the next subsequent request sent by LoadRunner.

Please advise whether the same is possible.

*In parallel trying to figure out if "web_reg_save_param" will solve our problem.*

------------ LoadRunner data --------------------

1. Call to generate Uid

ignored as it is too large to paste here and irrelevant

2. Response from server (The UID is UNI-0000001544)

HTTP/1.1 200 OKCache-Control: privateContent-Type: application/msbin1Content-Encoding: gzipVary: Accept-EncodingServer: Microsoft-IIS/7.5X-AspNet-Version: 4.0.30319X-Powered-By: ASP.NETDate: Fri, 06 Jul 2012 05:41:27 GMTContent-Length: 188@GenerateSequenceResponsehttp://tempuri.org/@GenerateSequenceResultâ„¢UNI-0000001544

3. Next LoadRunner request where the UID (UNI-0000001543) has to be replaced with the UID received in the response

web_custom_request("SubmitChanges", "URL=http://infinityappload/ClientBin/Infinity-Web-Services-ActorDomainService.svc/binary/SubmitChanges",

. . . , "BodyBinary=@\rSubmitChanges\

. . . \tPatientID\\x99\\x0EUNI-0000001543\

... LAST);

Tushar Sood
  • 403
  • 1
  • 5
  • 14

2 Answers2

2

This is, as James said, the idea of correlation. The simplified approach would go as follows:

web_reg_save_param("UID2", "LB=GenerateSequenceResultâ„¢", "Savelen=14", LAST); 
//The TM symbol will have to be replaced by whatever HTML code is used. 

web_custom_request("WebRequest1", ....);

web_custom_request("SubmitChanges", "URL=http://infinityappload/...",
         ...
         "BodyBinary=@\rSubmitChanges\",
         "\tPatientID\\x99\\x0E{UID2}\",
         LAST);

Values that are to be correlated are going to be determined prior to the request they will be populated by. They can then be used in any subsequent requests. Just make sure that, when using a correlated parameter, it is inside a quoted string.

Joe Fontana
  • 2,306
  • 3
  • 18
  • 18
0

The concept you are referring to is the management of correlated variables, it is a core concept in the use of performance test tools, LoadRunner included. This particular concept is the subject of nearly 1/3 of the standard LoadRunner script development product training. I would refer you to information on correlation for both web and silverlight protocols in the system documentation. Also, it is critical for your short and long term success that you pair yourself with both a strong mentor as well as attending some form of standard product training.

James Pulley
  • 5,606
  • 1
  • 14
  • 14