Skip to content
IRC-CodingIRC-Coding
performance testingperformanceresponse timescalabilityk6JMeterGatling

Performance Testing: Speed, Stability & Scalability

Learn performance testing: objectives, types, metrics, tools and best practices for optimal software quality.

S

schutzgeist

7 min read
Performance Testing: Speed, Stability & Scalability

Performance Testing

Performance Testing is an umbrella term for tests that measure the speed, stability, and scalability of an application. It’s one of the most important non-functional testing disciplines and ensures that software remains performant and stable under realistic load.

In a Nutshell

  • Performance Testing measures speed, stability, and scalability.
  • Types: Load, Stress, Spike, Endurance, Volume, Scalability.
  • Metrics: Response time, Throughput, Error rate, Resource utilization.
  • Tools: k6, JMeter, Gatling, Locust.
  • Performance Testing is part of Performance Engineering.

What is Performance Testing and why does it matter?

Performance Testing examines how an application behaves under different loads. It answers questions like: How fast does the system respond? How many requests per second can it handle? How stable is it over time? What resources does it consume?

Common goals of Performance Testing include:

  • Ensuring user experience: Slow load times drive users away and reduce conversion rates.
  • Identifying bottlenecks: Databases, APIs, and algorithms can become chokepoints.
  • Validating SLAs: Agreed-upon response times and availability must be met.
  • Capacity planning: How many users can the system support? When does it need to scale?
  • Checking stability: Does the system run without resource leaks over extended periods?

Types of Performance Tests

Load Testing

Load Testing examines behavior under expected, realistic load. It shows whether the system performs well during normal operation. For example: 1,000 concurrent users with response times under 500ms.

Stress Testing

Stress Testing pushes beyond the expected load. It finds the system’s limits and reveals how it behaves when overloaded. For example: increase load until the system breaks down.

Spike Testing

Spike Testing creates sudden, extreme spikes in load. It simulates, for instance, a sudden rush of traffic when a sale begins. It demonstrates how well the system handles abrupt load changes.

Endurance Testing (Soak Testing)

Endurance Testing runs the application under steady load for an extended period. It’s designed to expose resource leaks—growing memory consumption, connection leaks, or accumulating log files.

Volume Testing

Volume Testing exercises the system with large data sets. It verifies that the database and application remain performant even with millions of records.

Scalability Testing

Scalability Testing examines how well the system scales when additional resources are added. It shows whether horizontal or vertical scaling improves performance.

Key Metrics

Response Time

Response time is the duration from request to complete response. It’s often reported as an average, median, or percentile. The 95th percentile is particularly valuable because it reveals how slow requests are for most users.

Throughput

Throughput indicates how many requests or transactions the system can process within a given time. It’s expressed in requests per second or transactions per minute.

Error Rate

Error rate is the proportion of requests that fail. A sudden spike points to a bottleneck.

Resource Utilization

Resource utilization encompasses CPU usage, memory, network bandwidth, and disk I/O. It helps identify the root cause of performance problems.

Concurrent Users

Concurrent Users are the number of active users sending requests simultaneously. They form the basis of load profiles.

Practical Example

The following example shows a typical Performance Testing plan for a web application. It combines different testing types and demonstrates how metrics and goals work together.

Goals:
- Response time under 200ms
- 95th percentile under 500ms
- Error rate under 0.1 percent
- Throughput 1,000 requests per second

Tests:
- Load Test under normal conditions
- Stress Test to breaking point
- Endurance Test over 24 hours

Why these tests?

  • Load Test: Verifies the system meets goals under expected load of 1,000 requests per second. This represents normal operation.
  • Stress Test: Finds the system’s limits. What happens at 2,000 or 5,000 requests per second? When does the error rate increase?
  • Endurance Test: Does the system remain stable after 24 hours under load? Are there memory or connection leaks?

Metrics are collected continuously during the test and compared against targets. Deviations are analyzed and used to drive optimizations.

Essential Tools

k6

k6 is a modern open-source Performance Testing tool developed by Grafana Labs. Tests are written in JavaScript and can be integrated into CI/CD pipelines.

Apache JMeter

JMeter is one of the most widely-used Performance Testing tools. It provides a graphical interface and supports many protocols including HTTP, SOAP, JDBC, and JMS.

Gatling

Gatling is a powerful tool for writing tests in Scala, Kotlin, or Java. It excels through the high performance of its load generator.

Locust

Locust is a Python-based tool with straightforward script authoring. It’s well-suited for teams already using Python.

Advantages and Disadvantages

