locust简单使用

locust简单使用(待后续补充)

安装:pip install locust

编写测试脚本后如何执行呢?
在这里插入图片描述
cmd找到打开脚本所在的路径
方式1:如果脚本中写了host,则直接输入locust -f xxxx.py回车,然后在浏览器中输入localhost:8089,打开性能监控页面,输入用户数等压测
在这里插入图片描述

方式2:如果脚本中没有指定host,则通过命令运行脚本时,要执行被测域名(host),如locust -f xxxx.py --host=http://xxxxx格式,如果是https写就https://xxxxxx
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Dylan88/article/details/88998478