/
Load Testing
Load Testing
Setting up JMeter to Perform Load Testing against a Nexaweb Applet
- Download JMeter binary from http://jmeter.apache.org/download_jmeter.cgi
- Extract the content of the zip file into a directory (e.g. C:\JMeter)
- The content of this directory should contains bin, lib, etc folders. For example, C:\JMeter\bin, C:\JMeter\lib.
- While in JMeter folder, create a directory name serializable in that directory, that is C:\JMeter\serializable
- Open C:\JMeter\bin\jmeter.properties in text editor.
- Search for proxy.binary.types, set it to the following values application/x-amf,application/x-java-serialized-object,application/octet-stream
- i.e. proxy.binary.types=application/x-amf,application/x-java-serialized-object,application/octet-stream
- Set proxy.binary.directory to C:\\JMeter\\serializable (note that the double slashes separating the directory name components are required, if you use only one, setting it to something like C:\JMeter\serizalizable, JMeter will be unable to locate the directory). JMeter will intercept any post requests of the type listed above and will write that data into the serializable directory for playback.
- i.e. proxy.binary.directory=C:\\JMeter\\serializable
- Set proxy.binary.filesuffix to .binary
- i.e. proxy.binary.filesuffix=.binary
- PLEASE NOTE: Make sure to removed the pound signed "#" to un-comment those properties.
- Launch JMeter by running C:\JMeter\bin\jmeterw.cmd.
- Once JMeter is running, click File->Templates menu.
- Select Recording from the Select Templates dropdown.
- Click the Create button.
- Select HTTP Request Defaults from the Test Plan tree item.
- Enter the IP address of the server against which you will perform the load test (e.g. 192.168.35.168).
- Enter the port (e.g. 7011).
- Right click on Test Plan tree item and select Add->Listener->Summary Reports.
- Expand Workbench tree item and select HTTP(s) Test Script Recorder.
- Locate Port in Global Settings and set it to 8080.
- If you haven't install Mozilla Firefox, download and install it.
- Once that is done, open Mozilla Firefox.
- Click Tools->Options and then the Advanced tab.
- Click the Network tab.
- Click Settings in Connections section.
- Select Manual proxy cofigurations.
- Enter localhost and 8080 for port.
- Click OK twice to close.
- Open Java Control Panel.
- Click Network Settings and ensure that it is set to Use Browser Settings.
- Go back to JMeter, expand the Workbench and select HTTP(s) Test Script Recorder.
- On URL Patterns to Exclude, update it to the following .*\.(bmp|css|js|gif|ico|jpe?g|png|swf|woff|class|jar|gz|xss|xml)
- Click Start.
- Ensure that Mozilla Firefox is still running and browse to the test server (e.g. http://192.168.35.168:7011/start.jsp)
- Perform whatever you need, once you're done, exit the application and close the Mozilla Firefox browser.
- Go back to JMeter, select HTTP(s) Test Script Recorder from Workbench tree item and click Stop.
- Expand Test Plan->Thread Group and then select Recording Controller.
- Delete any tests you don't want (such as noise like Google).
- Save your test plan.
- Navigate to the C:\JMeter\serializable directory, there should be a bunch of .binary files in this directory. If not, ensure that you un-comment the properties in step 5 to 7.
- Select Test Plan->Thread Group.
- Enter Number of Threads (users), for example 5.
- Enter Loop Count (e.g. 10).
- Select Run->Start. (Note: make sure you are on the Summary Report so you can see the tests running)
- JMeter will execute the load test (you'll see that there is a green box next to the threads/users count in the top right corner of JMeter.
- Once the test is finish, the green box will turn gray.
- Select View Results Tree from the Test Plan tree item.
- Locate one of the items that has sendHttpRequest in it. If there is a POST data, there should be response data. See Request.png and Response.png for examples.