AdvantagesDisadvantages
Better user experience through optimized response timesComplex test environment setup
Early detection of bottlenecksProduction-like environment required
SLA validation and capacity planningEffort needed for test data and scenarios
Objective performance measurementTools and infrastructure have associated costs
Reduced production outagesResult interpretation requires experience
Foundation for scaling decisionsTests must be run regularly

Best Practices

  • Define goals: Establish clear SLAs and metrics before testing begins.
  • Production-like environment: Test environments should mirror production.
  • Realistic test data: Use anonymized production data.
  • Monitoring: Capture server and application metrics throughout the test.
  • Run regularly: Repeat Performance Tests whenever relevant changes occur.
  • Integrate with CI/CD: Execute Performance Tests automatically during releases.
  • Analyze bottlenecks: Don’t just measure—investigate root causes.

Key exam topics

  • Performance Testing: The umbrella term for tests that measure speed, stability, and scalability.
  • Load Testing: Testing under expected, realistic load.
  • Stress Testing: Testing beyond expected load limits.
  • Spike Testing: Simulating sudden, extreme load spikes.
  • Endurance Testing: Extended runs to detect resource leaks.
  • Volume Testing: Testing with large data sets.
  • Scalability Testing: Testing how the system scales with additional resources.
  • Important Metrics: Response time, throughput, error rate, resource utilization, concurrent users.
  • Percentiles: The 95th percentile is more meaningful than the average.
  • Key Tools: k6, JMeter, Gatling, Locust.
  • SLA: Service Level Agreement with agreed performance targets.
  • Performance Engineering: A holistic approach to performance that extends beyond testing alone.
  • Latency: The delay between a request and the first response.

Primary sources

  1. https://www.gatling.io
  2. https://k6.io
  3. https://en.wikipedia.org/wiki/Performance_testing

Frequently asked questions

What is Performance Testing?

Performance Testing is the umbrella term for tests that measure the speed, stability, and scalability of an application. It ensures that software remains performant under realistic load.

What is Load Testing?

Load Testing checks how an application behaves under expected, realistic load. It shows whether the system performs well and remains stable during normal operation.

What is Stress Testing?

Stress Testing pushes beyond expected load and finds the limits of your system. It reveals how the system behaves under overload and at what point it breaks.

What is Spike Testing?

Spike Testing creates sudden, extreme load spikes. It simulates, for example, the rush to a store at the start of a sale and tests how the system handles it.

What is Endurance Testing?

Endurance Testing runs an application over a long period under constant load. It helps uncover resource leaks such as memory growth or connection leaks.

What performance metrics are important?

Key metrics include response time, throughput, error rate, resource utilization, and concurrent users. They help you assess performance objectively.

What is the 95th percentile?

The 95th percentile means that 95 percent of requests complete faster than this value. It’s more meaningful than the average because it filters out outliers.

What is scalability?

Scalability is the ability of a system to handle increasing load by adding more resources. There are two types: horizontal scaling (more servers) and vertical scaling (more powerful servers).

What is Volume Testing?

Volume Testing checks system behavior with large data sets. It verifies that the database and application remain performant even with millions of records.

What tools are available for Performance Testing?

Popular tools include k6, Apache JMeter, Gatling, and Locust. k6 and Locust are script-based, while JMeter offers a graphical interface.

What is a performance bottleneck?

A performance bottleneck is a component that limits the overall speed of an application, such as a slow database or an unoptimized algorithm.

What is latency?

Latency is the delay between a request and the first response. It’s a key indicator of user experience.

What is an SLA?

An SLA, or Service Level Agreement, is a contract with defined performance targets such as response time, availability, and throughput.

Why is Performance Monitoring important?

Performance Monitoring provides real performance data from production and helps you identify bottlenecks and regressions early.

What is Performance Engineering?

Performance Engineering is a holistic approach to performance that goes beyond testing alone, encompassing architecture, design, and continuous monitoring.

What is Scalability Testing?

Scalability Testing checks how well a system scales when additional resources are added. It shows whether horizontal or vertical scaling improves performance.

What is the difference between horizontal and vertical scaling?

Vertical scaling increases resources on a single server, such as CPU and RAM. Horizontal scaling adds more servers and distributes the load across them.

What is throughput?

Throughput is the number of requests or transactions a system can process in a given time. It’s measured in requests per second.

What is the difference between Performance Testing and Load Testing?

Performance Testing is the umbrella term. Load Testing is a specific type of performance testing that checks how a system behaves under expected load.

When should you run Performance Tests?

Run performance tests before releases, when making architectural changes, when facing performance issues, or before anticipated traffic spikes.

Continuing Your Software Testing Learning Path

The next article in our Software Testing Learning Path covers Security Testing — how security testing uncovers vulnerabilities.

Back to Blog
Share:

Related Posts