Using JMeter and LoadNinja to Understand Infrastructure Performance & End User Experience

Optimizing end-user experience should always involve data-driven decisions. Sometimes identifying the most relevant data can be tough though. Leveraging your load testing data can be a great place to start, especially when you're creating tests with the end user experience in mind. 

What's JMeter

Apache JMeter is an open source, 100% Java software designed to load test functional behavior and measure performance. Today JMeter can be used to script tests for web apps and APIs alike. It has a variety of different functionalities, but JMeter does take some trial and error to master successful load tests.  

What's LoadNinja

LoadNinja is a SaaS tool for load testing web applications. You can record and replay a load test scenario without any coding, and the recording is done in the LoadNinja platform itself (see: Instaplay Technology or 'browser-in-browser' feature page). It records and runs every test in a real browser as opposed to an emulated browser, for the most accurate test results. 

Analyzing End User Experience and Infrastructure Performance Using LoadNinja and JMeter

JMeter and LoadNinja are both great for load testing web applications, and when used simultaneously, can illuminate some helpful insights into infrastructure and end user experience that yout test teams can leverage to optimize performance. To get started using both of these tools it's important to map out your scenario & answer these questions first:

  1. What are you trying to test? (i.e. web app)
  2. What are the user journeys or interactions you're trying to test?
  3. How many virtual users (or load, or traffic) are you planning on driving to your web app?
  4. What is a standard expected performance benchmark to compare against?

Get End User Experience Metrics with LoadNinja

Getting up and running in LoadNinja is super simple. Create a trial account or log in to your account. Then click record in the navigation, and have the URL of the web app or website you're looking to test handy.  Then walk through your test scenario as a real user would interact with your web app or website, and replay your test. Save it, and configure your test run, and you're good to start testing. 


Once you've started your tests you can elect to debug in real time, check out what step each virtual user is completing, or wait for your test to finish. 


Now that your tests are completed, you have instant access to the reports. Looking at the response time breakdown, the navigation timings, and the error logs you're ready to compare your end user experience with your infrastructure performance.


Get Infrastructure Performance Metrics from JMeter

Setting up a test in JMeter takes some time, so following the steps we mentioned above first is key. It's worth noting that sometimes JMeter test results can be skewed based on a handful of different factors. This includes the system resources like CPU, RAM, and network betweek JMeter & the web server that are leveraged to run the load test. If you're able to distribute the load generation to multiple JMeter servers the load you'll have a better chance of generating load without skewing the results. 

JMeter is desktop based, so first things first, we'll start by downloading JMeter to your desktop. Easiest way to install JMeter is to use a package manager or download and unarchive the JMeter binaries and install Java.

To build a test:

  1. Create a Test Plan - made up of test components that dictate how the test will run
  2. Add Thread Groups -
    1. number of threads means how many users JMeter will spin up,
    2. ramp-up time means how long JMeter will take to restart the threads
    3. loop count means the number of times you want to run the test
  3. Add HTTP Request Defaults
    1. In JMeter you have to configure the HTTP Request Defaults to set default values for HTTP Requests. This is where you'd add your server name or IP address of the web server you want to test - this will be the default server.
  4. Add HTTP Cookie Manager 
  5. Add HTTP Request Sampler
    1. Adding an HTTP Request Sampler to a thread group is critical in mapping out the path & item that you want each user to request.  This process dictates a page request that a user will send. 
  6. Add the Ability to View Results in Listener
    1.  Adding a listener allows you to view the results of a load test. In this case, we're selecting a Table Reader because it's easier to use. 
  7. Run the Test 
  8. View the Results
    1. the results listed will be in the form of requests and respones. Each request will list whether it's a success or not.

However most of the interesting information you can get back from JMeter that you can use in conjunction with LoadNinja includes metrics from your web application server. For example, if you logged into your VPS to look at your resource usage during the load test you'll be able to correlate the web server data like resource usage to each step in the load test broken down by LoadNinja's browser based data. 

Comparing the CPU user usage and the system usage to the Navigation Timings and Response Times in LoadNinja makes it easy and fast to pinpoint the root-cause of performance problems. This is not always required, but if your team uses both tools in parallel it can be useful to leverage the best of both tools. 

To get started with load testing, check out LoadNinja.

Your team can:

  1. Record and replay tests
  2. Test in real browsers at scale
  3. Debug in real time
  4. Get browser-based metrics (Navigations timings, response times, and more)

The trial's free for 14 days!

Start Load Testing with LoadNinja