Skip to main content

Posts

Showing posts with the label locust

Basics about Performance Testing Tools

I had an opportunity to give a speech about how we can automate performance testing in CI/CD pipeline in a conference held in Istanbul for the first time " Test automation and Digital QA Submit Istanbul, #TAS19 ". My subject was "Automated Performance Testing", the first part of the speech is to explain what is performance tests and the second part is to explain performance tools, and the last section is to explain what is automated performance testing and how to implement it to CI/CD.  In this post, I want to explain my thoughts about the basics of performance testing tools. Next posts will focus on automated performance testing and using K6 as a performance testing tool. How to Evaluate Performance Testing Tools Before diving into the performance testing tools and technologies we have in the industry, we should define the criteria for evaluation. Each tool has its own advantages or disadvantages and similarity between ancestors or others. When we star

Isolated - Scalable Performance Testing: Locust in Dockers

I have shared some posts how to run Locust in Local or in Cloud, as slave or master. At this time I want to share how you can run it in a Docker. To fully get the benefits of Locust I am using it with Python 3 so I created a Docker file and images upload to the Docker Hub , and the project is on the GitHub .  The Dockerfile has the minimum available requirements but we also have a new file called `requirements.txt` which you can add required python libraries to install inside the container by pip install lib . The Dockerfile is: When you got the docker-locust image, you can now run your script. At the end of the Dockerfile you can see that ENTRYPOINT [ "/usr/local/bin/locust" ] this enable us to use the image as service  which means that you can directly call it same as using Locust installed locally. See the run command below: Running Locust in a Docker Running the Locust with my image is pretty simple if you used without docker, just try other options w

Performance Testing on CI: Integration of Locust and Jenkins

It is a raising question around performance testing people that how to integrate, super hero tool, Locust to Jenkins as a step to continues integration (CI) pipeline. There have been some solutions for this but they are not simple, plus you need to write own log writer to handle this problem.  Actually there was a commit to save the result of the test but it has not been merged to Locust. With these commit we can integrate Locust to Jenkins. Update Locust This  update  is still open so you can not see it in latest Locust version yet. However you can  use this by updating your local repository, or just change two files  main.py  and  stats.py  with the files in your local. For Window change the files in the following directory:  C:\Python27\Lib\site-packages\locustio-0.7.3-py2.7.egga\locust\stats.py and for Unix-base OS change the files in the following directory:  /Library/Python/2.7/site-packages/locust/stats.py.  Alternatively, you can clone this commit from github and instal

Why Performance Test on Cloud

When a software comes to production the weakest points are mostly related to performance of the application. The reason is that most of the organization test the application functionally by testers and on acceptance testing period again the applications is under testing to check functional requirements. The missing point is non-functional testing like performance of the application.  Another failure point is testing the performance as the last level of development process. This means that any misleading failures in the service level can cause a very big problem on production stage so it requires extra source if possible and extra budget. As the terminology says "finding the big issue earlier stage of the development can reduce the fixing effort exponentially " . Therefore test the performance of the software output whenever it is ready, this could be an api end point, a function servers data to system, a web servers, and etc.  Another failure is related to technolo

Performance Testing on CI: Locust is running on Jenkins

For a successful Continuous Integration pipeline, there should be jobs for testing the performance of the application. It is necessary if the application is still performing well. Generally performance testing is thought as kinds of activities performed one step before going to live. In general approach it is true but don't forget to test your application's performance as soon as there is an testable software, such as an api end point, functions, and etc. For CI it is a good approach to testing performance after functional testing and just before the deployment of next stage. In this post, I want to share some info about Jenkins and Locust. In my previous post you can find some information about Locust and Jenkins. Jenkins operates the CI environment and Locust is a tool for performance testing. To run the Locust on Jenkins you need command line arguments which control the number of clients ,   hatch rate,  running locust without web interface and there should be so

New Modern Open Source Performance Testing Tool : Locust

If you are bored with using old fashioned Java GUI to test the performance of your applications, then you should try Locust. Jmeter , which is old fashioned as I mentioned, is very  mature and used by a big community but you have create your test case with an ugly GUI as much features as allows you. For me the best part of Locust is that you can write your test case with Python which is my favourite language and it is very simple to learn. The installation is very simple, you just need to type: > pip install locustio Some feature / deficiency  of Locust:  You can write your test case in Python You can define the user time consumption on a page with min_wait and max_wait  as milliseconds in locust class so that get a real user simulation.  You can give weight for each test cases so you can simulate real user behaviours like during a specific period of time: 1 person signs up, 10 persons login, 60 persons visit pages, ...  You can make http request as you