{"id":10590,"date":"2023-05-31T14:24:44","date_gmt":"2023-05-31T18:24:44","guid":{"rendered":"https:\/\/www.redline13.com\/blog\/?p=10590"},"modified":"2023-06-22T14:13:24","modified_gmt":"2023-06-22T18:13:24","slug":"dummy-sampler","status":"publish","type":"post","link":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/","title":{"rendered":"Using the JMeter Dummy Sampler"},"content":{"rendered":"<p><strong>\u00a0<\/strong><\/p>\n<p>When designing your <a href=\"https:\/\/jmeter.apache.org\/usermanual\/index.html\" target=\"_blank\" rel=\"noopener\">JMeter<\/a> 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\u00a0 the <a href=\"https:\/\/jmeter-plugins.org\/wiki\/DummySampler\/\" target=\"_blank\" rel=\"noopener\">JMeter Dummy Sampler<\/a>.\u00a0 In this brief post, we will show you how to add the <em>Dummy Sampler<\/em> to your load test and describe a few scenarios where it can be useful.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-10591 aligncenter\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-1.png\" alt=\"Using the JMeter Dummy Sampler\" width=\"400\" height=\"300\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-1.png 400w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-1-300x225.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/strong><\/p>\n<h3><a id=\"post-10590-_bwn2djfngxsw\"><\/a>Adding the Dummy Sampler to your Load Test<\/h3>\n<p>This plugin is particularly useful when designing complex thread logic. Adding one or more <em>Dummy Samplers<\/em> to your test will provide reportable results without unnecessarily generating real requests. To add a <em>Dummy Sampler<\/em> to any test simply select it from the Samplers menu when adding it as a component to an existing <em>Thread Group<\/em>:<\/p>\n<figure id=\"attachment_10592\" class=\"wp-caption aligncenter\" style=\"max-width: 562px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-10592\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-2.png\" alt=\"Adding a Dummy Sampler to an existing Thread Group\" width=\"562\" height=\"505\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-2.png 587w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-2-300x269.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-2-425x382.png 425w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><figcaption class=\"wp-caption-text\"><em>Adding a Dummy Sampler to an existing Thread Group.<\/em><\/figcaption><\/figure>\n<p>Once added, you have several options that you can configure to help simulate real requests. You can define a response code and message (<em>e.g.<\/em>, <code>200<\/code>) 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 <a href=\"https:\/\/jmeter.apache.org\/usermanual\/functions.html\" target=\"_blank\" rel=\"noopener\">shorthand function calls<\/a> are used to generate random latencies:<\/p>\n<figure id=\"attachment_10593\" class=\"wp-caption aligncenter\" style=\"max-width: 452px\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-10593\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-3.png\" alt=\"Configuring the Dummy Sampler\" width=\"452\" height=\"205\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-3.png 483w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-3-300x136.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-3-420x190.png 420w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-3-425x193.png 425w\" sizes=\"auto, (max-width: 452px) 100vw, 452px\" \/><figcaption class=\"wp-caption-text\">Configuring the Dummy Sampler.<\/figcaption><\/figure>\n<h3><a id=\"post-10590-_bwn2djfngxsw\"><\/a>Use Cases<\/h3>\n<p>Use cases for the <em>Dummy Sampler<\/em> 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 <em>Dummy Sampler<\/em> to return a random status code (such as an occasional <code>404<\/code> or <code>500<\/code> 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 <code>${...}<\/code> convention.<\/p>\n<hr \/>\n<p>Did you known that RedLine13 offers a full-featured free trial? <a href=\"https:\/\/www.redline13.com\/Service\" target=\"_blank\" rel=\"noopener\">Sign up now<\/a> and start testing today!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 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\u00a0 the JMeter Dummy Sampler.\u00a0 In this brief post, we will show you how to add the Dummy Sampler to your load test and<a class=\"more-link\" href=\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":11,"featured_media":10591,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7],"tags":[576,629,283,628,318,402,424],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-dkoziel","4":"post-10590","6":"format-standard","7":"has-post-thumbnail","8":"category-blog","9":"category-jmeter","10":"post_tag-debugging-load-test","11":"post_tag-dummy-sampler","12":"post_tag-jmeter","13":"post_tag-jmeter-plugins-2","14":"post_tag-load-testing","15":"post_tag-plugins","16":"post_tag-redline13"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using the JMeter Dummy Sampler - RedLine13<\/title>\n<meta name=\"description\" content=\"Avoid generating an unknown number of uncontrolled requests against real endpoints with the JMeter Dummy Sampler.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using the JMeter Dummy Sampler - RedLine13\" \/>\n<meta property=\"og:description\" content=\"Avoid generating an unknown number of uncontrolled requests against real endpoints with the JMeter Dummy Sampler.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/\" \/>\n<meta property=\"og:site_name\" content=\"RedLine13\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-31T18:24:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-22T18:13:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"David Koziel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Koziel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/\"},\"author\":{\"name\":\"David Koziel\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20\"},\"headline\":\"Using the JMeter Dummy Sampler\",\"datePublished\":\"2023-05-31T18:24:44+00:00\",\"dateModified\":\"2023-06-22T18:13:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/\"},\"wordCount\":347,\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"keywords\":[\"Debugging Load Test\",\"Dummy Sampler\",\"JMeter\",\"JMeter Plugins\",\"Load Testing\",\"plugins\",\"RedLine13\"],\"articleSection\":[\"Blog\",\"JMeter\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/\",\"name\":\"Using the JMeter Dummy Sampler - RedLine13\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\"},\"datePublished\":\"2023-05-31T18:24:44+00:00\",\"dateModified\":\"2023-06-22T18:13:24+00:00\",\"description\":\"Avoid generating an unknown number of uncontrolled requests against real endpoints with the JMeter Dummy Sampler.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redline13.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using the JMeter Dummy Sampler\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"name\":\"RedLine13\",\"description\":\"(Almost) Free Load Testing in the Cloud\",\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.redline13.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\",\"name\":\"RedLine13\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"contentUrl\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"width\":300,\"height\":68,\"caption\":\"RedLine13\"},\"image\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20\",\"name\":\"David Koziel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g\",\"caption\":\"David Koziel\"},\"url\":\"https:\/\/www.redline13.com\/blog\/author\/dkoziel\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using the JMeter Dummy Sampler - RedLine13","description":"Avoid generating an unknown number of uncontrolled requests against real endpoints with the JMeter Dummy Sampler.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/","og_locale":"en_US","og_type":"article","og_title":"Using the JMeter Dummy Sampler - RedLine13","og_description":"Avoid generating an unknown number of uncontrolled requests against real endpoints with the JMeter Dummy Sampler.","og_url":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/","og_site_name":"RedLine13","article_published_time":"2023-05-31T18:24:44+00:00","article_modified_time":"2023-06-22T18:13:24+00:00","og_image":[{"width":400,"height":300,"url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2023\/05\/word-image-10590-1.png","type":"image\/png"}],"author":"David Koziel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"David Koziel","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/#article","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/"},"author":{"name":"David Koziel","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20"},"headline":"Using the JMeter Dummy Sampler","datePublished":"2023-05-31T18:24:44+00:00","dateModified":"2023-06-22T18:13:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/"},"wordCount":347,"publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"keywords":["Debugging Load Test","Dummy Sampler","JMeter","JMeter Plugins","Load Testing","plugins","RedLine13"],"articleSection":["Blog","JMeter"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/","url":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/","name":"Using the JMeter Dummy Sampler - RedLine13","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/#website"},"datePublished":"2023-05-31T18:24:44+00:00","dateModified":"2023-06-22T18:13:24+00:00","description":"Avoid generating an unknown number of uncontrolled requests against real endpoints with the JMeter Dummy Sampler.","breadcrumb":{"@id":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redline13.com\/blog\/2023\/05\/dummy-sampler\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redline13.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Using the JMeter Dummy Sampler"}]},{"@type":"WebSite","@id":"https:\/\/www.redline13.com\/blog\/#website","url":"https:\/\/www.redline13.com\/blog\/","name":"RedLine13","description":"(Almost) Free Load Testing in the Cloud","publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.redline13.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.redline13.com\/blog\/#organization","name":"RedLine13","url":"https:\/\/www.redline13.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","contentUrl":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","width":300,"height":68,"caption":"RedLine13"},"image":{"@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/51d282221e3230ab35f964f98ada9b20","name":"David Koziel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2babf644e0993fc86893c24d7525f1e3be114a8746c01249797f25587ae1697a?s=96&d=mm&r=g","caption":"David Koziel"},"url":"https:\/\/www.redline13.com\/blog\/author\/dkoziel\/"}]}},"_links":{"self":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/10590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/comments?post=10590"}],"version-history":[{"count":4,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/10590\/revisions"}],"predecessor-version":[{"id":10599,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/10590\/revisions\/10599"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media\/10591"}],"wp:attachment":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media?parent=10590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/categories?post=10590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/tags?post=10590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}