Highlighted
Absent Member.
Absent Member.
257 views

Load runner : Problems in replaying when the front end is developed in AJAX

Hi,

I have recorded a load script on a portal page where I was entering the first name and searching the accounts with that name. But when i replay it, the load script is not taking the searched name input in replay and there by giving no results in replay... the portal is developed in AJAX. is there any reason why i am not able to run this script in the expected way.

I am attaching the screen shot for more info.

Any help is highly appreciated.

Thanks,
Geeta
0 Likes
8 Replies
Highlighted
Absent Member.
Absent Member.

Re: Load runner : Problems in replaying when the front end is developed in AJAX

Cant download the snapshot.

What protocol are you using?
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Load runner : Problems in replaying when the front end is developed in AJAX

Hi Geeta,

what kind of protocol do you use ? even if I'm sure you use the good one.

The main trouble with AJAX is that you request something to the server, and when it return results, a javascript take car to treat and print it in the web page.
Some AJAX framework is supported by PC, check the one you use.

If your AJAX framework is not supported, PC don't know how to populate web page with the results (eq. what javascript function to call), so the visual result isn't good.

Check if your request to server is done and if it is, I think you'll have to handle response manually to grab necessary information to continue your script.

--
david
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Load runner : Problems in replaying when the front end is developed in AJAX

Hi,

I am using Web(HTTP/HTML) Protocol.

I am recording a search criteria on the screen . Which is i am entering the first name as "Dan" and clicking on Find button to retrive records.

When I replay, the page is not taking the name "Dan" in the text field so no results are returning. I am not sure why the input text is not taking in replay script.

Its a kind of show stopper for our load testing..so any pointers are highly appreciated.

Thanks,
Geeta
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Load runner : Problems in replaying when the front end is developed in AJAX

Is clicking Find button an Ajax call?

If it is then do you see a web_custom_request being generated in the script?

I would also suggest having a breakpoint at the clicking find button and turn the full logs to see what the server sends?

Also check if you need to do some correlations or check if data is correct.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Load runner : Problems in replaying when the front end is developed in AJAX

I think Yes, But i do not see any web_custom_request script.

My code peice is like this

***********

web_submit_data("L0lDU0lKSmdrS0NsRUpDZ3BSQ1NBL29Ob2dBRUlRaGpFS0lRQUJHY1p3aklDa3FTaFNOQkFOYUEhIS80QzFiOVdfTnIwZ0RFU1pJSlJERVNaTUpRaUlrZmchIS83X1VHVEVDRkgyME9GUzcwSUdWMUVPMkswMEc1L3o1UVdqODg4ODAwMjcvaWJtLmludi8xMTQzNTAyNTk4MzMvYmZfYWN0aW9uL0FjdGlvbl9TZWFyY2hCdXR0b25DbGljaw!!",
"Action=http://wpstest/wps/myportal/!ut/p/c5/hY1BC4IwAEZ_Uexzs02PQ2obxWKbmnkRDxGD1A7R70_pFljfd3w8HmnJ_LF_xVv_jNPY30lDWt5VqtwVe02BLMthlCp1UD5xBz7zC-8KJXUqjsCJ1gC12-BQBQbD_tjnpffbXzhWJvHhq4X0m9s8Aa09hBCeOUqJ1dNwJY-hQTQb-QbHKC1s/dl3/d3/L0lDU0lKSmdrS0NsRUpDZ3BSQ1NBL29Ob2dBRUlRaGpFS0lRQUJHY1p3aklDa3FTaFNOQkFOYUEhIS80QzFiOVdfTnIwZ0RFU1pJSlJERVNaTUpRaUlrZmchIS83X1VHVEVDRkgyME9GUzcwSUdWMUVPMkswMEc1L3o1UVdqODg4ODAwMjcvaWJtLmludi8xMTQzNTAyNTk4MzMvYmZfYWN0aW9uL0FjdGlvbl9TZWFyY2hCdXR0b25DbGljaw!!/",
"Method=POST",
"RecContentType=text/html",
"Referer=http://wpstest/wps/myportal/!ut/p/c5/04_SB8K8xLLM9MSSzPy8xBz9CP0os_hQ9xBXZzcPIwMDP0tDA6OwIANzc_Mg40AjI6B8pFm8s7ujh4m5j4GBv1GYgYGRn2lwoEFosLGBpzEB3eEg-_DrB8kb4ACOBhB5hA0WFpYGnu7uIR7B7kGGgd4m-n4e-bmp-gW5EQaZAemKAEG67b8!/dl3/d3/L3dDb0EvUU5RTGtBISEvWUZSdndBISEvNl9VR1RFQ0ZIMjAwODg5MElHR1RIU0dSMVFLNg!!/",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=build-number", "Value=1.0.9.0", ENDITEM,
"Name=_bowStEvent", "Value=consumer/AccountFinderConsumer!fireEvent:Form:AccountFinderPage_SaveDataSubmitEvent", ENDITEM,
"Name=_lastName", "Value=", ENDITEM,
"Name=__customerCode", "Value=", ENDITEM,
"Name=_firstName", "Value=Dan", ENDITEM,
"Name=_premiseCode", "Value=", ENDITEM,
"Name=_accountStatuses", "Value=A", ENDITEM,
"Name=btnFind", "Value=à  à  à  Findà  à  à  ", ENDITEM, LAST);

*******************

If you see the above code, the first name has some value and there is a Find button at the end of the function.

I was able to put the break point on this function, but the control is not going inside the function itself i believe.

because i do not see "Find" button click has happened in replay..

how to check for that..??

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Load runner : Problems in replaying when the front end is developed in AJAX

I can see that the value is sent to the server as well.
I think that the best thing to do next is extend the logs, and take a look at the response from the server and see if you get any error messages.

Most likely, you need to do some time of correlation.

cheers...


~hector
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Load runner : Problems in replaying when the front end is developed in AJAX

Hi,

There is no error coming back from server aswell.

I am attaching the screen shot of the replay and my logs for that action.

Is there any settings needs to be set if the code is in AJAX?

TIA

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Load runner : Problems in replaying when the front end is developed in AJAX

Hi Geeta,

If the server response is correct, so it seems that the script is replayed correctly.

What framework do you use for the AJAX call?
prototype JS framework or other ?

--
david
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.