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
Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Who is online?
In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests

None

[ View the whole list ]


Most users ever online was 35 on Tue Sep 23, 2014 10:22 pm
November 2017
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
27282930   

Calendar Calendar


How to capture Ajex Calls using Jmeter?

View previous topic View next topic Go down

How to capture Ajex Calls using Jmeter?

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

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

puneet

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

View user profile

Back to top Go down

Re: How to capture Ajex Calls using Jmeter?

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

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.
avatar
Admin
Admin

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

View user profile http://forums.qapages.org

Back to top Go down

Re: How to capture Ajex Calls using Jmeter?

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

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.

Pogo

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

View user profile

Back to top Go down

Re: How to capture Ajex Calls using Jmeter?

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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