by admin | Aug 8, 2019 | Performance Testing, Fixed, Blog |
Today, you will learn how to perform distributed load testing in Locust. If you are not familiar with Locust, then let’s refresh the basics and see how to perform distributed execution. Locust is an open source load testing tool and you can describe all your test in Python code.

Installation Locust is a Python library. It does not have any UI to write or configure your test. You can describe all your test in Python code.
Locust File CreationCreate a python file using the below code.
from locust import HttpLocust, TaskSet, task
class UserBehavior(TaskSet):
@task
def index(self):
self.client.get("/")
class WebsiteUser(HttpLocust):
task_set = UserBehavior
min_wait = 5000
max_wait = 9000
Note: If a file has HttpLocust class, then it will be considered as LocustFile. In the above code, we have two classes, one is TaskSet which is used to declare all your tests and the second one is HttpLocust which represents one user and it should have task_set attribute.
Executing Locust FileUse the below command to run your Locust file.
locust -f locust-examples/locustfile.py --host=http://google.com
Note: As per the above command, our LocustFile is placed inside a folder (i.e. locust-examples). Once you execute the above command, Locust web monitor will start and you can start load execution from web monitor
Locust Web MonitorYou can launch the web monitor using http://localhost:8089/.

Now, click Start Swarming button after entering number of users and Hatch rate.
Distributed Execution
To start locust in master mode:
locust -f my_locustfile.py --master
And then on each slave (replace 192.168.0.14 with IP of the master machine):
locust -f my_locustfile.py --slave --master-host=192.168.0.14
by admin | Aug 8, 2019 | Performance Testing, Fixed, Blog |
Businesses and enterprises rely heavily on digital applications for critical functions and hence it is important to validate whether applications can withstand realistic workload scenarios. Application load testing helps test engineers determine the behavior of a system under normal (and anticipated) peak load conditions. Such exercises help to identify the maximum operating capacity of an application and detect any bottlenecks. In essence, load testing ensures a given function, program, or system can handle the assignments it is designed to execute.

Beyond Functional Testing
The functional testing of an application, while important, in no way degrades the centrality of application load testing – a performance testing company undertakes such testing to measure the performance of an application over time. Commercially available load testing tools help ensure applications can withstand normal amounts of user traffic and can navigate spikes and unusual conditions. Further, application load testing helps validate the fundamental features of a software product – measure the speed, accuracy, and stability of the software, identify discrepancies, resolve issues, and improve optimization and load capability.
Components of Load Testing
Commercial providers of load testing services can gather requirements, map relevant user journeys, establish a baseline, and automate and integrate the various units of a software product as part of application load testing activities. Such actions help providers of load testing services to gain a deeper understanding of the end-user experience, identify how users interact with an application, use monitoring data from any APM tools, run tests to establish a solid baseline for further testing, and prioritize load testing as a part of CI/CD processes, while integrating with automation tools already in use.
Cloud: Insurance for Performance
When load testing services adopt a firm stance on performance using cloud-based testing services would make the task more efficient. This choice of action reduces the costs of failure in application load testing campaigns. It helps to minimize risk related to performance requirements, increase customer satisfaction, detect performance bottlenecks, and improve the scalability of an application. Further, it boosts the deployment quality of any tested application, optimizes costs related to hardware and software, reduces the risks and costs associated with downtime, and provides tangible statistics to developers. Additionally, commercial cloud-based load testing services help start-ups to build a better and more scalable application.
Measure and Repeat
Measuring the performance of an application is an important aspect of performance testing. Measurements allow testing engineers to derive an understanding of choke points and bottlenecks within a software application. The use of application and server performance monitoring services empowers measurement activities and enables load testing campaigns to attain fruition. Additionally, measuring the internal working of an application and comparing these with load testing results helps implement tweaks to a modern software application. Finally, software testers need to repeat testing processes and refine them for better outcomes. It is important to continue writing tests, undertake functional and load tests, and execute measurements. These actions allow them to identify issues, make improvements, and release new iterations of an application – leading to a better, stronger and more scalable service for end-users.
In Conclusion
Load testing remains critical whether an application is a mobile, web or client/server design. Therefore, a performance testing company should plan for dedicated resources, who would be experts in development, execution, and keeping load testing up-to-date in line with customer standards and requirements. Customers have several choices in the market, and their expectation of a high quality application should guide performance testing companies in executing their services. Load testing ensures that the application delivers even under heavy user loads, traffic spikes, failover switches, and situations fraught with network speed variables. To work with the very best performance testing company – connect with our experts.
by admin | Jul 17, 2019 | Performance Testing, Blog |
by admin | Jun 28, 2019 | Performance Testing, Blog |
by admin | May 21, 2019 | Performance Testing, Blog |
by admin | Apr 23, 2019 | Performance Testing, Blog |