{"id":329,"date":"2013-11-15T13:15:22","date_gmt":"2013-11-15T18:15:22","guid":{"rendered":"https:\/\/www.redline13.com\/blog\/?p=329"},"modified":"2022-01-03T20:00:18","modified_gmt":"2022-01-04T01:00:18","slug":"long-duration-tests","status":"publish","type":"post","link":"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/","title":{"rendered":"Long Duration Tests"},"content":{"rendered":"<p>RedLine is great for running long duration tests. In addition to being incredibly cheap, it is also easy. We give you two ways to set long duration tests.<\/p>\n<p>You can do the simple ping test by setting the # of Iterations parameter as seen in this example:<\/p>\n<p><a href=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/11\/Screen-Shot-2013-11-15-at-10.05.09-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-330\" alt=\"Looping a test\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/11\/Screen-Shot-2013-11-15-at-10.05.09-AM.png\" width=\"564\" height=\"117\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/11\/Screen-Shot-2013-11-15-at-10.05.09-AM.png 940w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/11\/Screen-Shot-2013-11-15-at-10.05.09-AM-300x62.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/11\/Screen-Shot-2013-11-15-at-10.05.09-AM-768x159.png 768w\" sizes=\"auto, (max-width: 564px) 100vw, 564px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>The above test 100 users will randomly ping the URL between 0 and 20 seconds (20,000 milliseconds) &#8211; so about 5 requests per second. We have set the iterations to be 3,000 &#8211; so this pattern will repeat 3,000 times. So the test will run for up to 20 seconds * 3,000 = 60,000 seconds, or about 16.7 hours.<\/p>\n<p>You can also do this in your Custom Test Script. Put a loop inside of\u00a0startTest around loadPage. \u00a0So something like:<br \/>\n<code>$startTime = time();<\/p>\n<p>do<br \/>\n{<br \/>\n&nbsp;&nbsp;$this-&gt;loadPage();<br \/>\n&nbsp;&nbsp;$duration =\u00a0time() -\u00a0$startTime;<\/p>\n<p>&nbsp;&nbsp;\/\/ Set progress<br \/>\n&nbsp;&nbsp;recordProgress\u00a0($testNum,\u00a0$duration\/864);<br \/>\n}\u00a0while ($duration\u00a0&lt; 86400);<\/code><br \/>\nIn\u00a0loadPage, you can change usleep(rand(\u2026)) to change the delay and you can call\u00a0goToUrl multiple times if you want to load multiple pages with each loop.<\/p>\n<p>You can see more on writing Custom Tests here &#8211;\u00a0<a href=\"https:\/\/www.redline13.com\/blog\/writing-a-custom-load-test\/\">https:\/\/www.redline13.com\/blog\/writing-a-custom-load-test\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>RedLine is great for running long duration tests. In addition to being incredibly cheap, it is also easy. We give you two ways to set long duration tests. You can do the simple ping test by setting the # of Iterations parameter as seen in this example: &nbsp; The above test 100 users will randomly ping the URL between 0 and 20 seconds (20,000 milliseconds) &#8211; so about 5 requests per second. We have set the<a class=\"more-link\" href=\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3],"tags":[318,335],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-richardfriedman","4":"post-329","6":"format-standard","7":"category-blog","8":"category-getting-started","9":"post_tag-load-testing","10":"post_tag-long-duration-tests"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Long Duration Tests - RedLine13<\/title>\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\/2013\/11\/long-duration-tests\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Long Duration Tests - RedLine13\" \/>\n<meta property=\"og:description\" content=\"RedLine is great for running long duration tests. In addition to being incredibly cheap, it is also easy. We give you two ways to set long duration tests. You can do the simple ping test by setting the # of Iterations parameter as seen in this example: &nbsp; The above test 100 users will randomly ping the URL between 0 and 20 seconds (20,000 milliseconds) &#8211; so about 5 requests per second. We have set theRead More &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/\" \/>\n<meta property=\"og:site_name\" content=\"RedLine13\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-15T18:15:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-04T01:00:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/11\/Screen-Shot-2013-11-15-at-10.05.09-AM.png\" \/>\n<meta name=\"author\" content=\"Rich Friedman\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rich Friedman\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/\"},\"author\":{\"name\":\"Rich Friedman\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/0fadb7f3ef665407f3c93c8ec84e741a\"},\"headline\":\"Long Duration Tests\",\"datePublished\":\"2013-11-15T18:15:22+00:00\",\"dateModified\":\"2022-01-04T01:00:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/\"},\"wordCount\":161,\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"keywords\":[\"Load Testing\",\"Long Duration Tests\"],\"articleSection\":[\"Blog\",\"Getting Started\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/\",\"name\":\"Long Duration Tests - RedLine13\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\"},\"datePublished\":\"2013-11-15T18:15:22+00:00\",\"dateModified\":\"2022-01-04T01:00:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redline13.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Long Duration Tests\"}]},{\"@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\/0fadb7f3ef665407f3c93c8ec84e741a\",\"name\":\"Rich Friedman\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8651ce662fc18353b90c1922f9d29efb01173afa5500224b4d9a355d858a7bd9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8651ce662fc18353b90c1922f9d29efb01173afa5500224b4d9a355d858a7bd9?s=96&d=mm&r=g\",\"caption\":\"Rich Friedman\"},\"sameAs\":[\"http:\/\/richardfriedman@yahoo.com\"],\"url\":\"https:\/\/www.redline13.com\/blog\/author\/richardfriedman\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Long Duration Tests - RedLine13","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\/2013\/11\/long-duration-tests\/","og_locale":"en_US","og_type":"article","og_title":"Long Duration Tests - RedLine13","og_description":"RedLine is great for running long duration tests. In addition to being incredibly cheap, it is also easy. We give you two ways to set long duration tests. You can do the simple ping test by setting the # of Iterations parameter as seen in this example: &nbsp; The above test 100 users will randomly ping the URL between 0 and 20 seconds (20,000 milliseconds) &#8211; so about 5 requests per second. We have set theRead More &rarr;","og_url":"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/","og_site_name":"RedLine13","article_published_time":"2013-11-15T18:15:22+00:00","article_modified_time":"2022-01-04T01:00:18+00:00","og_image":[{"url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/11\/Screen-Shot-2013-11-15-at-10.05.09-AM.png"}],"author":"Rich Friedman","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rich Friedman","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/#article","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/"},"author":{"name":"Rich Friedman","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/0fadb7f3ef665407f3c93c8ec84e741a"},"headline":"Long Duration Tests","datePublished":"2013-11-15T18:15:22+00:00","dateModified":"2022-01-04T01:00:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/"},"wordCount":161,"publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"keywords":["Load Testing","Long Duration Tests"],"articleSection":["Blog","Getting Started"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/","url":"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/","name":"Long Duration Tests - RedLine13","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/#website"},"datePublished":"2013-11-15T18:15:22+00:00","dateModified":"2022-01-04T01:00:18+00:00","breadcrumb":{"@id":"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redline13.com\/blog\/2013\/11\/long-duration-tests\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redline13.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Long Duration Tests"}]},{"@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\/0fadb7f3ef665407f3c93c8ec84e741a","name":"Rich Friedman","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8651ce662fc18353b90c1922f9d29efb01173afa5500224b4d9a355d858a7bd9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8651ce662fc18353b90c1922f9d29efb01173afa5500224b4d9a355d858a7bd9?s=96&d=mm&r=g","caption":"Rich Friedman"},"sameAs":["http:\/\/richardfriedman@yahoo.com"],"url":"https:\/\/www.redline13.com\/blog\/author\/richardfriedman\/"}]}},"_links":{"self":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/329","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/comments?post=329"}],"version-history":[{"count":1,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/329\/revisions"}],"predecessor-version":[{"id":8628,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/329\/revisions\/8628"}],"wp:attachment":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media?parent=329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/categories?post=329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/tags?post=329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}