Search
Who is online?
In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests None
Most users ever online was 36 on Wed Jan 10, 2018 12:25 am
How to capture Ajex Calls using Jmeter?
3 posters
Page 1 of 1
How to capture Ajex Calls using Jmeter?
Hi,
I'm using Jmeter to test my application. I'm facing a problem. Below is the scenario:
After successful login to the application, the home page displays the account details which are displayed via the ajax calls. I first recorded the below transactions:
Login to the application. The home appears --> logout in bad boy and exported it to Jmeter.
Your Accounts page is having a number of portlets and account details is in one of the portlets. The portlet that takes lesser time to download are displayed first and the portlet displaying last is the account details portlet that is called via ajax.
Now, the problem is while recording in badboy, I find that the recording stops before the account details portlet displays in the homepage. When I exported the recorded script to Jmeter to play it back, I get no proper response for the homepage.
I also tried it with LoadRunner. So, I recorded the flow in LoadRunner and try to added it in Jmeter using HTTP request. Again, the same problem. When i play back the script in Jmeter - no proper response.
Please help me out.
Thanks,
Puneet
I'm using Jmeter to test my application. I'm facing a problem. Below is the scenario:
After successful login to the application, the home page displays the account details which are displayed via the ajax calls. I first recorded the below transactions:
Login to the application. The home appears --> logout in bad boy and exported it to Jmeter.
Your Accounts page is having a number of portlets and account details is in one of the portlets. The portlet that takes lesser time to download are displayed first and the portlet displaying last is the account details portlet that is called via ajax.
Now, the problem is while recording in badboy, I find that the recording stops before the account details portlet displays in the homepage. When I exported the recorded script to Jmeter to play it back, I get no proper response for the homepage.
I also tried it with LoadRunner. So, I recorded the flow in LoadRunner and try to added it in Jmeter using HTTP request. Again, the same problem. When i play back the script in Jmeter - no proper response.
Please help me out.
Thanks,
Puneet
puneet- Posts : 21
Reward Points : 41
Join date : 2010-08-22
Re: How to capture Ajex Calls using Jmeter?
Hi,
Jmeter has a proxy recorder. A proxy recorder will always record all the requests. As ajax calls are basically http requests and when u have a proxy configured, all http requests will go thru that proxy and hence get recorded.
This will create problems while replaying the tests. It is difficult to recreate the scenario with this software testing tools.
Jmeter has a proxy recorder. A proxy recorder will always record all the requests. As ajax calls are basically http requests and when u have a proxy configured, all http requests will go thru that proxy and hence get recorded.
This will create problems while replaying the tests. It is difficult to recreate the scenario with this software testing tools.
Re: How to capture Ajex Calls using Jmeter?
Hi,
Few months back, I encountered the same problem for one of my similar projects. I overcome this problem by updating some specific values using XML. The values like User ID etc. Follow the below steps:
1. Create new test plan
2. Under the Test Plan, add Config Element > Http Request Defaults - Enter server name and port number
3. Under Test Plan, add Config Element > HTTP Cookie Manager
4. Add Thread Group under Test Plan
5. Under the Thread Group, Add > Logic Controller > Recording Controller
6. Test Plan > Add > Listener > Aggregate Report
7. Under Workbench, Add > Non-Test Element > HTTP Proxy Server
- Port 9090
- Target Controller: Thread Group > Recording Controller
- Patterns to include: Click Add then enter “.*”
8. Under HTTP Proxy Server, Add > Timer > Gaussian Random Timer
- Set Constant Delay Offset (in milliseconds): ${T}
9. Bring up the FireFox browser and under Tools/options/advanced tab/network tab/settings button/”Manual proxy configuration”
- Set 127.0.0.1 port 9090
- Enable checkbox: “Use this proxy for all protocols”
10. Bring up HTTP Proxy Server, then click Start.
11. Now simply bring up FF and perform operations you wish to be recorded into the recording controller.
12. When complete, click the “Stop” button on the HTTP Proxy Server.
13. Verify that operations were recorded on the “Recording Controller”.
Hope this will also work for you.
Few months back, I encountered the same problem for one of my similar projects. I overcome this problem by updating some specific values using XML. The values like User ID etc. Follow the below steps:
1. Create new test plan
2. Under the Test Plan, add Config Element > Http Request Defaults - Enter server name and port number
3. Under Test Plan, add Config Element > HTTP Cookie Manager
4. Add Thread Group under Test Plan
5. Under the Thread Group, Add > Logic Controller > Recording Controller
6. Test Plan > Add > Listener > Aggregate Report
7. Under Workbench, Add > Non-Test Element > HTTP Proxy Server
- Port 9090
- Target Controller: Thread Group > Recording Controller
- Patterns to include: Click Add then enter “.*”
8. Under HTTP Proxy Server, Add > Timer > Gaussian Random Timer
- Set Constant Delay Offset (in milliseconds): ${T}
9. Bring up the FireFox browser and under Tools/options/advanced tab/network tab/settings button/”Manual proxy configuration”
- Set 127.0.0.1 port 9090
- Enable checkbox: “Use this proxy for all protocols”
10. Bring up HTTP Proxy Server, then click Start.
11. Now simply bring up FF and perform operations you wish to be recorded into the recording controller.
12. When complete, click the “Stop” button on the HTTP Proxy Server.
13. Verify that operations were recorded on the “Recording Controller”.
Hope this will also work for you.
Pogo- Posts : 11
Reward Points : 23
Join date : 2010-09-13
Similar topics
» Unable to Capture Session Id while Recording in JMeter for a Https Web Page
» Jmeter Issue
» Benefits and Drawbacks of Jmeter
» Get Best Performance Testing (Load Runner & Jmeter) Online Course
» Get Best Performance Testing (Load Runner & Jmeter) Online Course
» Jmeter Issue
» Benefits and Drawbacks of Jmeter
» Get Best Performance Testing (Load Runner & Jmeter) Online Course
» Get Best Performance Testing (Load Runner & Jmeter) Online Course
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Mon Mar 06, 2017 3:29 am by JebaQpt
» Can you say some unavoidable aspects for all Android App Testing Services?
Thu Oct 20, 2016 3:12 am by testbytes
» Can someone say about the things to look for while hiring iPad App Testing Services?
Fri Oct 14, 2016 5:26 am by testbytes
» Can you suggest some top testing frameworks used by Android App Testing Services?
Fri Oct 14, 2016 5:24 am by testbytes
» Can someone say why should hire specialist iPad app testing services?
Fri Oct 14, 2016 5:21 am by testbytes
» Can someone say how Android mobile app testing will become crucial in next 5 years?
Wed Aug 17, 2016 5:44 am by testbytes
» Can you say how iPhone app testing services fare in next few years?
Wed Aug 17, 2016 5:33 am by testbytes
» Can anyone say how different types of Mobile Application Testing improve the credibility of apps?
Wed Aug 17, 2016 5:07 am by testbytes
» Can you say some useful fragmentation tools used by android app testing services?
Mon Jul 25, 2016 1:01 am by testbytes