Performance testing might not be a quality assurance’s team superstar, it’s more like that brother who comes at family reunions and always makes the awkward jokes, but it is definitely a topic that becomes more important with each year that passes, especially in our current global environment where more people are spending more hours online than they used to. I mean, imagine a future where you are late to an important meeting in Mark’s metaverse just because something didn’t load in time. Wouldn’t that be a turn off?

One of the best known performance testing tools out there is Apache’s JMeter. An open-source java application with good (and free) community support that anyone can master as long as there is a will to do so.

The complexity of the tests that you can create with JMeter can range from very easy to complex, depending on the application that is being tested. For example, if you just want to send a certain number of requests to an http endpoint you can create a test in a matter of minutes, something that even a non-technical user can do by watching a 10 minutes YouTube how-to.

In real life however, and by real life I mean an actual Arvato Systems software development project, the complexity of the tests is higher. Security being of paramount importance we will have at least one java keystore added to the test just to be able to successfully send the request, some tests even encrypt the content of the requests themselves, which requires additional JMeter components to encrypt the request and decrypt the response received from the server.

SOAP/REST Web Services testing is a major part of performance testing by using the HTTP request method. Responses to these requests return status codes indicating success or failure as well as any applicable headers. It’s worth mentioning that JMeter can also catch functional defects in the application, not just performance related defects.

One of JMeter’s forte is the Plugin’s Manager capability which extends the tools original features (and not by a small margin), thus new components can be added to either capture additional relevant metrics such as server health (hardware usage under load) or to expand the types of testing that can be performed, for example the WebDriver Sampler component will enable the use of Selenium for UI testing.

JMeter testing can be leveraged by scripting, Java and Groovy being two languages that the JSR223 Sampler component supports. Testers usually find Groovy to be friendlier to use with JMeter.

Test data can be read from a CSV file through the CSV Data Set Config element and then passed to the request itself. Another approach would be to generate test data through the aforementioned JSR223 Sampler (scripting) by placing this element under a Counter element. The counter will have a start value that it will increment by a user-specified value thus enabling the script to generate unique test data with each iteration of the counter.

Other interesting elements such as the Xpath Extractor enables testers to write Xpath queries. An example of how this can be used is in the case of mixed tests where test one sends a request and receives a response while test two will extract a certain line from that response via the Xpath Extractor and use it in the request that it will send.

Since all tests are executed in non-GUI mode (headless), a JMeter HTML dashboard report can be generated at the end of each execution. The report is laid out in a non-technical fashion so that stakeholders from different business units can interpret the results.

The defects found by JMeter can have various underlying causes. Performance is most often affected by a change to the system, such as an OS or drivers upgrade or a misconfiguration after a new version is deployed. One of the most interesting (and costly) cause for bad performance that I encountered was a hardware failure to one of the servers.

Remember when I said that performance testing might not be a QA team’s superstar? That’s still true, but as Ian Molyneaux said, “If an end user perceives bad performance from your website, her next click will likely be on your-competition.com”.

References

https://jmeter.apache.org/

https://www.blazemeter.com/jmeter

Ian Molyneaux, "The Art of Application Performance Testing: From Strategy to Tools"