python開源的性能測試框架locust
環境python3.7
mac 10.12
安裝locust:
方法一:pip3 install locustio (因為該方式總是安裝失敗,所以用的是方法二)
方法二(推薦python3使用):
從GitHub項目地址:https://github.com/locustio/locust
下載解壓后,在終端 cd 到項目路徑,執行:python3 setup.py install
可看出安裝的版本是 locustio 0.14.5
如果安裝報錯Permission denied: '/usr/local/lib/python3.7/site-packages/easy-install.pth'
說明是權限的問題,需要加上sudo
sudo python3 setup.py install
驗證是否安裝成功:locust --help
實例
httprunner3.x--性能測試(locust)
注:如果未來可能運行Locust 分布在多個進程/機器,建議安裝pyzmq:pip3 install pyzmq
pyzmq的版本是19.0.0