Locust性能测试3 no-web运行

Locust也支持no-web的方式运行,直接通过控制台设置并发用户数、每秒启动用户数、持续压测时间。

locust  -f   脚本路径  -c  用户数 -r  每秒启动用户数 --run-time 持续压测时间 (或者-t)--csv=运行结果保存目录

如:
locust -f  D:PycharmProjectsUItestlocust_scriptslocust_test2.py --no-web -c 1 -r 1 -t 10s --csv=d:

控制台可以查看运行结果 

运行结束,D盘下的2个文件:

原文地址:https://www.cnblogs.com/dinghanhua/p/9788298.html