How to handle cookies in Load Runner

Hi,

 

I was using LR for one of my application and did find that few cookies are recorded in the script that did not allow me to actually go to reports after login in replaying the script.

 

Those cookies are generated by asp.net runtime engine, disabling these cookies either application will not run, or we will not to proceed to further pages. 

 

I'm actually looking for a way to handle cookies through Load Runner itself as through code if we do then it will impact the functionality of application.

 

Earliest solution to this will be appreciated.

 

 

Cookies details below as recorded in LR script:

 

web_add_cookie("hPleat34_RGPSTEST_SECURE=6E5ADC205032123E995EE554DF71393E10012215A47D71A990F782EA935D81BED041A72EED0C614C1BC0BCC438DCFE07BB4B97D745F5A02EBE01147B456BF3E120773F99002BACC8ACBB6F002B760559F103DC4FD8BAB943E9D130BE3795C70785E34D69FD97C729F281F28B12572A68868B4E2AE816020A32946DBCE6D9E7988DDB3FECA3DBA9AA99F65C140A4D496B4BB518A7C8A29F314C2ADB119E66959CF1506F9A; DOMAIN=rgpssystest.mclagan.global");     

web_add_cookie("hPleat34_RGPSTEST_SECURE=F66813DC286C986FCB88515F64F00548ED7F7BDF4F6170AD84E08D2616CF5280039A594BE07B72AC88F5303E5106B4FCB99F2301413C4349C798913DE4CF477D4F74C267A78325A809E1ED6E9FC9F7EEE90AC98D8406CFBB27D707F2616361804E2622173C7C0A5B3B31DBD621C24606663C84846153C887B35ABFC77F5E9027F7C5CAF3B9C9FC033125E053A100D1EA36B24F2672B25503B78B56ED14754985541B2365; DOMAIN=rgpssystest.mclagan.global");     

web_add_cookie("hPleat34_RGPSTEST_SECURE=69E804A28FE74AF2EB3A72412BC76F3624E0419E27210037B53064EC88A8060CC13C0D97D6938D2C934E3272349A01E795948F5F898639D434AA5A69F514243DE95413EC14E0E8A8ABF430F4B61BCAC3618BC363849EC6C1641A6A714CBC52F2E19D948F5BEBAEFC5A0623F02C5B40D994FEA1F54CAC12543DF4AF4242EB504B28FE4A77FEEBE3A843D4D2A477C1CE85FDF5BAA33324632726602ABA933A5EE70DA4E3E2; DOMAIN=rgpssystest.mclagan.global");     

web_add_cookie("hPleat34_RGPSTEST_SECURE=15EBD62BBF44560B695817B8CE6814956DE6995D19A2D2D6E306BEFC379649E857938AD8819E1CBDC5DF9B916DBF57C318574FA766426501E3658EFD3808830F30418B74B0D761A5A819551E454D7B0B2BE87A30E5E1ACC1A1C2C7028E0FAF9134F7F81C30C10F5ED21C3B0BB09438AAC4A5D8F98DAE3422B6C8DAD5BF322C9160BAD2358171B2AD00D3FAC19CA656DF0F8B60F00A1EE969348315C47606BA7A32530933; DOMAIN=rgpssystest.mclagan.global"); 

Thanks

Aman

  • Hi Aman,

    Actually, LoadRunner records web_add_cookie step in the script when the "source" of desired cookie (Set-Cookie header with appropriate value) cannot be found while code generation. In such case we add this function to script in order to send the cookie in replay. And , in many cases, recorded cookies are not static  and should be correlated. 

    You can try to correlate cookie's value from script using "Correlate selection" option or by appropriate correlation rule (new rule).

    Of course, If you can share your script,  I'll try to provide you more detailed answer.

    Best regards,

     

    Leonid.