Dummy Sampler

Though not part of the built-in JMeter samplers, this sampler can be added to your JMeter toolkit via the JMeter extensions project. Refer to https://jmeter-plugins.org/install/Install/ to grab the latest plugin extension and install it in your copy of JMeter. The new Plugins Manager makes it easier than ever to install different plugins without having to copy and move JARs around. This sampler generates samples with just the values that are defined for it. It comes in extremely handy when debugging post processors, without having to repeat the entire execution of the test plan or waiting for the exact condition in the application under testing.

This component allows you to determine whether the response should be marked as a successful sample, what response code to return, the response message, the latency, and response times. In addition, it allows you to specify a request and a response, which can be anything you choose; for example, HTML, XML, or JSON.

To install the Dummy Sampler, after the plugin manager has been installed, do the following:

  1. Open JMeter.
  2. From the menu bar, click on Options | Plugin Manager.
  3. Click the Available Plugins tab from the JMeter Plugins Manager pop-up window.
  4. Check the Dummy Sampler checkbox.
  5. Click the Apply Changes and Restart JMeter button at the bottom right corner.

Once the plugins have been properly installed in your JMeter instance, you should see additional samplers available to pick from:

  1. Add a Thread Group element to the test plan by right-clicking on Test Plan and navigating to Threads | Thread Group.
  2. Add a Dummy Sampler element by right-clicking on Thread Group and navigating to Add | Sampler | jp@gc - Dummy Sampler. For the contents of the Response Data, add the following HTML snippet:
<html> 
<head> 
  <title>Welcome to Debug Sampler</title> 
</head> 
<body> 
  This is a test 
</body> 
</html> 
  1. Add a View Results Tree listener by right-clicking on Thread Group and navigating to Add | Listener | View Results Tree.
  2. Save the test plan.
  3. Execute the test:
The Dummy Sampler

See the bundled dummy-sampler.jmx file for the full example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.196.211