QA Forums
Welcome on the QA Forums.

To take full advantage of everything offered by our software testing & Quality forums, please log in if you are already a member or join our community if you're not yet.... Smile

Display results as :

Rechercher Advanced Search

Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest


[ View the whole list ]

Most users ever online was 36 on Wed Jan 10, 2018 12:25 am
October 2019

Calendar Calendar

How to capture Ajex Calls using Jmeter?

Go down

How to capture Ajex Calls using Jmeter? Empty How to capture Ajex Calls using Jmeter?

Post  puneet on Thu Oct 07, 2010 11:22 pm


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.



Posts : 21
Reward Points : 41
Join date : 2010-08-22

Back to top Go down

How to capture Ajex Calls using Jmeter? Empty Re: How to capture Ajex Calls using Jmeter?

Post  Admin on Thu Oct 07, 2010 11:23 pm


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.

Posts : 2
Reward Points : 1
Join date : 2010-08-21

Back to top Go down

How to capture Ajex Calls using Jmeter? Empty Re: How to capture Ajex Calls using Jmeter?

Post  Pogo on Thu Oct 07, 2010 11:24 pm


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 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. How to capture Ajex Calls using Jmeter? Smiley


Posts : 11
Reward Points : 23
Join date : 2010-09-13

Back to top Go down

How to capture Ajex Calls using Jmeter? Empty Re: How to capture Ajex Calls using Jmeter?

Post  Sponsored content

Sponsored content

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum