Skip to content

Doc needed: how to split logic across VUs #750

@MattDodsonEnglish

Description

@MattDodsonEnglish

This is an extremely common user question: users want to have one script that runs different logic depending on the test conditions. For example, this is one of the most linked-to forum posts: https://community.k6.io/t/how-to-distribute-vus-across-different-scenarios-with-k6/49/3

There are also a few ways to split logic across VUs:

  • While loops using VU number
  • Split into stages
  • Using execution context variables to create a control flow (?)

A how-to guide could discuss situations when each way may be appropriate, then show example procedures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: OSS ContentImprovements or additions to community/oss documentationexamplesIssues about a missing example

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions