r/devops • • Sep 08 '26

Vendor / market research How do you handle correlation/dynamic data when load testing?

I've been digging into load testing tools recently (k6, JMeter, Locust, Speedscale, Azure Load Testing) and noticed something consistent, recording a session and turning it into a script is the easy part. The painful part seems to be:

  • Correlation (session tokens, CSRF, IDs from one response feeding the next request)
  • Scripts breaking every time the UI or API changes
  • Flows that aren't linear. e.g a list page where the "next" request depends on which item a simulated user picks

Curious how people here actually deal with this day to day:

  • Do you write correlation logic by hand every time, or has anything automated it well for you?
  • How do you handle flows where the test needs to pick from a dynamic list (search results, a user's own records, etc.) instead of hitting a fixed ID?
  • How often do your load test scripts break when the app changes, and how much time does fixing them eat up?

Do you guys have a solution for this, or know of a tool that actually handles it well?

7 Upvotes

6 comments sorted by

2

u/aragossa Sep 08 '26

depends on the tool but the pattern's the same everywhere: pull the dynamic value out of the previous response with a regex or json extractor and feed it into the next request. most tools have that built in, wiring it up per endpoint is still manual though. for the dynamic list case recorder-based tools are just bad at it, you end up writing that part as actual code anyway. k6 is fine for this since the script is plain js, http call then whatever logic you want on the response. the breaking-on-every-change part is mostly a recorded-traffic problem. if the script is a replay of whatever the frontend happened to send, every frontend change is a script change. written by hand against the api it breaks way less

1

u/being_insentient 8d ago

What's the most painful part about wiring up that data? I am trying to understand the pain points and how I can make the process easier. Do you think a better interface will help?

2

u/kahrens_atl Sep 08 '26

Disclosure: I'm one of the co-founders of Speedscale

This is the rough algorithm we use: capture traffic (both requests and responses), comb the traffic for potential correlation ids, run a second pass through the ids to see if they are used in later calls, surface recommendations to the user to create a blueprint. The tools don't know a id that changes each run from a static id, so getting a new recording when you run the test can help. We ship a version of this in our free proxymock desktop CLI.

The other option is use an AI coding agent, I'd configure it in a loop to: record, analyze, run test. You keep doing that with a goal of high success rate on the calls. You can output in any format but AI tools prefer open languages like JavaScript (k6), Python (locust), Markdown (proxymock).

Good luck!

1

u/being_insentient 8d ago

Oh. What is the accuracy with AI, and do you think a better interface can solve this?

1

u/kahrens_atl 8d ago

You can always spend more tokens and time to get 100% accuracy, it's all about the tradeoff you're trying to make. Instead of trying to one-shot the perfect test, get a candidate out there and give your AI 5 loops to improve it. Track the success rate on the calls each loop so you know when it's good enough to stop.