Doc文档:https://docs.locust.io/en/stable/index.html
Locust官网介绍
An open source load testing tool.
一个开源负载测试工具
Define user behaviour with Python code,and swarm your system with millions of simultaneous users.
使用Python代码定义用户行为,并使用数百万个并发用户群集您的系统
三大特点:
-
Define user behaviour in code
在代码中定义用户行为
No need for clunky UIs or bloated XML. Just plain code.
不需要笨重的UI或臃肿的XML。只是简单的代码
-
Distributed & scalable
分布式和可扩展
Locust supports running load tests distributed over multiple machines, and can therefore be used to simulate millions of simultaneous users
Locust支持分布在多台机器上运行负载测试,因此可用于数百万并发用户
-
Proven & battle tested
经过验证或战斗测试
Locust has been used to simulate millions of simultaneous users. Battlelog, the web app for the Battlefield games, is load tested using Locust, so one can really say Locust is Battletested ;).
蝗虫已被用于模拟数百万并发用户。Battlelog游戏的网络应用程序Battlelog正在使用Locust进行负载测试,所以人们可以说Locust是Battletested;
Example code
示例代码
A fundamental feature of Locust is that you describe all your test in Python code. No need for clunky UIs or bloated XML, just plain code.
Locust的一个基本特性是您在Python代码中描述所有测试。不需要笨重的UI或臃肿的XML,只需要简单的代码。
Installation
安装
The easiest way to install Locust is from PyPI, using pip:
安装Locust最简单的方式是使用pip
> pip install locustio