Test data without the fixtures
Hitting a create endpoint twice with the same payload usually fails the second time on a duplicate-key error. The usual workarounds are hand-editing values between sends or writing a pre-request script to randomise them.
Add a $-prefixed variable
Dynamic variables are built in and need no setup. Reference one with the $ prefix:
{{$randomEmail}}
Every time the request runs, that resolves to a new plausible email. They work anywhere in a request — the URL, headers, query params and body.
A typical create-user body becomes reusable in one edit:
{
"id": "{{$randomUUID}}",
"firstName": "{{$randomFirstName}}",
"lastName": "{{$randomLastName}}",
"email": "{{$randomEmail}}",
"createdAt": "{{$isoTimestamp}}"
}
Call them as functions in scripts
Inside a pre-request or post-response script the template syntax does not apply — call the variable as a function instead:
const id = rq.$randomUUID();
Know which value wins
If you define an environment variable with the same name as a dynamic one, your value takes precedence — the resolution order is runtime → environment → sub-collection → collection → global, then dynamic. The documented best practice is to never use the $ prefix for your own variables, which keeps the two namespaces from colliding at all.






