In this tutorial we will create an load testing by using Gatling Tool. First, I am going to tell you about what is load testing and what is the gatling tool. Then, I will show you the simple scenario and results. Tips for reading this tutorial, I would suggest you read this tutorial step by step and I hope you will enjoy it too.
- Scala Programming
- IDE such as IntelliJ IDEA (https://www.jetbrains.com/idea/)
- Gatling API (http://gatling.io/#/resources/download)
- Gatling's SBT plugin (https://github.com/gatling/gatling-sbt-plugin-demo)
1.What is Load Testing ?
Load Testing is the process of putting demand on our service and measuring it response *1
2.What is Gatling Tool ?
In this section, I will show you the simple scenario by using Gatling tool. First, I will define the user story representative of what really happens when users use our service. Then, let's map the user story into code. Last, test it.
Users: They can login and browse AdAccount list
Admins: They can login, browse and search AdAccount list
[Mapping Roles to Code]
700 users arrive at the service
Each users login to the service gradually
Each users browse AdAccount list gradually
500 admin-users arrive at the service
Each admins login to the service gradually
Each admins browse AdAccount list gradually
Each admins search AdAccount gradually
[Run all simulations]
cmd> gatling: test
We can generate the graph which showing the number of request and response time by using gatling tool. X-axis is the responding time. Y-axis is the number of request.
We also can generate the active user graph as the figure below: