Class LoadStep


public class LoadStep extends ObjectWithJsonToString
One ordered step of a LoadScenario: the request to fire and the optional think-time to wait before firing the next step in the same iteration.

The request reuses HttpRequest; per-iteration template placeholders (e.g. $iteration.index, $uuid) live in its fields (path, body, headers, query) and are rendered fresh each iteration by the orchestrator using the scenario's templateType.

thinkTime is inter-step pacing only — the orchestrator schedules the next step after thinkTime.sampleValueMillis() on its scheduler thread and never calls Delay.applyDelay() (which would block a worker thread). A null thinkTime means no pause.

Cross-step correlation is declarative: getCaptures() extracts values from this step's response into the iteration's mutable captured-variable map, which a subsequent step references from its templated fields via $iteration.captured.<name>. See LoadCapture for scope.

  • Constructor Details

    • LoadStep

      public LoadStep()
  • Method Details

    • loadStep

      public static LoadStep loadStep()
    • loadStep

      public static LoadStep loadStep(HttpRequest request)
    • getRequest

      public HttpRequest getRequest()
    • withRequest

      public LoadStep withRequest(HttpRequest request)
    • getThinkTime

      public Delay getThinkTime()
    • withThinkTime

      public LoadStep withThinkTime(Delay thinkTime)
    • getName

      public String getName()
      Optional human label for this step (may be null). See name.
    • withName

      public LoadStep withName(String name)
    • getLabels

      public Map<String,String> getLabels()
      Step-level custom labels (may be null/empty). See labels.
    • withLabels

      public LoadStep withLabels(Map<String,String> labels)
    • withLabel

      public LoadStep withLabel(String name, String value)
    • getCaptures

      public List<LoadCapture> getCaptures()
      Cross-step capture rules for this step (may be null/empty). See captures.
    • withCaptures

      public LoadStep withCaptures(List<LoadCapture> captures)
    • withCapture

      public LoadStep withCapture(LoadCapture capture)
    • getWeight

      public Double getWeight()
      Relative selection weight for WEIGHTED step selection (may be null = treated as 1.0). See weight.
    • withWeight

      public LoadStep withWeight(Double weight)