DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. How to Build a Realistic Test Plan in JMeter

How to Build a Realistic Test Plan in JMeter

These tips will help you build a realistic test plan for JMeter to replicate a user in your web or mobile app using think time.

Rupesh Garg user avatar by
Rupesh Garg
·
Nov. 13, 18 · Tutorial
Like (2)
Save
Tweet
Share
7.97K Views

Join the DZone community and get the full member experience.

Join For Free

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

The JMeter script should be prepared in a realistic way, e.g. by adding a delay between each user action, which we call Think time. Think time allows the virtual users/threads to pause between business flows while moving from one transaction to another. In real scenarios, users will never log in, search, place an order, pay, and log out within a few seconds, as the user needs some time to think and do the next action.

Including Think time in the test plan makes the performance test more realistic as it represents users’ actual behavior in the system.

Following are the steps for a realistic test plan:

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

Note: We need to remove the first sampler’s generated timer manually since the first sampler usually does not need one.

The timer will now record the user think time in a realistic scenario through the Proxy Server. Depending upon the application context, the think time will vary. It’s not advisable to have the default think time for all applications under test.

Testing Test plan Build (game engine)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Spring Cloud: How To Deal With Microservice Configuration (Part 1)
  • How to Create a Real-Time Scalable Streaming App Using Apache NiFi, Apache Pulsar, and Apache Flink SQL
  • The Real Democratization of AI, and Why It Has to Be Closely Monitored
  • Silver Bullet or False Panacea? 3 Questions for Data Contracts

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: