mardi 30 juillet 2019

locust.io sort tasksets in different files and launch them together

I am starting a project with locust.io and I would like to have the task sets sorted in different files. My intention is that any developer can add a task set and this is used when running locust.io

What is the best way to do it?

For example, I have this directory tree:

main.py:

from some1 import TestSteps1 from some2 import TestSteps2

class NewTestSets1(HttpLocust): task_set = TestSteps1

min_wait = 5000
max_wait = 90000

class NewTestSets2(HttpLocust): task_set = TestSteps2

min_wait = 5000
max_wait = 90000

I can run this locust file and run it. This works as I want but I like avoid need to repeat the same code for each task_set

Aucun commentaire:

Enregistrer un commentaire