public class WeighingTaskSet extends AbstractTaskSet
tasks| 构造器和说明 |
|---|
WeighingTaskSet(String name,
int weight) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addTask(AbstractTask task)
Add a task to the task set.
|
void |
execute()
Test scenarios should be implemented in this method, like sending http request.
|
String |
getName()
Get the name of task.
|
AbstractTask |
getTask(int roll) |
int |
getWeight()
When locust runs multiple tasks, their weights are used to allocate threads.
|
runpublic WeighingTaskSet(String name, int weight)
public void addTask(AbstractTask task)
AbstractTaskSetaddTask 在类中 AbstractTaskSettask - test task that runs in a task setpublic AbstractTask getTask(int roll)
public int getWeight()
AbstractTaskgetWeight 在类中 AbstractTaskpublic String getName()
AbstractTaskgetName 在类中 AbstractTaskpublic void execute()
throws Exception
AbstractTaskexecute 在类中 AbstractTaskException - test scenarios may throw exception.Copyright © 2020. All rights reserved.