Gatling Load Testing
Gatling Load Testing is one of the best tools for performance testing based on Scala-Akka-Netty that you can easily use by generating beautiful reports. There are a few ways to script to run in Gatling all of which is well documented on the tool’s website:
Using Gatling Load Testing
The script we will make as an example uses the Gatling Recorder through a HAR file, in our case, it is from the page “globo.com”.
- Open the recorder;
- Then, select “HAR Converter” mode;
- Select the HAR file that you want to generate the script;
- Select the name of the class;
- In the Recorder, there are still some other options to explore. In our case, we do not want the script to contain static resources. So, clicking on the option “No static resources” already adds to the blacklist everything we do not want.
- After clicking Start, our simulation will be ready and the file in Scala has been generated and ready to be simulated.
Now with the script ready, we can do our report. Just run Gatling, select the number of your simulation, and some description if you wish. Then, the simulation begins. In the end, it generates an HTML report to visualize the information in more detail. The main page displays a graph that shows the number of requests made in the script concerning time. By default, Gatling considers that the time below 800ms is good.
Between 800 and 1200 is worrying, and above 1200 is bad, but this can be changed in the config file according to our needs. By clicking on a request, we have detailed information about it which is the same information that was on the main page, except with a specific graph for it and with the separation of the information from the failed requests and those that were successful.
How to Aim for Less Stressful Performance Tests with Gatling ?
Returning to the main screen, at the bottom, we have the graph of the number of users who were used in the simulation with time.
- The percentage of successful requests and that failed concerning the request time.
- The percentiles of successful requests throughout the simulation.
- The number of requests throughout the simulation.
- The number of responses throughout the simulation.
Performance Testing in Software Testing
Performance testing in software testing helps to ensure that the software or applications perform properly under their workload. This testing technique is performed to determine the performance of the system in terms of stability, sensitivity, workload, and reactivity.
Hence, the process of performance testing helps to analyze the capability and quality of a product. This testing method helps us to determine the performance of the software in terms of speed, reliability, stability and different workloads. The performance testing process is also known as Perf testing.
Different attributes of performance testing are as follows:
- Speed: Speed helps to determine whether the software product responds quickly or not.
- Scalability: Scalability helps to know the amount of load which a particular software product can handle at a particular time.
- Reliability: Reliability means whether the software product is secure or not.
- Stability: A particular software product should be stable in cases of different workloads.
Also Read: Free Web Load Testing Tools
Objectives of Performance Testing
So, what is the main purpose of conducting the performance testing process? What goals or objectives does the process help us to achieve?
The objectives of conducting the performance testing process are as follows-
- Performance testing helps to eliminate performance congestion.
- It also helps to maintain the stability, reliability and credibility of our product software.
- Before launching the product, the product should be tested for various bugs or issues. Hence, the performance testing process helps to improve the product before launching it out to the audience.
- One of the most important objectives of performance testing is that it helps to make your software product rapid. This means your software product can respond quickly.
Performance Testing Types
After knowing the objectives of performance testing, you can initiate the process of performance testing, but before that, you should also know the various types of performance testing. Let us have a look at them.
1. Load Testing
This type of performance testing helps the testers to verify the ability of a software product to perform under anticipated user loads. The main goal of performing load testing is to evaluate performance congestion before launching the product to all the people out there in the market.
2. Endurance Testing
A good software product should be able to handle the expected load in a long period. Hence, endurance testing is performed to ensure that the software product can handle the expected load.
3. Stress Testing
A software product should also be able to handle high traffic in extreme situations. Thus, stress testing helps to substantiate whether a product can handle high traffic under extreme workloads or not. The main objective is to recognize the breaking point of the software.
4. Spike Testing
Despite testing helps to identify whether the product is capable to adhere to the large spikes in the load generated by the users.
5. Volume Testing
Volume testing helps to know whether the overall system behaviour is accurate or not. It helps to check the performance of the product under different database volumes.
6. Scalability Testing
Scalability testing helps to determine the effectiveness of a software application.
Gatling Load Testing: Summing Up
Now, we can start improving our Script by opening the Scala file generated by the Recorder and changing what is necessary. You can delete requests that we consider unnecessary, edit the name of the requisitions to improve their identification in the reports, and test with the number of different users. Hence, now you must know about Gatling load testing which is one of the best tools for performance testing. You should also be able to answer the question- What performance testing is?
Also Read: Load Testing For Mobile Apps