GimmeJob
Sign in
Performance testing · Chapter 04 / 09

Performance Testing

Environment, scripts and test data

A performance test is only as trustworthy as the conditions around it. Most false conclusions come from a workload, environment, data set or load generator that does not represent the intended question.

Environment comparability

A production-sized clone is not always possible. What matters is that the differences are known and their impact can be reasoned about. Record at least:

  • compute limits and autoscaling rules;
  • database tier, size and configuration;
  • network path and rate limits;
  • caches/CDNs/proxies;
  • dependency endpoints or stubs;
  • logging/debug settings that alter cost;
  • data volume and distribution;
  • background jobs;
  • software version and configuration.

If staging has one application instance and production has ten, a capacity number from staging cannot simply be multiplied by ten without proving the scaling relationship.

Validate the script functionally first

Before adding load, run the flow with one or a few users and inspect responses. Confirm:

  • authentication succeeds;
  • dynamic values are propagated;
  • the expected business state actually changes;
  • assertions detect invalid output;
  • cleanup is safe;
  • retries do not silently multiply business actions.

A script that sends invalid requests very quickly is not a performance test of the intended journey.

Parameterization

Parameterization varies input controlled by the test: usernames, product IDs, search terms, account numbers or payloads. It prevents every virtual user from unrealistically using the same data and helps model the real data distribution.

In JMeter, CSV Data Set Config is a common mechanism. Apache also recommends preparing large random/unique datasets in files rather than generating expensive random data during the run.

Correlation

Correlation handles values produced dynamically by the system and needed later in the same flow. Examples:

  • session/access token returned by login;
  • CSRF token;
  • created order ID;
  • cursor/page token;
  • server-generated correlation identifier.

In JMeter, post-processors such as JSON or regular-expression extractors can capture a response value and expose it as a variable for later requests.

Parameterization and correlation solve different problems: test-controlled varying input versus system-produced dynamic state.

Test-data collisions

At load, data races appear that a one-user validation never sees. Examples:

  • every VU updates the same shopping cart;
  • all users reserve one inventory item;
  • duplicate email/username constraints reject setup;
  • cleanup deletes data another VU is still using;
  • distributed workers reuse the same CSV rows.

Design ownership. Decide which data is read-only, unique per user, unique per iteration, shared intentionally, or pre-created.

Cache and warm-up state

Cold and warm states answer different questions. Document whether the test starts with:

  • cold application/runtime;
  • empty or warm caches;
  • an already-populated connection pool;
  • preloaded data/pages;
  • JIT/runtime compilation completed.

A short warm-up phase can stop startup transients from contaminating steady-state statistics. Do not hide a cold-start requirement by warming the service when real users are expected to hit it cold.

Load generator validity

The injector is part of the measurement system. Monitor its CPU, memory and network. Expensive result listeners, debug logging, response-body storage, runtime data generation or insufficient OS limits can cap the traffic before the target reaches its own limit.

Apache JMeter explicitly recommends CLI execution, few listeners, only necessary saved fields and correctly sized injectors for real load tests.

Pre-run validity checklist

Before trusting a run, confirm: the build and environment are identified; scripts pass at small load; test data is sufficient and non-colliding; dynamic correlation works; the intended cache/warm-up state is documented; monitoring is active; clocks/timestamps can be correlated; load generators have measured headroom; and the produced traffic matches the workload model.

Source registry

Chapter references verified
ISTQB Certified Tester Foundation Level Specialist Syllabus — Performance Testing

Performance-testing terminology, test types, metrics, load generation, operational profiles, planning, execution and analysis

ISTQB · Official syllabus
Source ↗
Apache JMeter User's Manual — Best Practices

Load-generator sizing, coordinated omission, test data, CLI mode and resource-efficient execution

Apache JMeter · Official documentation
Source ↗
Apache JMeter HTTP(S) Test Script Recorder

Script validation, parameterization, correlation and command-line execution

Apache JMeter · Official documentation
Source ↗