I am studying the different types of testing for a Django application. I know how to do functional and unit testing in Django and how to apply different methodologies, but now I am facing a new challenge, I need to know how to do:
I know the difference between them but I dont know which is the best methodology to follow,which are the best packages for do it or simply where I can get some documentation about it.
So my question is, how can I start to do these types of tests in a Django app or where can I get some good documentation about it?
Thanks
Load testing and stress testing are both types of performance testing, which check how your application performs when many people use it at once. While load testing simulates real-life application load, stress testing tests application performance at peak times.
Performance testing is the process of determining the system's performance that includes speed, and reliability under varying loads. Load testing is the process of determining the behavior of the system when multiple users access it at the same time. 2. In performance the load on which the system is tested is normal.
Load Testing and Stress Testing are basically performance testing sub-types where:
Also, be aware of Soak Testing - when you put the system under a prolonged load to see if it is capable of handling sustained concurrent usage. The majority of bottlenecks are being discovered during Soak Testing phase.
With regards to "how do I":
First of all you need a performance testing tool. Given python
and django
tags my expectation is that you find Locust tool interesting as you will be able to write your tests in some form of Python language. You can also consider Grinder where you can write tests in Jython (Java bindings for Python) language so you won't have to learn the new tool from scratch. Other free and open source load testing tools are listed and compared in the Open Source Load Testing Tools: Which One Should You Use?
Next step will be creating a load test scenario. You need to mimic real application usage as closely as possible, to wit you need to properly simulate real users using a real browser with all related stuff like:
Once you have the test and have the confidence regarding it is doing what it is supposed to be doing you can run it with an increased number of users and see how does your application behave under the load, correlate increasing/decreasing load with changing metrics/resources usage
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With