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 analyze 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 “nonfunctional 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 between “functional” and “nonfunctional 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 analyze 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, and maintainability, we may begin to realize that performance for some contexts is a high-level 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 key performance indicators (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 Analyzing results

10.4 Setting performance testing expectations

Summary