Skip to content

Loop

This module contains step implementations for the Loop task.

Then loop start

Then loop "{values}" as variable "{variable}" with name "{name}"

[view_source]

Create an instance of the Loop tasks which executes all wrapped tasks with a value from the list values.

values must be a valid JSON list and supports Templating.

See Loop task documentation for more information.

Example:

Then loop "{{ loop_values }}" as variable "loop_value" with name "test-loop"
Then log message "loop_value={{ loop_value }}"
Then end loop

Then loop end

Then end loop

[view_source]

Close the Loop task created by step_task_loop_start.

This means that any following tasks specified will not be part of the loop.

See Loop task documentation for more information.

Example:

Then loop "{{ loop_values }}" as variable "loop_value" with name "test-loop"
Then log message "loop_value={{ loop_value }}"
Then end loop