Load Testing

Setting up JMeter to Perform Load Testing against a Nexaweb Applet

  1. Download JMeter binary from http://jmeter.apache.org/download_jmeter.cgi
  2. Extract the content of the zip file into a directory (e.g. C:\JMeter)
    1. The content of this directory should contains bin, lib, etc folders. For example, C:\JMeter\bin, C:\JMeter\lib.
  3. While in JMeter folder, create a directory name serializable in that directory, that is C:\JMeter\serializable
  4. Open C:\JMeter\bin\jmeter.properties in text editor.
  5. Search for proxy.binary.types, set it to the following values application/x-amf,application/x-java-serialized-object,application/octet-stream
    1. i.e. proxy.binary.types=application/x-amf,application/x-java-serialized-object,application/octet-stream
  6. 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.
    1. i.e. proxy.binary.directory=C:\\JMeter\\serializable
  7. Set proxy.binary.filesuffix to .binary
    1. i.e. proxy.binary.filesuffix=.binary
  8. PLEASE NOTE: Make sure to removed the pound signed "#" to un-comment those properties.
  9. Launch JMeter by running C:\JMeter\bin\jmeterw.cmd.
  10. Once JMeter is running, click File->Templates menu.
  11. Select Recording from the Select Templates dropdown.
  12. Click the Create button.
  13. Select HTTP Request Defaults from the Test Plan tree item.
  14. Enter the IP address of the server against which you will perform the load test (e.g. 192.168.35.168).
  15. Enter the port (e.g. 7011).
  16. Right click on Test Plan tree item and select Add->Listener->Summary Reports.
  17. Expand Workbench tree item and select HTTP(s) Test Script Recorder.
  18. Locate Port in Global Settings and set it to 8080.
  19. If you haven't install Mozilla Firefox, download and install it.
  20. Once that is done, open Mozilla Firefox.
  21. Click Tools->Options and then the Advanced tab.
  22. Click the Network tab.
  23. Click Settings in Connections section.
  24. Select Manual proxy cofigurations.
  25. Enter localhost and 8080 for port.
  26. Click OK twice to close.
  27. Open Java Control Panel.
  28. Click Network Settings and ensure that it is set to Use Browser Settings.
  29. Go back to JMeter, expand the Workbench and select HTTP(s) Test Script Recorder.
  30. 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)
  31. Click Start.
  32. Ensure that Mozilla Firefox is still running and browse to the test server (e.g. http://192.168.35.168:7011/start.jsp)
  33. Perform whatever you need, once you're done, exit the application and close the Mozilla Firefox browser.
  34. Go back to JMeter, select HTTP(s) Test Script Recorder from Workbench tree item and click Stop.
  35. Expand Test Plan->Thread Group and then select Recording Controller.
  36. Delete any tests you don't want (such as noise like Google).
  37. Save your test plan.
  38. 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.
  39. Select Test Plan->Thread Group.
  40. Enter Number of Threads (users), for example 5.
  41. Enter Loop Count (e.g. 10).
  42. Select Run->Start.  (Note: make sure you are on the Summary Report so you can see the tests running)
  43. 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.
  44. Once the test is finish, the green box will turn gray.
  45. Select View Results Tree from the Test Plan tree item.
  46. 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.