[Python] python locust - tasks per user

Discussão em 'Python' iniciado por Stack, Junho 4, 2025.

  1. Stack

    Stack Membro Participativo

    I have the following tasks in locustfile

    tasks ={task1:1, task2:1,task3:1, task4:1,task5:1, task6:1}


    And trying to run each one in parallel by running locust with 6 users (so there is one task run by one user)

    However each time I run the tests locust picks up at most 4 tasks and 2 are left untouched. Even though the Ratio tab displays the following:

    0.0% WebsiteUser
    16.7% task1
    100.0% task1Dn
    16.7% task2
    100.0% task2Dn
    16.7% task3
    100.0% task3Dn
    16.7% task4
    100.0% task4Dn
    16.7% task5
    100.0% task5Dn
    16.7% task6
    100.0% task6Dn


    I know that some tasks are not run since I am using name grouping and at least 2 name groups are always missing from statistics/reports.

    I have been searching about how to assign 1 tasks explicitly to one user and there seems to be no direct answer. Is it possible at all or have I missed something?

    Continue reading...

Compartilhe esta Página