chapter ten

10 Performance testing

 

This chapter covers

  • How to manage expectations with performance testing
  • How to plan and implement a performance test
  • How to execute a performance test and analyse the results

Performance testing is an excellent example of why we should be motivated by quality characteristics in our testing strategy. Typically, performance is thought of as a ‘non-functional requirement’, but as my colleague, Richard Bradshaw once said, ‘If my application’s features are all working, but it takes over a minute for it to respond to me when I’m using it, then it doesn’t feel very functional to me’.

The problem with the distinction’s of ‘functional’ and ‘non-functional requirements’ is that it can sometimes imply a hierarchy, or priority, over what testing to focus on first. This is why some projects end up in situations where performance testing is rushed at the end, with limited time and resources to plan, implement, execute and analyse how our application performs in a specific context. However, if we consider performance as an equal quality characteristic to other more ‘traditional’ characteristics such as completeness, stability, maintainability, etc., we may begin to realise that performance for some contexts is a priority quality characteristic, and it should take priority in a testing strategy.

10.1  Planning a performance test

10.1.1  Types of performance tests

10.1.2  Types of measurements for performance tests

10.1.3  Establishing performance testing goals and KPIs

10.1.4  Creating user flows

10.2  Implementing a performance test

10.2.1  Setting our performance testing tool

10.2.2  Building our Performance test script

10.3  Executing and measuring a performance test

10.3.1  Preparing and executing our performance test

10.3.2  Analysing results

10.4  Setting performance testing expectations

10.5  Summary