JMeter - How to build a Realistic Test Plan?

July 11, 2018
3 mins
Share this post

The Proxy Server allows JMeter to record all the actions while user browses web/mobile application. The recorded actions are stored under the test plan in JMeter.

JMeter script should be prepared in a realistic way i.e. by adding delay between each user action which we call it as Think time. Think time allows the virtual users/threads to pause between the business flows, while moving from one to another transaction. As in real scenario users will never login, search, place order, payment and logout within few seconds as the user needs some time to think and do next action.

So including a Think time in the test plan makes the performance test more realistic as it represents user's actual behaviour in the system.

Following the steps for a Realistic test plan:

  1. Create a new test-plan and switch to WorkBench and add HTTP(s) Test Script Recorder.
  2. Now, add Constant Timer to HTTP(S) Test Script Recorder and set Thread Delay (in milliseconds) in Constant Timer as . It tells the proxy server to record your delay time while you browse rather than adding a constant time.
FrugalTesting constant timer jmeter
  1. Now configure your browser to use the JMeter Proxy and record the user actions of web/mobile application.
  2. You can see the requests are recorded with Constant Timer with the exact time delay.
FrugalTesting constant timer with exact time jmeter

Note:

We need to remove the first sampler's generated timer manually, since the first sampler usually does not need one.

Thus timer recorded the user think time in realistic scenario through Proxy Server.

Depending upon the application context, the think time would vary.

It's not advisable to have the default think time for all applications under test.

Rupesh Garg
Author
Our blog

Latest blog posts

Discover the latest in software testing: expert analysis, innovative strategies, and industry forecasts
API Testing

Exploring Postman Collections: Organizing and Managing API Tests

Rupesh Garg
Rupesh Garg
November 12, 2024
5 min read
DevOps

Comprehensive Guide for an Effective DevOps Testing Strategy

Rupesh Garg
Rupesh Garg
November 11, 2024
5 min read
API Testing
Testing Tools

Postman API Testing Tutorial for Beginners

Rupesh Garg
Rupesh Garg
November 8, 2024
5 min read