
Performance test with jmeter
Content of this page was contributed by Srinivas Kandula
I have created quick 10 step notes to setup the basic environment (any how for advanced information you can always look at JMeter or Liferay documentation).
1. Create a thread group : Test Plan > Add > Threads (Users) > Thread Group
Modifications Required: Nothing to modify here, unless you want to give any name to Thread Group, just change the Name field
2. For the step 1 created thread group add Recorder (when you run proxy recorder the request urls would be stored here): Test Plan > Thread Group (Created above) > Add > Logic Controller > Recording Controller
Modifications Required:Again nothing to modify, you can leave as it is
3. For the step 1 created thread group add Http requests defaulter (i.e. which web server to pool) : Test Plan > Thread Group (Created above) > Add > Config Element > Http Request Defaults
Modifications Required : This is the first place where you type some thing. In the Web Server (second table). Enter the server name or IP (ex;- localhost) and port number (ex:-8080). Thats it, unless you need an proxy configuration to connect to that webserver your are testing.
4. For the step 1 create thread group add Http cookie manager (i.e., this cookie manager would take care of your session): : Test Plan > Thread Group (Created above) > Add > Config Element > Http Cookie Manager
Modifications Required: Again nothing
5. You can extend the JMeter to perform some recording for you so that you can play back. this is done by adding proxy server to WorkBench. : Workbench > Add > Non-Test Elements > Http Proxy Server
Modifications Required: Yes, in second table enter some port number like 9080. Remeber this proxy server is the one which stays between your browser and actually web server. So any request from your browser would pass through this to web server and thats how it records. So choose a port number which doesn't conflict any existing or used ports.
6. To view some requests passed through the proxy when you can add Results Tree for proxy server added above. : Workbench > HTTP Proxy Server > Add > Listener > View Results Tree
Modifications Required: Nothing
7. Go to your browser where you want to browse and that has to be recorded. Add the proxy port number in that.
8. Get back to the Jmeter window and start the proxy listener. Workbench > Http Proxy Server > Start (Bottom of the right window)
9. Once recording is done, before you start load testing add a summary report table to your test plan to see the load test results. Test Plan > Thread Group > Add > Listener > Summary Report.
10. Now you can play record by selecting the Toolbar (on top) > Run > Start option.
Refer to attached Jmeter image to see how the above steps creation looks like.