Wednesday, April 28, 2010

AJAX LOAD TEST USING JMETER

Here are some 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”.

=================

1. set

CookieManager.save.cookies=true

in jmeter.properties file.

2. get the session ID as COOKIE_JSESSIONID

3. define variable for script session id as ${__javaScript('B4B26203309DA29AEB9542780F307009'+Math.floor(Math.random() * 1000))}

4. use these session id and script session id in the dwr request.

No comments: