loadrunner *****Help Required**** I have recorded a script in LR Web HTTP...

  • perf-test.com need your contributions to build up a strong repository of performance engineering resources.

R

Ravi Goel

Guest
*****Help Required**** I have recorded a script in LR Web HTTP protocol for a web Ajax based application , I have handled all the dynamic values in this script and it works well till a certain point but breaks at the request where I am clicking on one of the application tabs (there are multiple tabs like enter customer details , address , names etc.). Basically for the request which is failing I am getting 200 OK server response but the response body is not coming as expected. I am getting this error - "HTTP/1.1 200 OK Vary: Accept-Encoding Ajax-Expired: View state could't be restored - reload page ? Ajax-Response: redirect" And an inappropriate response for which replay and recording snapshots are not matching. Request which is failing - "I have pasted the request in the first comment to this post" Tried following steps so far but not able get way with the error- 1. Compared HTTP response (recording vs replay) of all the requests before this request n the script and all the responses are coming as expected from the server , all correlations are in place 2. Recorded two scripts and handled all dynamics values which were changing , handled all dynamics values in the failed request as well 3. Manually browsed the application and checked the requests using Fiddler tool as well , load runner recording is in sync with Fiddler and I don't see any request missed and not recorded by load runner 4. Tried recording in Ajax True-client but that not working as after login some of the links are not clickable 5. Tried Ajax Click and Script - events are getting recorded but I cant see any request in the script , my inclination is more towards in getting this script done in HTTP protocol anyways 6. Since this is a ajax call so I tried to send the request multiple times to the server in a loop to wait for a appropriate response but that didn't help(do while loop and wait for appropriate response) 7. Checked all the cookies and headers which are getting passed in recorded and replay snapshots and fiddler recording but that doesn't seem to be a problem. I am blocked now and not able to proceed from here, expert advise required!!!!!!!
 
web_reg_save_param("Parameter13","LB=id=\"com.sun.faces.VIEW\" value=\"","RB=\" />
",LAST); web_custom_request("names.jsp_3", "URL=http://xxxxxxxx:9082/cs/faces/crm/createCustomer/names.jsp", "Method=POST", "Resource=0", "RecContentType=text/xml", "Referer=http://xxxxxxxx:9082/cs/faces/crm/createCustomer/names.jsp", "Snapshot=t51.inf", "Mode=HTTP", "EncType=application/x-www-form-urlencoded; charset=UTF-8", "Body=AJAXREQUEST=_viewRoot&form1%3ApopulatedFieldsReader=&form1%3AcardReaderData=&form1%3AsmartCardDataReader=&form1%3AshowSmartCardDataReader=false&form1%3AsmartCardRefreshFlag=0&form1%3Acard_reader_fields=&form1%3Acard_reader_data=&form1%3AcardReaderPressed=false&form1%3AshowArbName=Y&form1%3AnamesLoaded=false&form1%3AcustomerNo_names=&form1%3AcustomerName_names=&form1_link_hidden_=%5Bobject%5D&form1_link_hidden_=%5Bobject%5D&form1%3AenTitlesList=H.E%20AL%20WALY&form1%3AfirstName=&" "form1%3AenglishsecondName=&form1%3AthirdName=&form1%3AenglishlastName=&form1%3Aname=&form1%3AwomenName=&form1%3Asuffix=&form1%3AnickName=&form1%3AarTitlesList=H.E%20AL%20WALY&form1%3AarabicfirstName=&form1%3AarabicsecondName=&form1%3AarabicthirdName=&form1%3AarabiclastName=&form1%3AarabicName=&form1%3AarabicwomenName=&form1%3Aarabicsuffix=&form1%3AarabicnickName=&form1%3AnamesSaved=false&com.sun.faces.VIEW={Parameter11}&form1=form1&form1%3Acti_integration_action=form1%3Acti_integration_action&", LAST);
 
web_convert_param("Parameter11", "SourceEncoding=HTML","TargetEncoding=URL", LAST ); The request and replay snapshot requests are getting passed in same format , I have covered all basics as I am advanced LR user but this script has blown me off.
 
Check whether your parameter11 is getting converted properly. If it is then check whether you have multiple occurrences for view state. I have faced this kind of error and the problem was with correlation for the view state only
 
Check viewstate might changing at particular page try to capture left n right boundaries from page view source instead of code generation log. The view state value which ur capturing might change in at that req.
 
It seems to be you have to handle page redirections (http 302). Look for 302 request which is dependent for this request and capture it dynamically and place that in exact location.
 
@ Ram Krishna I have captured the left and right boundary correctly and verified the request on which it should get captured , its getting captured and replaced correctly.
 
@Ram Lekkala....How to handle page redirection here? from where do I get this request? I tried to sniff the requests using fiddler but I dont see any additional request for which HTTP response is 302.
 
Use network traffic tool between the client and the server.like fiddler, wireshark or nmon to see what is what is going through and what exactly you are getting in return and where is the bottleneck