Skip to content
  • ZipCode Api
  • Blog
  • About RedLine13
RedLine13
RedLine13
Primary Navigation Menu
Menu
  • Start Testing
  • Demo
  • Pricing
  • JMeter
  • Partners
  • Docs
    • Documentation Home
    • AWS Set Up for load testing
    • AWS Approval for Large Tests
    • PHP, NodeJS, Python Load Tests
    • Scalability
    • Jenkins Plugin Setup
    • Premium Features
    • Knowledge Base

Using the JMeter Dummy Sampler

By: David Koziel

 

When designing your JMeter test locally, it is useful to have target endpoints to test against. Depending on your test logic, this may even be a requirement. However, a suitable environment for making these requests is not always available. To avoid generating an unknown number of uncontrolled requests against real endpoints, there  the JMeter Dummy Sampler.  In this brief post, we will show you how to add the Dummy Sampler to your load test and describe a few scenarios where it can be useful.

Using the JMeter Dummy Sampler

Adding the Dummy Sampler to your Load Test

This plugin is particularly useful when designing complex thread logic. Adding one or more Dummy Samplers to your test will provide reportable results without unnecessarily generating real requests. To add a Dummy Sampler to any test simply select it from the Samplers menu when adding it as a component to an existing Thread Group:

Adding a Dummy Sampler to an existing Thread Group
Adding a Dummy Sampler to an existing Thread Group.

Once added, you have several options that you can configure to help simulate real requests. You can define a response code and message (e.g., 200) as well as set latencies that would be expected for actual network requests. Most of these parameters are also able to be scripted, and in the following example JMeter shorthand function calls are used to generate random latencies:

Configuring the Dummy Sampler
Configuring the Dummy Sampler.

Use Cases

Use cases for the Dummy Sampler include any instance where you need to act on a response. This includes debugging your test plan with complex test logic or scripts that are dependent on such responses. For instance, you can set the response code of the Dummy Sampler to return a random status code (such as an occasional 404 or 500 server error) to simulate real-world responses. You can even simulate saturation points for a stress test or soak test by associating a scripted variable for latency using the ${...} convention.


Did you known that RedLine13 offers a full-featured free trial? Sign up now and start testing today!

2023-05-31
Previous Post: Top 10 JMeter Plugins
Next Post: Continuously Increase Load with the JMeter Arrivals Thread Group

Recent Posts

  • JMeter XML Format Post Processor
  • Order of Elements in JMeter
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener

Related

  • JMeter XML Format Post Processor
  • Order of Elements in JMeter
  • The JMeter Synthesis Report
  • Using the JMeter Plugins Manager
  • JMeter Rotating JTL Listener
  • Using Test Fragments in JMeter Tests
  • Step-by-Step Guide to Testing with JMeter
  • Functional Testing vs Performance Testing
  • A Gentle Introduction to Load Testing
  • Using the JMeter Counter Element

© RedLine13, LLC | Privacy Policy | Contract
Contact Us: info@redline13.com

Designed using Responsive Brix. Powered by WordPress.