SequentialTaskSet 有顺序的任务集
顾名思义,集合内的task是由上到下按顺序执行的,例如:
from locust import SequentialTaskSet, task, FastHttpUser
class MySTS(SequentialTaskSet):
@task
def step_01(self):
print(1)
@task
def step_02(self):
print(2)
class MyUser(FastHttpUser):
tasks = [MySTS]
MySTS类中的task执行的顺序就是step_01 -> step_02,以此循环
标签:10,task,FastHttpUser,step,顺序,SequentialTaskSet,MySTS,SequentialTaskset From: https://www.cnblogs.com/khaikami/p/17715493.html