{"id":1855,"date":"2016-04-14T17:57:01","date_gmt":"2016-04-14T21:57:01","guid":{"rendered":"https:\/\/www.redline13.com\/blog\/?p=1855"},"modified":"2016-04-14T17:57:01","modified_gmt":"2016-04-14T21:57:01","slug":"customtest-for-load-testing-websockets","status":"publish","type":"post","link":"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/","title":{"rendered":"CustomTest for Load Testing WebSockets"},"content":{"rendered":"<p>Example to write custom load tests for testing WebSockets.<\/p>\n<h3>Files Required<\/h3>\n<ul>\n<li>Custom Test Class :\u00a0<a href=\"https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/WebSocketLoadTest.php\">https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/WebSocketLoadTest.php<\/a><\/li>\n<li>composer.json to include dependencies :\u00a0<a href=\"https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/composer.json\">https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/composer.json<\/a><\/li>\n<\/ul>\n<h3>WebSockets Client package<\/h3>\n<ul>\n<li>https:\/\/github.com\/Textalk\/websocket-php\n<ul>\n<li>from <a href=\"https:\/\/github.com\/fiddur\">Fredrik Liljegren<\/a> @\u00a0TextTalk<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Running Test<\/h3>\n<ol>\n<li>Select CustomTest<\/li>\n<li>Add Custom Test Class<\/li>\n<li>Add composer.json with dependencies\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1864\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/Custom-WebSocket-Load-Test.png\" alt=\"Custom WebSocket Load Test\" width=\"1030\" height=\"335\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/Custom-WebSocket-Load-Test.png 1030w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/Custom-WebSocket-Load-Test-300x98.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/Custom-WebSocket-Load-Test-1024x333.png 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/Custom-WebSocket-Load-Test-768x250.png 768w\" sizes=\"auto, (max-width: 1030px) 100vw, 1030px\" \/><\/li>\n<\/ul>\n<\/li>\n<li>Enable the composer plugin for Custom tests\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1862\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/WebSocket-Custom-Load-Test-Enable-Composer.png\" alt=\"WebSocket Custom Load Test Enable Composer\" width=\"1001\" height=\"239\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/WebSocket-Custom-Load-Test-Enable-Composer.png 1001w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/WebSocket-Custom-Load-Test-Enable-Composer-300x72.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/WebSocket-Custom-Load-Test-Enable-Composer-768x183.png 768w\" sizes=\"auto, (max-width: 1001px) 100vw, 1001px\" \/><\/li>\n<\/ul>\n<\/li>\n<li>Select Your # Users and Cloud Options\n<ul>\n<li><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1865\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/WebSocket-Cloud-Options.png\" alt=\"WebSocket Cloud Options\" width=\"766\" height=\"298\" \/><\/li>\n<\/ul>\n<\/li>\n<li>Run your Test\n<ul>\n<li>Example Test\u00a0<a href=\"https:\/\/www.redline13.com\/share\/testplan\/26555\">https:\/\/www.redline13.com\/share\/testplan\/26555<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Example to write custom load tests for testing WebSockets. Files Required Custom Test Class :\u00a0https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/WebSocketLoadTest.php composer.json to include dependencies :\u00a0https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/composer.json WebSockets Client package https:\/\/github.com\/Textalk\/websocket-php from Fredrik Liljegren @\u00a0TextTalk Running Test Select CustomTest Add Custom Test Class Add composer.json with dependencies Enable the composer plugin for Custom tests Select Your # Users and Cloud Options Run your Test Example Test\u00a0https:\/\/www.redline13.com\/share\/testplan\/26555 &nbsp; &nbsp; &nbsp;<a class=\"more-link\" href=\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,10],"tags":[318,398,551],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-user","4":"post-1855","6":"format-standard","7":"category-blog","8":"category-php","9":"post_tag-load-testing","10":"post_tag-php","11":"post_tag-websockets"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>CustomTest for Load Testing WebSockets - 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\/2016\/04\/customtest-for-load-testing-websockets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CustomTest for Load Testing WebSockets - RedLine13\" \/>\n<meta property=\"og:description\" content=\"Example to write custom load tests for testing WebSockets. Files Required Custom Test Class :\u00a0https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/WebSocketLoadTest.php composer.json to include dependencies :\u00a0https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/composer.json WebSockets Client package https:\/\/github.com\/Textalk\/websocket-php from Fredrik Liljegren @\u00a0TextTalk Running Test Select CustomTest Add Custom Test Class Add composer.json with dependencies Enable the composer plugin for Custom tests Select Your # Users and Cloud Options Run your Test Example Test\u00a0https:\/\/www.redline13.com\/share\/testplan\/26555 &nbsp; &nbsp; &nbsp;Read More &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/\" \/>\n<meta property=\"og:site_name\" content=\"RedLine13\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-14T21:57:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/Custom-WebSocket-Load-Test.png\" \/>\n<meta name=\"author\" content=\"RedLine13\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"RedLine13\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/\"},\"author\":{\"name\":\"RedLine13\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28\"},\"headline\":\"CustomTest for Load Testing WebSockets\",\"datePublished\":\"2016-04-14T21:57:01+00:00\",\"dateModified\":\"2016-04-14T21:57:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/\"},\"wordCount\":94,\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"keywords\":[\"Load Testing\",\"php\",\"websockets\"],\"articleSection\":[\"Blog\",\"Custom PHP\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/\",\"name\":\"CustomTest for Load Testing WebSockets - RedLine13\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\"},\"datePublished\":\"2016-04-14T21:57:01+00:00\",\"dateModified\":\"2016-04-14T21:57:01+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redline13.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CustomTest for Load Testing WebSockets\"}]},{\"@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\/4acbcdcb8a9c72ec5a274e69c0ebea28\",\"name\":\"RedLine13\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g\",\"caption\":\"RedLine13\"},\"sameAs\":[\"http:\/\/127.0.0.1\"],\"url\":\"https:\/\/www.redline13.com\/blog\/author\/user\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CustomTest for Load Testing WebSockets - 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\/2016\/04\/customtest-for-load-testing-websockets\/","og_locale":"en_US","og_type":"article","og_title":"CustomTest for Load Testing WebSockets - RedLine13","og_description":"Example to write custom load tests for testing WebSockets. Files Required Custom Test Class :\u00a0https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/WebSocketLoadTest.php composer.json to include dependencies :\u00a0https:\/\/github.com\/redline13\/custom-loadtests\/blob\/master\/composer.json WebSockets Client package https:\/\/github.com\/Textalk\/websocket-php from Fredrik Liljegren @\u00a0TextTalk Running Test Select CustomTest Add Custom Test Class Add composer.json with dependencies Enable the composer plugin for Custom tests Select Your # Users and Cloud Options Run your Test Example Test\u00a0https:\/\/www.redline13.com\/share\/testplan\/26555 &nbsp; &nbsp; &nbsp;Read More &rarr;","og_url":"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/","og_site_name":"RedLine13","article_published_time":"2016-04-14T21:57:01+00:00","og_image":[{"url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2016\/04\/Custom-WebSocket-Load-Test.png"}],"author":"RedLine13","twitter_card":"summary_large_image","twitter_misc":{"Written by":"RedLine13"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/#article","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/"},"author":{"name":"RedLine13","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/4acbcdcb8a9c72ec5a274e69c0ebea28"},"headline":"CustomTest for Load Testing WebSockets","datePublished":"2016-04-14T21:57:01+00:00","dateModified":"2016-04-14T21:57:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/"},"wordCount":94,"publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"keywords":["Load Testing","php","websockets"],"articleSection":["Blog","Custom PHP"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/","url":"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/","name":"CustomTest for Load Testing WebSockets - RedLine13","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/#website"},"datePublished":"2016-04-14T21:57:01+00:00","dateModified":"2016-04-14T21:57:01+00:00","breadcrumb":{"@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redline13.com\/blog\/2016\/04\/customtest-for-load-testing-websockets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redline13.com\/blog\/"},{"@type":"ListItem","position":2,"name":"CustomTest for Load Testing WebSockets"}]},{"@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\/4acbcdcb8a9c72ec5a274e69c0ebea28","name":"RedLine13","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514?s=96&d=mm&r=g","caption":"RedLine13"},"sameAs":["http:\/\/127.0.0.1"],"url":"https:\/\/www.redline13.com\/blog\/author\/user\/"}]}},"_links":{"self":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/1855","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/comments?post=1855"}],"version-history":[{"count":0,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/posts\/1855\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media?parent=1855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/categories?post=1855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/tags?post=1855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}