loadgen

load (register) a load scenario into the registry

Loads (registers) an API load scenario into the named registry under its "name" (the unique registry key). Loading does NOT run the scenario — it is staged in the LOADED state, ready to be triggered by PUT /mockserver/loadScenario/start. Loading the same name replaces the prior definition. A scenario is an ordered list of templated request steps driven through a sequence of stages (a load profile): a stage holds/ramps virtual users (VU, closed model), holds/ramps an arrival rate in iterations/second (RATE, open model), or pauses; an optional startDelayMillis defers the start after a trigger. Loading is allowed even when loadGenerationEnabled is false (no traffic is generated). Hard caps validated at load time: max 50 virtual users, max 5000 iterations/second, max 20 stages, max 50 steps, max 1h total duration.

put/mockserver/loadScenario

Request

  • Base URL: http://localhost:1080
  • URL: http://localhost:1080/mockserver/loadScenario
  • Auth: none declared

Request body

namestring required

scenario name — the unique registry key. Loading the same name replaces the prior definition.

templateType'VELOCITY' | 'MUSTACHE'

template engine used to render the per-iteration request path and body; only VELOCITY and MUSTACHE are supported for load steps (JAVASCRIPT is rejected)

maxRequestsinteger

optional hard cap on the total number of requests dispatched

startDelayMillisinteger

delay in milliseconds, applied after this scenario is triggered to start, before its iterations begin. A positive value means the scenario is PENDING until the delay elapses, then RUNNING; 0 (default) starts immediately on trigger. Lets several triggered scenarios begin at staggered offsets.

labelsobject

optional scenario-level custom annotation labels; exported as OpenTelemetry attributes on every load measurement and (for keys named in the loadGenerationMetricLabels allowlist) as extra Prometheus labels

abortOnFailboolean

when true, a FAIL verdict aborts the run early (terminal STOPPED state, abortedByThreshold set); default false (the run always finishes its stages and carries a final verdict)

abortGraceMillisinteger

suppress abortOnFail for the first N milliseconds of the run so noisy startup samples cannot trigger a premature abort (thresholds are still evaluated and a verdict still reported during the grace window — only the abort action is deferred)

stepSelection'SEQUENTIAL' | 'WEIGHTED'

how each iteration selects which steps to run: SEQUENTIAL (default) runs ALL steps in declared order (a multi-step user journey); WEIGHTED runs exactly ONE step per iteration chosen at random proportional to each step's weight (mixed-workload modelling, e.g. 70% browse / 20% search / 10% checkout). Cross-step captures are meaningful only under SEQUENTIAL (a WEIGHTED iteration runs a single step); feeder data and pacing apply to both.

Response

load scenario loaded (registered)

status'loaded'
namestring
state'LOADED' | 'PENDING' | 'RUNNING' | 'COMPLETED' | 'STOPPED'

Changes

No recorded changes to this operation across all 1 revision of this API.