摘要: 1、单进程运行 如果采用no_web形式,则需使用--no-web参数,并会用到如下几个参数。 -c, --clients:指定并发用户数; -n, --num-request:指定总执行测试; -r, --hatch-rate:指定并发加压速率,默认值位1。 locust -H http://de 阅读全文
posted @ 2020-09-22 19:24 codeobj 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 1、关联:通常在业务流程中有很多一系列的接口调用,从后面的接口依赖前边接口的结果数据 from lxml import etree from locust import TaskSet, task, HttpUser class UserBehavior(TaskSet): @staticmetho 阅读全文
posted @ 2020-09-22 19:23 codeobj 阅读(554) 评论(0) 推荐(0) 编辑
摘要: 1、循环取可以重复使用的数据 csvData.csv 1,1 2,2 3,3 4,4 5,5 6,6 7,7 8,8 9,9 locust2.py from locust import TaskSet, task, HttpUser, HttpLocust, between, tag, consta 阅读全文
posted @ 2020-09-22 19:16 codeobj 阅读(958) 评论(0) 推荐(0) 编辑