httprunner3.x--性能测试(locust)

原理: 使用的是locust

但是locusts -f 和 locust -f的区别是前者可以运行.yaml或.json文件,并且转换为python文件,再按照locust的方式运行;

1.安装locust

locust安装(性能测试)

验证是否安装成功:locust --help

2.在项目路径下执行

locusts -f xxxx/xxxxxx.yaml     或者是   locusts -f xxxx/xxxxxx.json

3.访问   http://localhost:8089/,设置参数,点击start swarming

该方法目前只验证一个参数对应一个值的有用,参数化的验证不通过。

 

 界面如下:

 

 

点击start swarming会跳到结果页面

 

 

 

如果要重新测试,则点击右上角的new test

 

posted @ 2020-07-26 14:59  yimu-yimu  阅读(1080)  评论(0编辑  收藏  举报