Personal notes on software development.
For Java technologies check my dedicated site

Pages

Official site/manual: Apache JMeter site
Installation: Note: if you use NetBeans you can install JMeter by going to Tools -> Plugins -> Searcg for "JMeter" plug in.
Tutorial: "The NetBeans E-commerce Tutorial - Testing and Profiling" demonstrates JMeter usage.

Keep in mind that when running JMeter in the same machine (Client and Server), your local server is competing with JMeter for the computer's resources. Eventually, you'll want to test your production server remotely to get more accurate results. See the following resources for more information:



Configuration Variables

  • ramp-up period: tells JMeter how long to take to "ramp-up" to the full number of threads chosen. If 10 threads are used, and the ramp-up period is 100 seconds, then JMeter will take 100 seconds to get all 10 threads up and running. Each thread will start 10 (100/10) seconds after the previous thread was begun.
    Ramp-up needs to be long enough to avoid too large a work-load at the start of a test, and short enough that the last threads start running before the first ones finish (unless one wants that to happen). 
  • interleave:  " is used in the user delay Test Action that we created, and represents the duration of a pause in milliseconds. Therefore, the test will pause for 5 seconds between each user-initiated request."[1]

Results/Graphs

In JMeter, you require a listener to record and display the results of your test plan. Most of the listeners perform several roles in addition to "listening" to the test results. They also provide means to view, save, and read saved test results. There are multiple listener types, for example:
  • The Summary Report displays a table, with each row corresponding to each differently named request in your test;
  • The View Results Tree shows a tree of all sample responses, allowing you to view response details for any sample. 
  • The Graph Results listener displays a simple graph that plots all sample times. The graph includes:
    • The throughput number: represents the actual number of requests/minute the server handled. This calculation includes any delays you added to your test and JMeter's own internal processing time
NOTE: This listeners consume system resources and therefore JMeter can run out of memory and crash. So, when stress testing, keep the number of listeners to a minimum (remove the unnecessary ones from the test).

    Troubleshooting:

    • "When testing for 500 users, JMeter became unresponsive and it was necessary to shut it down from the task manager. It is likely that JMeter was running out of memory to record and display results for the Graph Results and View Results Tree listeners. These two listeners were removed from the test plan, and results for 500 - 1000 users were then recorded using the Summary Report listener only."[1]

    References

    [1] - The NetBeans E-commerce Tutorial - Testing and Profiling

    No comments:

    Post a Comment