Query Parameters
You can write query parameters straight into a request URL, or add them one by one under Query Params (click Headers, body, cookies… under the request URL to see it):
https://www.example.com?query1=value1&query2=value2https://api.example.com/v2/resources/1?query1=value1&query2=value2The URL and the Query Params list always show the same parameters. When you type a URL that contains a query string, LoadFocus copies the parameters into the Query Params list, replacing the rows that were there. When you edit a row, it rewrites the URL to match. A fragment such as #hash1 is not kept: it is never sent to a server.
Note: You cannot make a Query Param global (for example an API key) and use it in all requests. Add the parameter to every request that needs it.
To percent-encode a value before you paste it in, use the free URL encode and decode tool.
Why Query Parameters Matter in a Load Test
Section titled “Why Query Parameters Matter in a Load Test”Query parameters are part of the request URL, so the server, and anything in front of it such as a CDN, reverse proxy or WAF, treats them as part of what it is asked for. That matters in two ways:
- Routing and filtering: many APIs use query parameters to select a resource, page or filter (
?page=2,?status=active,?locale=en). If your test only ever sends one combination, you test one code path. A search endpoint that is fast for?q=shoescan behave very differently for?q=(empty) or for a query with many filters at once. - Caching: a CDN or reverse proxy usually uses the full URL, query string included, as the cache key. A parameter that changes on every request (a cache-busting timestamp, a random id) can turn a cacheable endpoint into one that misses the cache for every virtual user. The backend then looks much slower and busier than real traffic would make it, and the cause is the query string itself.
Common Pitfalls
Section titled “Common Pitfalls”- Special characters need encoding. Spaces, ampersands and other reserved characters inside a value must be percent-encoded (a space as
%20, an&as%26). Enter the encoded value in a Query Params row: LoadFocus appends it to the URL as you typed it and does not encode it for you. - Repeated keys are all sent. If you add the same key twice (for example two
query1rows), both are sent. Some servers keep only one value per key, so test the exact request shape you expect in production. - One value for every user. A value you type in a row is sent as is by every virtual user on every iteration. If the endpoint expects a different value per call (a pagination cursor, a unique order id, a one-time token), a fixed value only exercises that one case, not the range of values real traffic sends.
For the full request setup, see How to Run a New Load Test. To check that the URL itself is valid, see What is a valid URL for a load test.
