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 Video Library
Refcards
Trend Reports

Events

View Events Video Library

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

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

SBOMs are essential to circumventing software supply chain attacks, and they provide visibility into various software components.

Related

  • Load Testing Essentials for High-Traffic Applications
  • A General Overview of TCPCopy Architecture
  • How To Organize End-To-End Quality Assurance and Testing for E-Commerce Apps
  • Five Steps To Building a Tier 1 Service That Is Resilient to Outages

Trending

  • Spring Cloud LoadBalancer vs Netflix Ribbon
  • One Checkbox to Cloud: Migrating from Tosca DEX Agents to E2G
  • Spring and PersistenceContextType.EXTENDED
  • Beyond Java Streams: Exploring Alternative Functional Programming Approaches in Java
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. Record and Play Load Testing in 5 Steps

Record and Play Load Testing in 5 Steps

Learn more about record and playback load test scenarios in this post!

By 
Canberk Akduygu user avatar
Canberk Akduygu
·
Mar. 12, 19 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
7.1K Views

Join the DZone community and get the full member experience.

Join For Free

While Apache JMeter allows you to create a load test from scratch, it also gives you the opportunity to record and playback load test scenarios for your web or mobile applications. Recording performance test scenarios are very useful when it comes to web or mobile testing. Websites and mobile applications make many requests varying from the initial server to third-party applications, like analytics sites, etc. Therefore implementing those requests from scratch may not be the best idea. In those cases, we recommend you to use the recording module of JMeter.

JMeter has a special module for that purpose. It’s called HTTP Test Script Recorder. This module works as a proxy on the host and port that you provide and listen to the HTTP requests. Then, it creates HTTP Sampler for recorded requests.

How to Configure HTTP Test Script Recorder

Step 1

Go to Non-Test Elements and select the module.

In that screen, you will see many configuration elements. Some of them are mandatory, some are not.

  • Port is mandatory. This port number will also be used in your browser. So, select an empty port. JMeter proxy is not ready with basic configuration.

Step 2

Others configuration items are optional. But there is one item that you should configure from our experience. That’s the Grouping section. During script recording, we’ll simulate an end-to-end test. Therefore, many pages, jpeg, or CSS files will be captured. But we need to distinguish which request is made on which page or application module so that during execution, JMeter will create readable reports.

There are five choices:

  • 1) Do not group sampler: Don’t use this one for your sake. Every request will be listed on the same label and it’s not easy to distinguish which request belongs to which action you made during test recording.
  • 2) Add a Separator Between Each Group: A basic separator will be added between every action you made during recording.
  • 3) Put Each group in a new Controller: This will also record your test scenario according to your actions and create a Controller for each action you made.
  • 4) Put each group in a New Transaction Controller: That’s basically the same as the third option but there’s a slight difference. Transaction Controller lets you aggregate the results under one label. The controller doesn’t.
  • 5) Store the 1st Sampler of each group only: This one will save only the first request of every action you made. That might not be the best solution as we mostly want to capture all requests.

Step 3

There is another config that you might want to do. That’s “Which file to be excluded during recording?”

Add file extensions that you don’t want to capture to URL Patterns to Exclude.

Regular expression pattern is .*\.extensionName.*

The reason we do this is that those files are mostly dynamic and they are likely to change in near future. This is about a newspaper website and images are changing every minute. So, there’s no need to capture those things. We are able to call dynamic content by making a small configuration.

Step 4

This configuration can be done by adding an HTTP Request Defaults to your test plan.

Add an HTTP Request Default, then go to the Advanced tab. Select Retrieve All Embedded Resources

Now, JMeter will always request the most updated embedded content for the pages that you visit. Think about creating a Random Product when clicking on an e-commerce web page. Every time we hit another product, JMeter will ask about the resource for those products when this is configured.

Step 6

Configure your browser’s proxy settings to JMeter’s setting that you made in step 1. Then, hit the Start button in Test Script Recorder.

Now, you can capture any request.

Happy load testing!

Load testing Record (computer science) Requests Testing Test script

Published at DZone with permission of Canberk Akduygu. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Load Testing Essentials for High-Traffic Applications
  • A General Overview of TCPCopy Architecture
  • How To Organize End-To-End Quality Assurance and Testing for E-Commerce Apps
  • Five Steps To Building a Tier 1 Service That Is Resilient to Outages

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • [email protected]

Let's be friends: