Skip to content

Shapes

This module contains step implementations that describes how the load for all scenarios in a feature will look like.

Given user count

Given "{value}" {grammar:UserGramaticalNumber}

[view_source]

Set number of users that will generate load.

Example:

Given "5" users
Given "1" user
Given "{{ user_count }}"

Arguments:

  • user_count int - Number of users locust should create
  • grammar UserGramaticalNumber - one of user, users

Given spawn rate

Given spawn rate is "{value}" {grammar:UserGramaticalNumber} per second

[view_source]

Set rate in which locust shall swarm new user instances.

Example:

And spawn rate is "5" users per second
And spawn rate is "1" user per second
And spawn rate is "0.1" users per second

Arguments:

  • spawn_rate float - number of users per second
  • grammar UserGramaticalNumber - one of user, users