Python Load Test Tool locust

Source: Internet
Author: User

Locust is an open source load testing tool. Use Python code to define user behavior, or to simulate millions of users.

Locust is a very simple to use, distributed, User load testing tool. Locust is primarily a load test for websites or other systems that can test how many users a system can handle concurrently.

The Locust is completely time-based, so a single machine supports thousands of concurrent users. Compared to many other event-driven applications, Locust does not use callbacks, but uses lightweight processing gevent.

Characteristics
    • Write user test scenarios using pure Python code ; UIs or XML is not required

    • Distributed & Scalable-supports thousands of users

    • Web-based UI

    • can test any system , although Locust is Web-oriented, but can also test any other system

Installation:

?

1 >pip  install  locustio

Example code:

?

From locust import httplocust, taskset, task class websitetasks (TaskSet):     def on_start (self):         Self.client.post ("/login", {             " Username ": " test_user ",            " password " :  ""         })            @task      def index (self):         Self.client.get ("/")               @task       def about (self):         self.client.get (" /about/")  class websiteuser (httplocust):     task_set = websitetasks     min_wait  = 5000    max_wait = 15000 


Python Load Test Tool locust

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.