标签:post time com 脚本 wait task between tween pass
1 脚本
from locust import HttpLocust, TaskSet, task, between # 新建任务集 class TestLogin(TaskSet): @task def req_index(self): data = { "username": "admin", "password": "admin123456", } login_response = self.client.post(‘/XXX‘, data=data) # 访问设置 class RunTest(HttpLocust): task_set = TestLogin wait_time = between(1, 2) host = "https://www.baidu.com"
2 命令
locust -f login.py
标签:post time com 脚本 wait task between tween pass
原文地址:https://www.cnblogs.com/lizitestdev/p/14329373.html