Skip to content

Transformer

This task transforms a variable value to a document of correct type, so an expression can be used to extract values from the document to be used in another variable.

This is especially useful when used in combination with other variables variables containing a lot of information, where many parts of a message can be useful to re-use.

Instances of this task is created with the step expression:

Step implementations

Statistics

Executions of this task will not be visible in locust request statistics, unless something goes wrong. It will then have the request type TRNSF.

Arguments

  • contents str - text to parse, supports Templating or a static string

  • content_type TransformerContentType - MIME type of contents, which transformer to use

  • expression str - JSON- or XPath expression to extract specific values in contents

  • variable str - name of variable to save value to, must have been intialized