Vijay Mishra

Mimicking End-User Behaviour in the Performance Script

By Vijay Mishra

Last updated cal_iconJuly 15, 2021

The performance test is done to understand the application behaviour under a specific users load and eliminate the performance issues in the application.

Through the performance testing script, the tester tries to mimics the usage and activity patterns of real-time users.

To mimic the end-users scenarios tester use some parameters mention below in JMeter scripting.

Number of Threads: It denotes the number of concurrent virtual users going to run during the test.

Ramp-up period: It shows how much time the script will take to initiate the above mentioned virtual users.

Syntax: Ramp-up period / Number of Threads

Eg: Number of Threads = 5 users

Ramp-up period = 300 sec

300 / 5 = 60 sec

So, the script will initiate 1 user at the start and then after every 60 sec.

Think Time: The time difference between each action of a single user is known as think time. A user while browsing the application spends some amount of time reading the content or filling the form on the page (think time) before doing some action on the website. Eg. The time spent from clicking on the product title to clicking on Add to Cart is called think time.

We have to keep this think time between 2 transactions.

Specify the pause time as per the real user behaviour for its next transaction like

5 sec for login and logout transactions.

10 sec for read-only page transactions.

15 sec for write page transactions.

The above pause time should be considered as per end-users behaviour.

Flow Control Action: This is also a type of think time, use to control the sample count of the test need to achieve during a specific time. During a test, the tester needs a business process to iterate 1 or 2 times and achieve a specific count of the sample. Eg.

40 users will be concurrently using the specific business process on the site 2 times in 1 hour.

In this case, 80 users will go through the business flow in 1hour. i.e. 40 users are using it on the first attempt and the next 40 on the second attempt. The pause time each thread will take during the whole execution will be controlled by Flow Control Action.

In the image, a particular thread group will take 10 min break before initiating the 2 iterations.

Test Data: Test data also need to be a replica of the production environment while preventing the privacy of the end-user data.

i.e. its format type, length, file type, file size.

Eg. The file size of end-user data is 500MB which contains 40 column and 50 rows. Then test data should be around 500MB in file size with 40 columns and 50 rows.

Because database query will take more time to process 100 rows than in compare of 50 rows.

Cohabitation: In an Enterprise product, all apps are running and getting used by the users at the same time. Running a standalone app test of an Enterprise product will not give you reliable data of the product.

So, the tester needs to run all the business processes at the same time to mimic the end users usage type and load. This will help a tester to get the more reliable data to justify the response time, stability, reliability and resource usage of a product under a particular load and identify and eliminate the performance bottlenecks in the product if any.

Environment: The performance test environment should be as same as the production environment. In every aspect i.e. hardware configuration, network bandwidth, running services etc.

Get In Touch

How Can We Help ?

We make your product happen. Our dynamic, robust and scalable solutions help you drive value at the greatest speed in the market

We specialize in full-stack software & web app development with a key focus on JavaScript, Kubernetes and Microservices
Your path to drive 360° value starts from here
Enhance your market & geographic reach by partnering with NodeXperts