Skip to content

Until

This task calls the request method of a grizzly.users implementation, until condition matches the payload returned for the request.

Step implementations

Statistics

Executions of this task will be visible in locust request statistics with request type UNTL indicating how long time it took to finish the task. name will be suffixed with r=<retries>, w=<wait>, em=<expected_matches>.

The request task that is being repeated until condition is true will have it's own entry in the statistics as an ordinary Request or Clients task.

Arguments

  • request Request / Clients - request that is going to be repeated

  • condition str - condition expression that specifies how request should be repeated

Format

condition

<expression> [| [retries=<retries>][, wait=<wait>][, expected_matches=<expected_matches>]]
  • expression str - JSON- or Xpath expression

  • retries int (optional) - maximum number of times to repeat the request if condition is not met (default 3)

  • wait float (optional) - number of seconds to wait between retries (default 1.0)

  • expected_matches int (optional): number of matches that the expression should match (default 1)