<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Flood.io on Nicole van der Hoeven</title><link>https://nicolevanderhoeven.com/tags/flood.io/</link><description>Recent content in Flood.io on Nicole van der Hoeven</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>Nicole van der Hoeven</copyright><lastBuildDate>Mon, 17 Jan 2022 16:30:07 +0100</lastBuildDate><atom:link href="https://nicolevanderhoeven.com/tags/flood.io/index.xml" rel="self" type="application/rss+xml"/><item><title>Testing tool cheat sheet for load testers who don't just care about numbers</title><link>https://nicolevanderhoeven.com/blog/20220117-testing-tool-cheat-sheet-for-load-testers-who-dont-just-care-about-numbers/</link><pubDate>Mon, 17 Jan 2022 16:30:07 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20220117-testing-tool-cheat-sheet-for-load-testers-who-dont-just-care-about-numbers/</guid><description>&lt;p&gt;It&amp;rsquo;s not enough to decide &lt;em&gt;how much&lt;/em&gt; load you want to generate. You also have to know &lt;em&gt;how&lt;/em&gt; you&amp;rsquo;re generating it.&lt;/p&gt;
&lt;p&gt;Your approach affects what part of your application is tested, the results returned, and the budget you&amp;rsquo;ll need to run your test.&lt;/p&gt;
&lt;p&gt;Here are three main categories of load testing tools:&lt;/p&gt;
&lt;h2 id="protocol-based-load-testing-tools"&gt;Protocol-based load testing tools:&lt;/h2&gt;
&lt;p&gt;These tools simulate the underlying messages sent back and forth between an application and a client.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Choose a protocol-based tool if&lt;/em&gt;: you want to generate massive load, you want to load test before components are integrated, you want to test APIs, or you are budget-conscious.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Best in class tools&lt;/em&gt;: Gatling, JMeter, k6, Locust, Neoload&lt;/p&gt;
&lt;h2 id="browser-based-load-testing-tools"&gt;Browser-based load testing tools:&lt;/h2&gt;
&lt;p&gt;These tools automate real user interactions with an interface.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Choose a browser-based tool if:&lt;/em&gt; you want to measure end-to-end performance, you want to reuse your browser automation scripts, you want front-end performance metrics, or you have a higher budget.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Best in class tools:&lt;/em&gt; Cypress, Flood Element, k6, Playwright, Puppeteer&lt;/p&gt;
&lt;h2 id="hybrid-load-testing-tools"&gt;Hybrid load testing tools:&lt;/h2&gt;
&lt;p&gt;This approach is a mixture of the previous two. You can do this in a few ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use a protocol tool to generate the majority of the load, and a browser tool for a handful of virtual users &lt;em&gt;(best functionality, highest effort/cost)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Use a browser-based tool for all load &lt;em&gt;(expensive, simplest)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Find a tool that can do both &lt;em&gt;(ideal solution, few options)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="whatever-you-choose-compare-like-with-like"&gt;Whatever you choose, compare like with like.&lt;/h2&gt;
&lt;p&gt;Happy testing!&lt;/p&gt;</description></item><item><title>How to Become a Load Tester</title><link>https://nicolevanderhoeven.com/blog/20201007-how-to-become-a-load-tester/</link><pubDate>Wed, 07 Oct 2020 14:15:45 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20201007-how-to-become-a-load-tester/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/how-to-become-a-load-tester"&gt;
&lt;p&gt;&lt;em&gt;&lt;a href="https://www.flood.io/blog/how-to-become-a-load-tester"&gt;Originally posted here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Load testing can be a pretty intimidating field to get into, but it&amp;rsquo;s easy to get started. Here are some concrete steps you can take to start learning how to load test from scratch.&lt;/p&gt;
&lt;p&gt;In this video, Flood co-founder Tim Koopmans and I teamed up at Tricentis User Conference 2020 to talk about the essential ingredients for load testing.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/_R2dmEmtO48?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="background-required-for-load-testing"&gt;Background required for load testing&lt;/h2&gt;
&lt;p&gt;Load testing can be quite technical. It involves not just the ability to use different programming languages to create load testing scripts but also familiarity with software engineering practices, DevOps, application infrastructure, site reliability, and networking. A good load tester needs to be able to understand the basics of how an application works and how different components interact with each other. It&amp;rsquo;s common for a load tester to work on applications employing a variety of technologies, so staying up to date with recent technological trends and switching seamlessly from one language to another, or from one platform to another, is of utmost importantance. This technical side of load testing might make you think that a load tester needs to have formal studies in computer science and several years of experience in software testing. The reality is that there are many load testers who stumbled into the field from wildly unexpected backgrounds. So you might think load testing looks like this:&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester01.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Photo by &lt;a href="https://unsplash.com/@wocintechchat?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Christina @ wocintechchat.com&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/meeting?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;And sometimes it does. But it more often looks something like this:&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester02.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Photo by &lt;a href="https://unsplash.com/@youxventures?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;You X Ventures&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/meeting?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You see, load testing is an interdisciplinary field. So much of the job involves talking to people. Sometimes the requirements for a project are not clear, and someone needs to talk to the both the business and the developers to make sure that nonfunctional requirements are clarified. A load tester is a detective, tracing a request as it goes from one application component to another, coordinating with different application teams. A load tester is a scientist, using the scientific method to design experiments that yield the results. A load tester is a statistician, making sense of a jumble of data and seeking correlations between variables. A load tester is a public speaker. Even when the actual load testing has been completed and the report has been sent, a load tester makes sure all stakeholders understand the report so that the results can be used to make meaningful changes to improve application performance. All these tasks require a mishmash of skills and competencies that can be difficult to find in just the field of computer science.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s take our backgrounds as anecdotal examples.&lt;/p&gt;
&lt;p&gt;Tim grew up and currently lives in a small country town in Australia, and he joined the military straight after school. He later developed a love of automating things, which led him first to use tools like perl to scrape websites and try to win bids with early versions of ebay, and then later to starting a performance engineering consulting career and co-founding Flood itself.&lt;/p&gt;
&lt;p&gt;I, Nicole, grew up in Metro Manila in the Philippines (which has 14,000 more people per km2 than Mumbai does). I learned English as a foreign language in school, and I have a university degree in Economics. When I discovered load testing, I had a job in a completely different field– I was working for an airline and making sure engine components were properly maintained and repaired. My love for gadgets and technology took me down an 8-year rabbit hole involving doing performance consulting for clients across a variety of industries in Australia and the Netherlands. At Flood, I help customers around the world improve their application performance.&lt;/p&gt;
&lt;p&gt;As you can see, Tim and I came from very different backgrounds and different parts of the world. Neither of us knew what load testing even was when we started working. Neither of us got formal instruction in load testing. But somehow, we still both ended up becoming load testers at Flood.&lt;/p&gt;
&lt;h2 id="reasons-to-become-a-load-tester"&gt;Reasons to become a load tester&lt;/h2&gt;
&lt;p&gt;So why become a load tester? Here are some practical reasons.&lt;/p&gt;
&lt;h3 id="load-testing-is-cool"&gt;Load testing is cool&lt;/h3&gt;
&lt;p&gt;A little-known fact about load testing is that it can be really satisfying to be involved in big-name projects that end up going live.&lt;/p&gt;
&lt;p&gt;You may have heard of Flood. But even if you haven’t, we’re sure you&amp;rsquo;re familiar with the results of load testing done on Flood. In the last few years, we have been helping Hotstar, one of the largest streaming services in the world, load test their systems in preparation for the Indian Premier League.&lt;/p&gt;
&lt;p&gt;Hotstar uses an open-source tool that we support, Gatling, to create scripts to simulate users tuning in to watch cricket games. Then, they use Flood to create a “Game Day” simulation. They scale up those load tests and run 5 million users on thousands of machines in the cloud. We help them coordinate execution, spot problems quickly with real-time results from all those machines while the test is still running, and identify bottlenecks so that they don’t occur in production, when India’s playing.&lt;/p&gt;
&lt;p&gt;As a load tester, you&amp;rsquo;ll definitely be working with brands you recognize and love.&lt;/p&gt;
&lt;h3 id="load-testing-can-pay-well"&gt;Load testing can pay well&lt;/h3&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester03.png" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://www.payscale.com/research/IN/Job=Software_Tester/Salary"&gt;Payscale&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester04.png" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://www.payscale.com/research/IN/Job=Performance_Engineer/Salary"&gt;Payscale&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I said this would be a practical list, right?&lt;/p&gt;
&lt;p&gt;Here are 261,768 practical reasons. The average performance engineer’s salary is 71% more than that of an average software tester in India, according to Payscale.com. We all know that money isn’t everything, but this is a clear signal from the market about the importance of performance-related skills. Adding load testing to your CV as a tester makes you more attractive to employers. It’s a great way to differentiate yourself in an over-saturated market.&lt;/p&gt;
&lt;h3 id="load-testing-can-literally-take-you-places"&gt;Load testing can literally take you places&lt;/h3&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester05.png" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://twitter.com/shamim_j"&gt;Shamim&lt;/a&gt; from &lt;a href="https://www.flood.io/blog/inside-the-career-of-a-digital-nomad-is-a-life-on-the-road-right-for-you"&gt;Flood&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Then there are the side benefits of being in load testing. The photos above are real ones from the Flood team. That’s me on the upper left, exploring a castle in Belgrade, Serbia, and that’s Tim in the bottom right, taking a photo in San Francisco, USA.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.flood.io/blog/inside-the-career-of-a-digital-nomad-is-a-life-on-the-road-right-for-you"&gt;We’re a fully distributed team on Flood&lt;/a&gt;, which means we can work from anywhere. Flood is a web app, so you don’t need to install anything– I’ve been known to start load tests from my iPad in a café. Load testing on the cloud frees you from being tied to running tests from the office. You can start load generators when you need them and shut them down when you don’t– all from a web browser. It’s a job that can come with a great work/life balance, if you find the right company.&lt;/p&gt;
&lt;p&gt;Load testing can also be a great way to move to another country. It’s what’s allowed me to move to other countries– twice. In Australia, the average performance engineer’s salary is AU$108,053, or over 5.6 million rupee.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester06.png" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://www.payscale.com/research/AU/Job=Performance_Engineer/Salary"&gt;Payscale&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So it’s clear that there are some pretty good reasons for you to become a load tester. I&amp;rsquo;m going to walk you through the practical steps to become a load tester. You may not be an expert by the end of this, but I hope I can convince you that you can get started in load testing whether your background looks like Tim’s or mine.&lt;/p&gt;
&lt;h3 id="load-testing-adds-real-value"&gt;Load testing adds real value&lt;/h3&gt;
&lt;p&gt;And the trite, but absolutely true reason: Everyone fails.&lt;/p&gt;
&lt;p&gt;As a load tester, you are a gatekeeper of quality. What you do directly affects revenue and customer experience.&lt;/p&gt;
&lt;p&gt;Performance is an aspect of software that is often overlooked, but it’s only becoming more important in a world where everything is going online. People are being born who have never known what it’s like not to have the internet, and consumers in general expect applications to be responsive and stable. Would-be customers who can’t get an e-commerce site to load within 3 seconds may switch to a competitor’s site, and we all know there are many of them. Performance-related outages can be seriously damaging to a company’s reputation, and social networking amplifies customer dissatisfaction by effectively giving everyone a megaphone to complain into.&lt;/p&gt;
&lt;p&gt;Software functionality is still important. However, if an online store goes live with no critical functional defects, but it fails when the 100th person logs into it, or it takes 10 seconds to load the homepage, can you really say that it was ready for production?&lt;/p&gt;
&lt;p&gt;Load testing is a crucial part of ensuring software quality, and quality is the responsibility of everyone on a team, even if the word “performance” isn’t in your job title.&lt;/p&gt;
&lt;h2 id="the-essential-ingredients-of-a-load-test"&gt;The essential ingredients of a load test&lt;/h2&gt;
&lt;p&gt;Load testing is like cooking a meal. This is one of Tim&amp;rsquo;s favorite dishes, aloo matar.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester07.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://www.cubesnjuliennes.com/aloo-matar-recipe/"&gt;Cubes n Juliennes&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;You can approach cooking as a science. There are recipes with a list of ingredients, a precise measurement of how much you need for each, and a procedure for creating the dish.&lt;/p&gt;
&lt;p&gt;But you can also look at cooking as an art. Cooking the same dish over and over again will give you an experience in working with those ingredients that a novice cook won’t have. There’s room in cooking for adding one ingredient, changing the quantity of another, or just trying something new.&lt;/p&gt;
&lt;p&gt;A master chef knows how to use both the science and the art to create something delicious. But you don’t HAVE to be at that level in order to cook.&lt;/p&gt;
&lt;p&gt;Anyone can cook. If you know how to follow a basic recipe, you may not create a masterpiece, but if you’re like me and you haven’t had lunch yet, you’ll still end up with something you’ll eat.&lt;/p&gt;
&lt;p&gt;So here’s the recipe for load testing.&lt;/p&gt;
&lt;p&gt;I prefer kadai paneer myself, but aloo matar requires, among other things, peas. And so does load testing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;P is Preparation&lt;/strong&gt;. To prepare for a load test, you need to get your ingredients ready. You need to decide what it is you want to test, why you’re testing it, and how. You write load testing scripts that will simulate real users as closely as possible.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;E is Execution&lt;/strong&gt;. This is when you do the actual cooking. You run your load tests and scale them up according to your requirements.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A is Analysis&lt;/strong&gt;. You figure out whether the dish you created is edible. You determine how your application servers responded during the load test, and decide if that’s acceptable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Preparation – Execution – Analysis.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="preparing-for-a-load-test"&gt;Preparing for a load test&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;“As far as the World Cup is concerned, it is a process. We don’t want to jump to the 50th floor straight away. We must start on the ground floor.” - Sachin Tendulkar, via &lt;a href="https://www.espncricinfo.com/story/_/id/22538610/world-cup-final-dream-tendulkar"&gt;ESPN&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Load testing doesn’t start with writing a script. Load testing starts with building a foundation for later tests.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester08.png" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://www.insidesport.co/cricket-sachin-tendulkar-comes-to-aid-of-ailing-ashraf-who-once-fixed-his-bats/"&gt;Inside Sport&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Part of that foundation is asking WHY. Why do you want to do a load test? Has there been a performance-related issue before? Are you trying to determine whether an application is ready to go live, or is it already live, and you just want to improve its performance? What type of application do you want to test?&lt;/p&gt;
&lt;p&gt;WHOM are you cooking for? I think you’d cook differently for yourself than you would for Sachin Tendulkar. What do your end users typically do on your site? Where do they come from?&lt;/p&gt;
&lt;p&gt;These are questions that need to be answered before you think about scripting. Here are some resource for planning your load tests:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.flood.io/blog/start-with-why-how-to-write-requirements-for-api-load-testing"&gt;Start with Why: How to write requirements for API load testing&lt;/a&gt;
&lt;a href="https://www.flood.io/blog/how-to-write-a-test-plan-for-load-testing"&gt;How to write a test plan for load testing&lt;/a&gt;
&lt;a href="https://guides.flood.io/ebooks/api-load-testing/scripting-an-api-load-test"&gt;Selecting a tool for load testing&lt;/a&gt;
Generating a load testing script without coding: &lt;a href="https://guides.flood.io/overview-of-flood/scripting-your-load-test"&gt;Getting Started with Test Builder&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="execution-of-a-load-test"&gt;Execution of a load test&lt;/h2&gt;
&lt;p&gt;So now we’re ready to start cooking. This is the Execution phase. You’ll need a machine to use as a load generator. Depending on the number of users you want to run with, you may need more than one machine. You might be tempted to run a load test on your laptop, or on a bunch of machines you have lying around, but that introduces new variables that may affect the results.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester09.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://unsplash.com/@suicide_chewbacca?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Ashwini Chaudhary&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/indian-food?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Like any good cook, you’ll also need to make sure you have all your ingredients handy. In load testing, that means making sure your scripts and test data files are ready to be executed on every load generator.&lt;/p&gt;
&lt;p&gt;Both of these problems – provisioning a load generator and transferring files over to them – are solved pretty easily by running on the cloud using something like Flood.&lt;/p&gt;
&lt;p&gt;Designing and executing your load test&lt;/p&gt;
&lt;p&gt;Where should you run your load tests? A look at demand, hosted, and on-premise infrastructure&lt;/p&gt;
&lt;h2 id="analysis-of-results"&gt;Analysis of Results&lt;/h2&gt;
&lt;p&gt;The last part is Analysis.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester10.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://www.finedininglovers.com/recipes/brunch/potato-pakoras-yogurt-sauce"&gt;Fine Dining Lovers&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This is a pretty crucial moment, because this is when you figure out whether what you cooked was delicious or not. Unfortunately, in load testing, it’s not always easy to tell how your test went. It’s like this photo of pakora (onion is my favorite kind). It’s kind of hard to say what expression that is in their faces. Is it disgust? Or is the pakora so yummy that they just can’t wait to eat more?&lt;/p&gt;
&lt;p&gt;Load testing typically generates a LOT of data. You’d have to go copy every single file from every load generator you used. But can you imagine the hundreds of load generators that Hotstar used? Of course they didn’t manually copy those files. Instead, they used Flood.&lt;/p&gt;
&lt;p&gt;On Flood, we show real-time graphs as you’re running the test so that you can tell immediately whether transactions are failing or whether a server has stopped responding.&lt;/p&gt;
&lt;p&gt;After the test, you can also compare this data to previous tests to spot trends, or even create your own dashboards using an analytics engine.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://guides.flood.io/results-analysis/metrics-during-test"&gt;Real-time metrics during your load test&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://guides.flood.io/results-analysis/archived-results"&gt;Downloading results and logs after the test&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="is-that-it"&gt;Is that it?&lt;/h2&gt;
&lt;p&gt;You’ve prepared for a load test, you’ve executed a load test, and you’ve analysed the results from the load test. Congratulations, you’re a load tester! By following this recipe, you’re already doing better than many people, and you’re certainly doing a lot better than those who do not run any load tests at all.&lt;/p&gt;
&lt;p&gt;The cool thing about load testing, though, is that this is just the beginning. There’s always room for improvement.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-become-a-load-tester11.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://popupcity.net/observations/dabbawalla-hot-lunch-delivery-by-mumbais-fastest/"&gt;Pop Up City&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Dabbawallas are people who deliver hot lunches, and while the concept is not new, the implementation in India is particularly interesting.&lt;/p&gt;
&lt;p&gt;For these dabbawallas, having the meals prepared is not the end of the job. Once the food is ready, it needs to be packed into lunchboxes, picked up, separated according to destination, put on trains, and delivered. Later, the empty lunchboxes are picked up, and the system works in reverse.&lt;/p&gt;
&lt;p&gt;It turns out that this is actually a pretty sophisticated system. In fact, it’s been estimated that only one tiffin every two months is not delivered. That’s equivalent to a &lt;a href="https://www.bbc.com/future/article/20170114-the-125-year-old-network-that-keeps-mumbai-going"&gt;Six-Sigma quality rating of 99.9999999%&lt;/a&gt; (that’s nine nines) or more.&lt;/p&gt;
&lt;p&gt;Dabbawallas didn’t get that rating just by delivering quickly. They did it by being consistent and reliable. They did it by having a process.&lt;/p&gt;
&lt;p&gt;Once you see the benefits of running a load test, you may also start to understand that the real value of load testing is not in a test that you run once whenever you think of it. Imagine having the benefits of a load test tied to your development process, so that it is automated.&lt;/p&gt;
&lt;p&gt;As an advanced topic, &lt;a href="https://www.flood.io/blog/load-testing-in-devops-pipelines-with-azure-and-flood"&gt;adding your load testing&lt;/a&gt; to your team&amp;rsquo;s Continuous Integration/Continuous Development pipelines such as sets up a repeatable process that reaps benefits far into the future, not just whenever official load testing activities are carried out.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://guides.flood.io/continuous-integration/what-is-continuous-integration"&gt;Continuous Integration with Flood&lt;/a&gt;: Integrating Travis CI, Circle CI, and Jenkins&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;So that’s the recipe for becoming a load tester.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Preparation – Execution – Analysis.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;Preparation&lt;/strong&gt;, you determine why you’re testing and what tool best fits your needs. We showed you how to use Element, but there are many open source tools out there. Don’t get overwhelmed by scripting– a lot of times it can just mean replacing a URL with the one YOU want to test.&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;Execution&lt;/strong&gt;, you run a baseline test that will serve as a point of comparison for future testing, choose the number of users and the number of regions you want, and then you run your test. Running on the cloud is the easiest (and usually cheapest) way to get started.&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;Analysis&lt;/strong&gt;, you view the results in real-time, compare historical performance to see trends, and share reports to stakeholders so that your team can make changes to your application.&lt;/p&gt;
&lt;p&gt;We also talked about the bonus topic of &lt;strong&gt;CI/CD&lt;/strong&gt; and how you can incorporate load testing into your pipeline to get a continuous feedback during your development cycle.&lt;/p&gt;
&lt;p&gt;Tim and I started in very different places and had different experiences before we discovered load testing. But eventually, we ended up on the same path, and that’s what we’ve outlined for you here. We hope that this convinces you that load testing doesn’t have to be complicated.&lt;/p&gt;
&lt;p&gt;You absolutely don’t need to be an expert to run a load test. Even if you don’t think you’ll get all these steps right, a load test that is less than ideal is still better than no load testing at all.&lt;/p&gt;
&lt;p&gt;In the end, anyone can be a load tester with the right attitude and the right tools.&lt;/p&gt;
&lt;h2 id="learning-about-load-testing"&gt;Learning about load testing&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.goodreads.com/book/show/1681559.High_Performance_Web_Sites"&gt;High Performance Websites&lt;/a&gt; book by Steve Souders&lt;/p&gt;
&lt;p&gt;Ministry of Testing/PerfBytes &lt;a href="https://www.ministryoftesting.com/dojo/lessons/a-quick-start-guide-to-learning-performance-testing"&gt;list of resources&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.perfbytes.com/"&gt;PerfBytes podcast&lt;/a&gt; (EN and ES)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://guildconferences.com/conference/perfguild-2020/"&gt;PerfGuild conferences&lt;/a&gt; by Joe Colantonio&lt;/p&gt;
&lt;p&gt;Señor Performo’s YouTube Channel: &lt;a href="https://www.youtube.com/channel/UCO-RlGccAUQnMqTaBkvUJhQ"&gt;Señor Performo ENG&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Scott Moore’s &lt;a href="https://www.youtube.com/watch?v=9H2GSGvGwqQ&amp;amp;list=PLXRCdih3vTUEFz1TVyP7RRqEEk__CYGoB"&gt;Performance Tour&lt;/a&gt; on YouTube&lt;/p&gt;</description></item><item><title>How to Write a Load Test Plan</title><link>https://nicolevanderhoeven.com/blog/20200921-how-to-write-a-load-test-plan/</link><pubDate>Mon, 21 Sep 2020 16:33:23 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200921-how-to-write-a-load-test-plan/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/how-to-write-a-test-plan-for-load-testing"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/how-to-write-a-test-plan-for-load-testing"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;People often start load testing by creating a script in their favorite load testing tool, but good load testing starts before that. Planning a load test may seem like a tedious exercise, but it is essential to ensuring the success of your testing.&lt;/p&gt;
&lt;p&gt;A test plan should answer why, what, who, when, and how the testing will be carried out.&lt;/p&gt;
&lt;p&gt;A good test plan, particularly for load testing, includes the following components:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Requirements&lt;/li&gt;
&lt;li&gt;Scope&lt;/li&gt;
&lt;li&gt;Entry criteria&lt;/li&gt;
&lt;li&gt;Workload modeling&lt;/li&gt;
&lt;li&gt;Server monitoring&lt;/li&gt;
&lt;li&gt;Test doubltes&lt;/li&gt;
&lt;li&gt;Test Scenarios&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We&amp;rsquo;ll dive into each of these, but first, a note on the format of a test plan.&lt;/p&gt;
&lt;h2 id="test-plan-format"&gt;Test Plan Format&lt;/h2&gt;
&lt;p&gt;Test plans have been traditionally presented as a document, but there&amp;rsquo;s no hard-and-fast rule. Instead, the length of a test plan, and the level of detail it goes into, should be tailored for the complexity of the project and the backgrounds of the stakeholders.&lt;/p&gt;
&lt;p&gt;Teams using Agile methodologies may not have a formal test plan at all, but I would argue that all teams should still have some sort of plan, whether it&amp;rsquo;s a Word document or a list of bullet points. Written plans clarify and communicate intent, and testing can be an expensive and fruitless exercise without a consensus on its intent.&lt;/p&gt;
&lt;p&gt;Technical documentation can be difficult to digest and understand, and that&amp;rsquo;s dangerous when it comes to software development and testing, where it&amp;rsquo;s imperative that all stakeholders are on the same page about the state of an application.&lt;/p&gt;
&lt;p&gt;Paul McLean, a performance engineer, has a creative solution for this. He creates a companion video for every technical report, giving stakeholders the option to read the written report for details but watch the video for a more high-level and nuanced explanation.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example of a companion video he created for a test plan:&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/FJj_7nyV3Ak?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;/h2&gt;
&lt;p&gt;Everything starts with requirements. Until requirements are identified, load testing can only ever be aimless and explanatory, and any performance bottlenecks spotted will be incidental.&lt;/p&gt;
&lt;p&gt;Requirements inform every step of the load testing process. Why are we doing load testing? What exactly do we want to test? How will we know when a test has passed or failed? How will we know if application performance is good enough to go into production? What does “good enough” mean?&lt;/p&gt;
&lt;p&gt;This is such an important part of the planning process that I felt it deserved its own blog post. See it here: &lt;a href="https://www.flood.io/blog/start-with-why-how-to-write-requirements-for-api-load-testing"&gt;Start with Why: How to Write Requirements for API Load Testing&lt;/a&gt;. Even though I specifically mention API load testing, the principles apply to load testing in general.&lt;/p&gt;
&lt;h2 id="scope"&gt;Scope&lt;/h2&gt;
&lt;p&gt;At Flood, we use a product development methodology called &lt;a href="https://basecamp.com/shapeup"&gt;Shape Up&lt;/a&gt; to keep us on track as we build new features. Projects in Shape Up are called &amp;ldquo;shaped work&amp;rdquo;, and one of the basic properties of shaped work is that it is bounded.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;hellip;shaped work [also] indicates what not to do. It tells the team where to stop. There’s a specific appetite—the amount of time the team is allowed to spend on the project. Completing the project within that fixed amount of time requires limiting the scope and leaving specific things out.- Ryan Singer, &lt;a href="https://basecamp.com/shapeup"&gt;Shape Up: Stop Running in Circles and Ship Work that Matters&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Defining scope is setting boundaries. Business priorities need to be weighed against the resource limitations (number of people available to do the work and time available) in order for testing to deliver maximum value.&lt;/p&gt;
&lt;p&gt;Some considerations for scope include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Specific features or key transactions to be tested&lt;/li&gt;
&lt;li&gt;Types of tests included (component test vs end-to-end test)&lt;/li&gt;
&lt;li&gt;Test scenarios (peak load test vs disaster recovery)&lt;/li&gt;
&lt;li&gt;Applications included in testing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As with most things in the planning phase, scope is something that can change during the test when unexpected circumstances arise or when priorities change. But it&amp;rsquo;s still a good practice to define the scope at the beginning, and update it as it changes.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/how-to-write-a-load-test-plan01.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s important, however, to &lt;em&gt;prune with intention&lt;/em&gt;. By keeping our objectives in mind, we can keep our work in line with our intentions.&lt;/p&gt;
&lt;h2 id="entry-criteria"&gt;Entry criteria&lt;/h2&gt;
&lt;p&gt;Occasionally, you may be asked to load test an application that isn&amp;rsquo;t ready to be load tested. This happens more often than you think. While it&amp;rsquo;s true that Performance Testing is something that should be baked into all software development from the beginning, this doesn&amp;rsquo;t hold true for Load Testing. Load testing is only one activity that falls underneath the broader umbrella of performance testing.&lt;/p&gt;
&lt;p&gt;Entry criteria are conditions that you need to be fulfilled before the testing actually begins. It’s a good idea to have these conditions communicated beforehand so that everyone is clear on what needs to be set up before you can do your job.&lt;/p&gt;
&lt;h3 id="functional-testing-does-the-application-work"&gt;Functional testing: Does the application work?&lt;/h3&gt;
&lt;p&gt;Load testing cannot realistically be carried out until at least the core functionality has been tested and high-severity defects have been fixed. Depending on the kind of load test you want to execute, you may also want to specify that UAT has been executed, as there’s no point doing an end-to-end load test with 1000 users if it doesn’t work for one user.&lt;/p&gt;
&lt;h3 id="load-testing-environment-is-it-production-like"&gt;Load Testing Environment: Is it production-like?&lt;/h3&gt;
&lt;p&gt;Nonfunctional testing has stricter requirements for an environment than does functional testing, and you may have to champion this cause. For load testing, it is not enough to have an application staging environment that is a virtual machine that is a quarter of the size of the production environment. It’s important to get as close to a production-like environment as possible in terms of capacity (memory, CPU), codebase (the actual build that will be deployed), and integrations with other environments or servers (if within test scope).&lt;/p&gt;
&lt;p&gt;Load testing is not linear: a response time of 5 seconds on a server with half the capacity of the production server does not necessarily equate to a response time of 2.5 seconds in production.&lt;/p&gt;
&lt;p&gt;This is also the time to think about your load injectors. Will they be on-premises, or in the cloud? A good entry criterion is the availability of the machines in the right network and with the right tools installed. If you’re using commercial tools, license provisioning should be a criterion. What sort of capacity will your load testing scripts require?&lt;/p&gt;
&lt;h3 id="support-are-there-people-available-with-expertise-in-key-components"&gt;Support: Are there people available with expertise in key components?&lt;/h3&gt;
&lt;p&gt;Load testing is a team activity. When a load test involves multiple application teams, it’s important to request availability of key persons on those teams during the test. Often as load testers, we are seen as working independently, but the truth couldn’t be farther from that. Load testing is a team sport. We need support from:&lt;/p&gt;
&lt;p&gt;business analysts who will be able to tell us how things are expected to work and what the current priorities are&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;developers whom we can consult when poorly performing code needs to be optimised&lt;/li&gt;
&lt;li&gt;functional testers who can show us how the application works&lt;/li&gt;
&lt;li&gt;DevOps engineers who can help us provision and monitor servers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;and many more!&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-write-a-load-test-plan02.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h3 id="test-data-do-you-have-dummy-data-for-your-virtual-users-to-interact-with"&gt;Test Data: Do you have dummy data for your virtual users to interact with?&lt;/h3&gt;
&lt;p&gt;Once you have as close a copy of the production environment as possible, keep in mind that it’s still a clean copy, which may not be realistic. If there are databases in production, how much data do they contain? The application server may respond differently when your test database is empty compared to when it must contend with gigabytes of data in the production database.&lt;/p&gt;
&lt;p&gt;Using production data for testing purposes can be dangerous, not to mention illegal, in certain circumstances. To avoid this, you can scrub sensitive data or generate your own, either by injecting records into a database or by writing an automation script to create data on the front-end. If you write a script, you may be able to reuse parts of it later for your load test.&lt;/p&gt;
&lt;h2 id="workload-modeling"&gt;Workload Modeling&lt;/h2&gt;
&lt;p&gt;A workload model is a schema describing the load profile for a given test scenario, and it involves determining what (the key transactions), how much (the load distribution among the transactions) and when (timing of the load) to test.&lt;/p&gt;
&lt;p&gt;Workload modeling can be the most difficult part of the testing process because it involves finding out how load test scripting can best mimic what is actually happening in production. It can also be the most critical.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s my account of working on a project in horse racing, where workload modeling was of particular importance: &lt;a href="https://www.flood.io/blog/workload-modeling-preparing-for-large-events-like-the-melbourne-cup"&gt;Workload Modeling - Preparing for Large Events like the Melbourne Cup&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-write-a-load-test-plan03.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;When you&amp;rsquo;re selling bets for the Melbourne Cup, every second matters.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="server-monitoring"&gt;Server monitoring&lt;/h2&gt;
&lt;p&gt;Executing a load test without monitoring server health is like flying blind. You’ll know when you land safely and you’ll know when you crash, but even if you do crash, you won’t know why—or how you can avoid it next time. Monitoring server health is the black box that will tell you what went wrong.&lt;/p&gt;
&lt;p&gt;For load testing, you&amp;rsquo;ll want to monitor the application servers that you&amp;rsquo;re testing as well as the load generators that you&amp;rsquo;re using to run the load tests themselves. That&amp;rsquo;s right; if you&amp;rsquo;re not watching carefully, the machines you run the load tests on can be the bottlenecks in themselves, causing unnecessary failures in your load tests.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://testguild.com/performance-test-resource-utilization/"&gt;Joe Colantonio&lt;/a&gt; goes over the basics of resource utilization in terms of four main areas of concern:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CPU&lt;/li&gt;
&lt;li&gt;Memory&lt;/li&gt;
&lt;li&gt;Disk&lt;/li&gt;
&lt;li&gt;Network&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://www.flood.io/blog/load-testing-tutorial-server-monitoring"&gt;Here&amp;rsquo;s another guide&lt;/a&gt; I put together on the basic metrics as well as some tools you can use to set up your monitoring.&lt;/p&gt;
&lt;p&gt;Regardless of which metrics you identify as key or which tools you use, you&amp;rsquo;ll want to make sure that they&amp;rsquo;re all set up to measure server health before you run your load tests.&lt;/p&gt;
&lt;h2 id="test-doubles"&gt;Test doubles&lt;/h2&gt;
&lt;p&gt;Part of the strategic planning around load testing is deciding which components need to be tested in conjunction with your stated requirements. Applications can sometimes be complex enough that load testing end-to-end is not feasible due to the number of teams involved or the cost of duplicating application infrastructure.&lt;/p&gt;
&lt;p&gt;Keeping it as simple as possible will lead to fewer dependencies, so it&amp;rsquo;s worth considering creating test doubles to isolate relevant components. Test doubles include stubs, mocks, and full virtual services.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/how-to-write-a-load-test-plan04.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;A test double is that part that replaces a complicated component that is not within scope. It’s a “dumber” version that responds to requests enough to allow you to go on with your load testing without actually requiring that component.&lt;/p&gt;
&lt;p&gt;Test doubles allow us to abstract out other components we don&amp;rsquo;t want to test so that we can concentrate on the one that we do. The point of a test double is to remove the variables and noise introduced by other parts of the application so that we can focus on testing how one component responds.&lt;/p&gt;
&lt;p&gt;If you are willing to put the time into creating a test double, you can drastically reduce the amount of resources you need to set up an environment and isolate components. Reducing variables in your test allows you to more quickly determine where performance bottlenecks lie.&lt;/p&gt;
&lt;h2 id="test-scenarios"&gt;Test Scenarios&lt;/h2&gt;
&lt;p&gt;A test scenario is the description of a contained situation or condition under which the application will be tested. A test scenario is usually based on several test cases and includes a plan for how these test cases will be executed.&lt;/p&gt;
&lt;p&gt;Choosing your test scenarios means deciding which situation is most likely to yield the data that you require. Employing several different types of scenarios will give you a greater understanding of your application’s capabilities. You should feel free to create your own scenarios that are uniquely tailored to your requirements, but here are some common scenarios to start out with. Take the number of users and durations mentioned as guidelines and not rules.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s what our Flooder amigo, Señor Performo, has to say about test scenarios:&lt;/p&gt;
&lt;p&gt;&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/EGzoAadzWwM?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;em&gt;Text version &lt;a href="https://www.flood.io/blog/ask-a-flooder-21-senor-performo-on-load-testing-scenarios"&gt;here&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Creating a test plan can seem daunting, but the process of writing it serves as a prompt for discussions among your team.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a &lt;a href="https://techbeacon.com/app-dev-testing/how-go-performance-tester-performance-engineer"&gt;pro tip from Scott Moore&lt;/a&gt;: Once you come up with a template you&amp;rsquo;re happy with, save it and reuse it for future projects. Modify it over time based on feedback to see progressive improvement.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Building a set of reusable documents and other deliverables (&amp;ldquo;templates&amp;rdquo;) to use in the initial planning phase and final reporting will speed your initial startup time. I recommend working with or learning from others with experience to build out some of these templates.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;‍When in doubt, remember that the format of a test plan is not as important as making sure it is meaningful and comprehensible for your team.&lt;/p&gt;
&lt;p&gt;‍For more information about the load testing process, check out &lt;a href="https://guides.flood.io/ebooks/api-load-testing"&gt;my book on API load testing&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Pros and Cons of API load testing</title><link>https://nicolevanderhoeven.com/blog/20200818-pros-and-cons/</link><pubDate>Tue, 18 Aug 2020 21:22:49 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200818-pros-and-cons/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/pros-and-cons-of-api-load-testing"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/pros-and-cons-of-api-load-testing"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;‍API load testing is one of the most popular ways to run a load test because of the number of open source and commercial load testing tools available on the market that support it. Creating a script to hit your application&amp;rsquo;s API endpoints is the traditional approach to load testing, but it&amp;rsquo;s not the only one.&lt;/p&gt;
&lt;p&gt;Here are some things to consider when deciding whether or not API load testing is right for your application.&lt;/p&gt;
&lt;h2 id="disadvantages-of-api-load-testing"&gt;Disadvantages of API load testing&lt;/h2&gt;
&lt;h3 id="api-load-testing-does-not-simulate-real-users-interacting-with-elements-of-your-webpage"&gt;API load testing does not simulate real users interacting with elements of your webpage.&lt;/h3&gt;
&lt;p&gt;‌In contrast to a customer opening up a browser and filling out forms on your site, an API load testing script will consist only of the underlying requests to the server that are made by clicking on those on-screen elements. Exactly how the customer triggers those requests, and what buttons they’ve pressed, is irrelevant. It’s all about the raw requests.‌&lt;/p&gt;
&lt;p&gt;The format of these requests will be dictated by the type of API your application uses, and it may take some technical knowledge or expertise to be able to formulate requests correctly. However, a RESTful API is one of the most common types, and it is considered to be relatively simple to use.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200818-01.png" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;HTTPS requests for amazon.com. This is what an API load testing script would need to replicate.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id="it-doesnt-give-you-an-idea-of-how-user-friendly-your-application-is"&gt;It doesn’t give you an idea of how user-friendly your application is.&lt;/h3&gt;
&lt;p&gt;‌API load testing tools don’t give you feedback on how long your pictures took to render on your users’ browsers or whether that “SUBMIT” button is in an obvious spot.&lt;/p&gt;
&lt;h3 id="it-doesnt-measure-front-end-performance-or-how-quickly-pages-render-in-different-browsers"&gt;‌It doesn’t measure front-end performance or how quickly pages render in different browsers.&lt;/h3&gt;
&lt;p&gt;‌While all the resources that the server returns can be downloaded by your tool of choice, there is no browser on which to run them.&lt;/p&gt;
&lt;h3 id="api-load-testing-doesnt-run-client-side-scripts"&gt;‌API load testing doesn’t run client-side scripts.&lt;/h3&gt;
&lt;p&gt;‌It isn’t what you’re looking for if your application is a single-page web app that relies heavily on JavaScript or AJAX to dynamically populate and update the page. Your load testing tool will download the scripts, but not execute them.‌&lt;/p&gt;
&lt;p&gt;‌This includes scripts like those required to trigger Google Analytics, which prompts many an engineer to question the results of an API load test due to the inability to see the traffic come in on Google Analytics. API load testing won’t help you with that. Running browser-level load tests using tools like &lt;a href="https://element.flood.io"&gt;Flood Element&lt;/a&gt; or &lt;a href="https://selenium.dev"&gt;Selenium&lt;/a&gt; may be more useful.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve decided that API load testing is not the best way to load test your application, you can look at browser-based load testing as an alternative.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200818-02.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Executing a browser-based load testing script using Flood Element.&lt;/em&gt;
‌&lt;/p&gt;
&lt;h2 id="advantages-of-api-load-testing"&gt;‌Advantages of API load testing&lt;/h2&gt;
&lt;p&gt;Now that we’ve talked about what API load testing isn’t good at, let’s talk about what it IS good at.&lt;/p&gt;
&lt;p&gt;‌### It allows you to load test specific servers rather than the whole stack.&lt;/p&gt;
&lt;p&gt;‌API load testing allows you to tailor your load testing by applying load only on particular servers. This is particularly useful in more complicated applications that involve several components and would require substantial effort to reproduce in a test environment. Using APIs, you can test only the functions you want to test.&lt;/p&gt;
&lt;h3 id="it-is-well-supported-"&gt;It is well-supported. ‌&lt;/h3&gt;
&lt;p&gt;API load testing has been around for decades. There are lots of robust tools you can choose from, both commercial and open-source, and many of these tools have large communities and extensive documentation around how to script the most common cases. It’s a far cry from the browser-level testing space, which is relatively new and sparsely populated by comparison.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200818-03.png" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;The &lt;a href="https://jmeter.apache.org/usermanual/index.html"&gt;JMeter site&lt;/a&gt; contains a wealth of information, including a User&amp;rsquo;s Manual&lt;/em&gt;
‍&lt;/p&gt;
&lt;h3 id="its-not-as-resource-intensive-as-browser-level-testing"&gt;It’s not as resource-intensive as browser-level testing.&lt;/h3&gt;
&lt;p&gt;You can simulate more users with API load testing than with browser-level load testing. Since most interactions on the browser-level get translated to requests anyway, generating load this way is incredibly efficient, allowing you to hit your server with requests while bypassing the UI layer and the resource overhead that that entails.&lt;/p&gt;
&lt;p&gt;For example, at &lt;a href="https://flood.io"&gt;Flood&lt;/a&gt; we’ve baselined some of the tools that we support to see how many users we can run on an AWS m5.xlarge instance:&lt;/p&gt;
&lt;p&gt;Selenium: 5 users
Flood Element: 20-40 users
JMeter: 1000 users
Gatling: 1000 users&lt;/p&gt;
&lt;p&gt;‌You’ll see that the browser-level test tools, Selenium and Flood Element, can run significantly fewer users on the same sized node as can the protocol-level tools, JMeter and Gatling. This isn’t due to an inefficiency in the tools but rather to the fact that browser-level tools inherently need more CPU and memory to start separate instances of browsers per user and render pages graphically. You can run more users per node (or machine) by carrying out API load testing with protocol-level tools.&lt;/p&gt;
&lt;h3 id="its-cheaper"&gt;It’s cheaper.&lt;/h3&gt;
&lt;p&gt;‌The efficiency in resource utilization translates directly into cost savings because every node that you don’t need to execute your tests on is one fewer node that you’ll have to pay to provision (whether on premises or in the cloud).&lt;/p&gt;
&lt;p&gt;‌For this reason, API load testing is one of the most cost-efficient ways you can get started with load testing, allowing you to scale up your load relatively cheaply while getting immediate results.&lt;/p&gt;
&lt;h2 id="how-to-get-started-with-api-load-testing"&gt;How to get started with API load testing&lt;/h2&gt;
&lt;p&gt;API load testing isn&amp;rsquo;t for every application, but depending on your test scenario, it may be the easiest way to test application performance.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re new to non-functional testing or API load testing in particular and would like some step-by-step tutorials on how to get started, check out my free ebook, &lt;a href="https://guides.flood.io/ebooks/api-load-testing"&gt;API Load Testing: A Beginner&amp;rsquo;s Guide&lt;/a&gt;. It takes you through the basics of API load testing, including planning your first load test, selecting an open source tool, scripting, executing a test on the cloud, analyzing results, and even integrating it into your CI/CD pipelines.&lt;/p&gt;</description></item><item><title>Performance testing the Dutch coronavirus hotline</title><link>https://nicolevanderhoeven.com/blog/20200813-dutch-coronavirus-hotline/</link><pubDate>Thu, 13 Aug 2020 22:18:04 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200813-dutch-coronavirus-hotline/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/performance-testing-the-story-of-the-dutch-coronavirus-hotline"&gt;
&lt;p&gt;&lt;em&gt;Read the original Dutch version &lt;a href="https://nicolevanderhoeven.com/blog/20200704-performanceverbeteringen-voor-de-coronalijn/"&gt;here&lt;/a&gt;.&lt;/em&gt;
&lt;em&gt;This English version was first posted &lt;a href="https://www.flood.io/blog/performance-testing-the-story-of-the-dutch-coronavirus-hotline"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;On June 1st, 2020, the National Institute of Health and Environment (RIVM) announced that everyone with certain symptoms could call the hotline 0800-1202 to arrange a free COVID-19 test. The promise: call today, get tested tomorrow, and receive the results the day after that. The reality, though, did not live up to expectations.&lt;/p&gt;
&lt;p&gt;The opening day of the hotline was chaotic, and many Dutch people reported connection problems due to a system overload. Yet this could have been prevented with a better understanding of how human psychology can affect application performance.&lt;/p&gt;
&lt;h2 id="the-situation"&gt;The situation&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://nos.nl/collectie/13824/artikel/2335758-ggd-en-klaar-voor-massaal-testen-tijd-van-limiterende-factoren-voorbij"&gt;According to Dr. Ann Vossen&lt;/a&gt;, chairperson of the task force charged with scaling up mass testing in the Netherlands, the country was ready to process 30,000 tests per day. This number corresponds to &lt;a href="https://nos.nl/artikel/2335790-drukte-op-nieuw-telefoonnummer-voor-coronatests-0800-1202.html"&gt;the national capacity&lt;/a&gt; of all the municipal health clinics (GGDs) in the Netherlands. Despite this claim, though, &lt;a href="https://www.ad.nl/binnenland/liefst-323-000-telefoontjes-naar-nieuw-nummer-voor-coronatest-systemen-overbelast~a16a9a50"&gt;only 1,146 people were actually tested&lt;/a&gt; on the first day of testing (the day after the opening of the hotline). Perhaps more importantly, only 5,748 appointments were set on June 1st. The situation was no doubt exacerbated by the overwhelming 323,000 people who called the hotline on its first day, prompting even the telephone operators to admit that &lt;a href="https://www.volkskrant.nl/nieuws-achtergrond/coronatestnummer-kampt-met-kinderziektes-maar-ggd-s-kunnen-de-drukte-goed-aan~b2f332d2/"&gt;they&amp;rsquo;d had troubles&lt;/a&gt; logging into the appointment system.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200704-01.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Bron: From &lt;a href="https://twitter.com/GGDGHORNL/status/1267351996379643906"&gt;@ggdghornl&lt;/a&gt;, Twitter&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;[&amp;ldquo;We see that there are many calls going to 0800-1202. You can call for an appointment until 8pm tonight. Please try your call later to avoid long wait times.&amp;rdquo;]&lt;/p&gt;
&lt;p&gt;On Twitter, users shared horror stories: one claimed to have &lt;a href="https://twitter.com/Ed_van_Iterson/status/1267429180347691011"&gt;waited on the line for 6 hours&lt;/a&gt;, only to be told that the system was down and no appointments could be made; another complained about &lt;a href="https://twitter.com/maticus_spazz/status/1267374692941418496"&gt;getting disconnected&lt;/a&gt; after getting in touch with an operator. Yet another &lt;a href="https://twitter.com/leovanlinden/status/1267408142813605888"&gt;posted a video&lt;/a&gt; of calling the hotline and a recorded message saying &amp;ldquo;Al onze medewekers zijn op dit moment in gesprek. We zullen u zo snel mogelijk te woord staan. [All of our operators are currently on other calls. We will answer you as soon as possible].&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The second day was somewhat better: &lt;a href="https://www.volkskrant.nl/nieuws-achtergrond/coronatestnummer-kampt-met-kinderziektes-maar-ggd-s-kunnen-de-drukte-goed-aan~b2f332d2/"&gt;there were 11,000 appointments made&lt;/a&gt;, partly because of the lower amount of phone calls and partly because of some fixes of technical problems. In the first week, the number of appointments increased to 50,000 (about 7,142 per day), which was still significantly lower than expected.&lt;/p&gt;
&lt;p&gt;There are some lessons that we can learn from this case study.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200704-02.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: Coronavirus test procedure from &lt;a href="https://ggdhm.nl/thema-s/item/infectieziekten/testbeleid"&gt;GGD Hollands Midden&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;English translation:&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Do you have these (mild) symptoms?:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;cough&lt;/li&gt;
&lt;li&gt;blocked or runny nose&lt;/li&gt;
&lt;li&gt;fever&lt;/li&gt;
&lt;li&gt;loss of smell or taste&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Step 1: Make an appointment&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Call the national number 0800-1202&lt;/li&gt;
&lt;li&gt;Have your BSN with you when you call&lt;/li&gt;
&lt;li&gt;Make an appointment to get tested at one of our locations&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Step 2: Test&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Go to the selected location at the scheduled time&lt;/li&gt;
&lt;li&gt;You will be tested at the test location&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Step 3: Results and eventual start of source and contact research&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You will be called with your results within 48 hours&lt;/li&gt;
&lt;li&gt;If you are infected with the coronavirus, the GGD will call you for source and contact research
*If you show more serious symptoms, or if you fall within a high-risk group, report to your doctor or to the emergency help line.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;h2 id="the-effect-of-fear-on-performance"&gt;The effect of fear on performance&lt;/h2&gt;
&lt;p&gt;This coronavirus has already shown us a side of humanity that we&amp;rsquo;d perhaps rather not see: &lt;a href="https://www.bbc.com/news/world-australia-51731422"&gt;fights over toilet paper&lt;/a&gt;, &lt;a href="https://snacks.robinhood.com/newsletters/rMxwcb7y7lMZoI5NY6qf7/"&gt;chaos on the stock market&lt;/a&gt; due to panic, and &lt;a href="https://www.volkskrant.nl/nieuws-achtergrond/nctv-waarschuwt-voor-extremistische-protestacties-door-5g-tegenstanders-die-vrezen-voor-coronavirus~bf1400b8/"&gt;sabotage of 5G cell towers&lt;/a&gt; based on a belief that they caused COVID-19. As much as we&amp;rsquo;d like to believe it, we&amp;rsquo;re not always the most rational beings. We all have the tendency to behave unpredictably, especially when we&amp;rsquo;re afraid.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s no wonder that the coronavirus testing line was so welcome. The fact that there were 323,000 callers on the first day is even more remarkable when we remember that majority of Dutch residents had been in self-isolation for months at that point, which lowered their chances of contracting the virus. In theory, the fear that drove these callers might have been somewhat irrational, but not unpredictable.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200704-03.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;In English, we call this FOMO (Fear of Missing Out). We&amp;rsquo;ve already clearly seen &lt;a href="https://www.flood.io/blog/fomo-and-performance-testing-why-robinhood-went-down"&gt;how FOMO can drive users&lt;/a&gt; en masse to an application, with effects on its performance. In this case, people were afraid that coronavirus test shortages would mean there weren&amp;rsquo;t enough tests to go around, and they wanted to be first in line to get tested.&lt;/p&gt;
&lt;p&gt;Another problem was that &lt;a href="https://www.trouw.nl/binnenland/de-balans-na-een-week-testen-het-plan-was-mooier-dan-de-praktijk~b86399b7/"&gt;one in four callers&lt;/a&gt; just wanted general information about COVID-19, despite government pleas to keep the hotline free for coronavirus test appointments only. It didn&amp;rsquo;t help that the hotline opened on a Dutch national holiday, White Monday, and more people were home than usual for a Monday. The high number of unrelated calls was unexpected, but nevertheless factored into system overload.&lt;/p&gt;
&lt;p&gt;What could we have done to improve this system?&lt;/p&gt;
&lt;h2 id="improvements-to-the-corona-hotline"&gt;Improvements to the corona hotline&lt;/h2&gt;
&lt;h3 id="better-estimation"&gt;Better estimation&lt;/h3&gt;
&lt;p&gt;As difficult as it is to predict FOMO&amp;rsquo;s effects, we can still try. We can make educated guesses based on related statistics.&lt;/p&gt;
&lt;p&gt;Just one month before the coronavirus test hotline was opened, &lt;a href="https://www.zwollenu.nl/500-000-tot-700-000-nederlanders-besmet-met-coronavirus/"&gt;Jaap van Dissel&lt;/a&gt;, the head of RIVM, estimated that there were up to 700,000 Dutch residents infected by the coronavirus. Why, then, was it such a surprise that more than 300,000 of them had called? Furthermore, the RIVM had encouraged people with a broad list of symptoms (such as colds, coughs, or fever) to call, and it&amp;rsquo;s reasonable to assume that some people with conditions other than COVID-19 might also have called.&lt;/p&gt;
&lt;p&gt;Even if we assume that 20% of the 700,000 people with the novel coronavirus did not have symptoms (&lt;a href="https://www.who.int/docs/default-source/coronaviruse/situation-reports/20200306-sitrep-46-covid-19.pdf?sfvrsn=96b04adf_4"&gt;according to WHO research&lt;/a&gt;), we still arrive at a predicted 140,000 calls, which is still 25 times what was the coronavirus testing system was able to process on the first day.&lt;/p&gt;
&lt;p&gt;If we have an educated estimate, we can start testing.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200704-04.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h3 id="injecting-load"&gt;Injecting load&lt;/h3&gt;
&lt;p&gt;When a resident calls the hotline, the call is routed to one of several operators working from home. This is often done with a telephony server that forwards calls based on some type of round-robin system. We can execute load tests on this server to determine how many phone calls a server can process and route successfully, with minimal delay and without message queueing.&lt;/p&gt;
&lt;p&gt;Then, the operator enters personal information from the caller into the appointment system, including their government identification number (BSN) and address. We can surmise that the system checks the identity to verify the validity of the BSN, and then sends some details to a database. The closest municipal clinic to the caller can then use the data to process and schedule an appointment. We can also inject load at this stage by simulating the calls that the appointment system creates with an API load testing tool like JMeter or Gatling.&lt;/p&gt;
&lt;h3 id="using-different-test-scenarios"&gt;Using different test scenarios&lt;/h3&gt;
&lt;p&gt;With such a public announcement of the hotline&amp;rsquo;s opening, a &lt;strong&gt;spike test&lt;/strong&gt; before release could have yielded some useful information. In a spike test, we simulate a sharp increase in users over a short period of time. For example, we could have simulated an increase in users from 0 to 700,000 on the telephony system over 10 minutes to see how the application would have handled that.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Soak tests&lt;/strong&gt; could also have been useful in this case. The hotline&amp;rsquo;s opening hours were from 8 am to 8 pm, so it was open for 12 hours in total. With soak tests, we can generate load on an application for an extended amount of time. Soak tests can reveal memory leaks or other bottlenecks in the processing of data that might occur after hours.&lt;/p&gt;
&lt;p&gt;These are ways we could have tested the system as it is, but are there improvements that we could have made in the system to make it more resilient to reduce the FOMO factor?&lt;/p&gt;
&lt;h2 id="using-automation-to-lessen-fomo-risk"&gt;Using automation to lessen FOMO risk&lt;/h2&gt;
&lt;p&gt;The system had some manual parts of the process that may have exacerbated load issues. Here&amp;rsquo;s how this system could have been automated to reduce bottlenecks.&lt;/p&gt;
&lt;h3 id="interactive-voice-response"&gt;Interactive Voice Response&lt;/h3&gt;
&lt;p&gt;Telephony servers commonly use Interactive Voice Response (IVR), an automated menu system for voice calls that uses either voice recognition or keypress tones to navigate a user through a series of choices. We&amp;rsquo;re all familiar with it: &amp;ldquo;&lt;em&gt;For Dutch, press 1. For English, press 2&amp;hellip;&lt;/em&gt;&amp;rdquo; Such a system might have helped reduce the overall load by quickly filtering out callers in the 25% who weren&amp;rsquo;t interested in creating an appointment. &amp;ldquo;&lt;em&gt;If you&amp;rsquo;d like to book an appointment for a coronavirus test, press 1. Otherwise, please call the information hotline at&amp;hellip;.&lt;/em&gt;&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s what an IVR system could look like:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200704-05.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;From: &lt;a href="http://vanguardnetworks.com.sg/IVR.html"&gt;Vanguard Networks&lt;/a&gt;&lt;/em&gt;
‍
Load testing IVR systems can be difficult, and it usually requires the use of highly specialized commercial tools. However, introducing a new tool may also increase the time required for load testing.&lt;/p&gt;
&lt;h3 id="building-a-web-app"&gt;Building a web app&lt;/h3&gt;
&lt;p&gt;Another approach would be to implement a web app to verify identity and capture personal information quickly. In the Netherlands, we already have &lt;a href="https://www.digid.nl/wat-is-digid/"&gt;DigiD&lt;/a&gt;, an identity verification system that is heavily used for governmental services. &lt;a href="https://mijn.overheid.nl/"&gt;Mijn Overheid&lt;/a&gt;, which is a central government portal accessible to every Dutch resident, already interfaces with DigiD as the sole method of logging in. Reusing these existing services could have saved a lot of the work on a web app— not to mention reducing the bottlenecks inherent in a more manual process like a telephone hotline.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200704-06.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: &lt;a href="https://mijn.overheid.nl/"&gt;Mijn Overheid&lt;/a&gt;&lt;/em&gt;
‍&lt;/p&gt;
&lt;h2 id="testing-the-system-end-to-end"&gt;Testing the system end-to-end&lt;/h2&gt;
&lt;p&gt;We&amp;rsquo;ve identified a few ways to load test various components of the coronavirus hotline, both in its current incarnation as well as in hypothetical improved versions. Isolating each component and running load tests at that level can help us resolve performance issues inherent in the component. However, there are still bottlenecks that are only revealed when the integrations between components is tested as well. That&amp;rsquo;s where end-to-end testing comes in.&lt;/p&gt;
&lt;p&gt;For the coronavirus hotline, end-to-end testing means being able to run load tests on the entire process and seeing how data flows from one to the other: the call forwarding from the telephony server, the identity verification system, the appointment system, the database of personal information, the servers of every municipal clinic, and the email/text notifications with appointment details. As modern applications grow more complex, it can be tempting not to run end-to-end tests, but we do so at great risk of functional or nonfunctional issues.&lt;/p&gt;
&lt;p&gt;An area of end-to-end testing that is often overlooked is the human factor, which can also be a bottleneck. Had hotline operators been trained to ask early on in the call whether the caller wanted to make an appointment, to filter out unrelated calls? Can the coronavirus testing and test result processing, heavily involving manual work from medical professionals, match the stated requirements (test within 24 hours, result within 48 hours) even when the digital components are performant? Some people waited for an hour in the cities of &lt;a href="https://www.ed.nl/eindhoven/in-de-file-voor-een-stukje-zekerheid-meteen-drukte-bij-teststraat-voor-corona-in-eindhoven~a27eec83/"&gt;Eindhoven&lt;/a&gt; and &lt;a href="https://www.pzc.nl/zeeuws-nieuws/drukte-bij-teststraat-in-goes-na-openstellen-nummer-voor-coronatest~aa8a6cb2/"&gt;Goes&lt;/a&gt; due to traffic congestion from cars near the test centers, leading to delays in the testing schedule.&lt;/p&gt;
&lt;p&gt;While it can be difficult to load test these logistical systems with automated tools, they may have significant effects on the overall performance of an application and should be considered.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Often, performance issues can lead to a tangible loss in profits or a more intangible loss in reputation. In this case study, poor performance had a direct impact on people&amp;rsquo;s health. Potentially sick people were unable to make appointments to get tested, and later treated. Delayed tests could have led to an increased infection rate as people waited for a confirmed diagnosis. Hotline operators also admitted that slowness in the system led to them sometimes &lt;a href="https://wnl.tv/2020/06/08/chaos-bij-de-coronalijn-personeel-slaat-alarm/"&gt;giving out test results&lt;/a&gt; against instructions to wait for trained medical professionals to do so.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200704-07.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Human psychological factors can make a system more complex to load test. &lt;a href="https://www.trouw.nl/binnenland/de-balans-na-een-week-testen-het-plan-was-mooier-dan-de-praktijk~b86399b7/"&gt;According to Andrea Evers&lt;/a&gt; (LUCM), a health psychological professor, &amp;ldquo;&lt;em&gt;Door de uitbraak van corona zijn mensen in een langdurige stresssituatie beland. Onzekerheid, onvoorspelbaarheid en oncontroleerbaarheid maken dat ze de behoefte hebben om zaken juist wel te controleren of voorspelbaar te maken&lt;/em&gt; [The coronavirus outbreak has put people in a situation of chronic stress. The uncertainty, unpredictability, and helplessness of the situation cause a need to make things controllable or predictable].&amp;rdquo;&lt;/p&gt;
&lt;p&gt;As performance testers, we can use statistics and a systematic attitude combined with knowledge of human factors in applications to try to predict the unpredictable.&lt;/p&gt;</description></item><item><title>Ask a Flooder 20: How can fear affect application performance?</title><link>https://nicolevanderhoeven.com/blog/20200806-aaf20/</link><pubDate>Thu, 06 Aug 2020 22:43:28 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200806-aaf20/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-20-how-can-fear-affect-application-performance-video"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/ask-a-flooder-20-how-can-fear-affect-application-performance-video"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this video, I talk about the power of fear, and how it can end up affecting performance test results.
‍&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/oeEFCrTYULE?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Or listen to the audio version here:&lt;/p&gt;
&lt;iframe src="https://open.spotify.com/embed-podcast/episode/2cOfQrrUwyIKWbztgNdoXR" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media"&gt;&lt;/iframe&gt;
&lt;p&gt;Hi everyone, I&amp;rsquo;m Nicole van der Hoeven, back with another Ask a Flooder, and today I want to talk about the effect of fear on your performance outcomes.&lt;/p&gt;
&lt;h2 id="the-dutch-coronalijn"&gt;The Dutch &amp;ldquo;coronalijn&amp;rdquo;&lt;/h2&gt;
&lt;p&gt;I currently live in Maastricht, in the Netherlands. At the beginning of this global pandemic, the only people getting tested actively for COVID-19 were either people who presented with serious symptoms of the disease, or health care professionals who were continually exposed to the disease and therefore at a higher risk of contracting it.&lt;/p&gt;
&lt;p&gt;Last month, on June 1st, the Dutch government made testing available to everybody. They set up a telephone hotline that any Dutch resident could call to set an appointment to get tested for a COVID-19 test. A task force was dispatched to make sure that they could test up to 30.000 people per day. Yet on the first day of testing, only 1.146 people were tested. So what happened?&lt;/p&gt;
&lt;p&gt;Well, it turned out that the bottleneck of the entire process wasn&amp;rsquo;t getting enough tests, registering the tests, or even processing the test results. The bottleneck actually occurred way before that, when people called up the hotline to get an appointment.&lt;/p&gt;
&lt;p&gt;323.000 people called on the first day that the hotline opened. And not even all of them had called to make an appointment. Some of them were just calling for general information on the coronavirus despite the fact that the government made it clear that that&amp;rsquo;s not what the line was for, and that there were other lines dedicated to information. There were reports on Twitter of people waiting up to 6 hours on the line just to talk to someone who would make an appointment for them. There were calls that got dropped. People said that sometimes it happened in the middle of a call. Even telephone operators that the appointment system was down or slow and unusable for a lot of it.&lt;/p&gt;
&lt;p&gt;As a result, only 5,500 people actually had appointments booked on a day where there were 323,000 that called. That&amp;rsquo;s 1.70%.&lt;/p&gt;
&lt;h2 id="what-does-that-have-to-do-with-performance"&gt;What does that have to do with performance?&lt;/h2&gt;
&lt;p&gt;As performance engineers, we like to believe that everything we do is reasoned. We design tests based on quantitative data. We look at historical trends and metrics to help us decide how to build a workload model. But the truth is that that&amp;rsquo;s often not enough.&lt;/p&gt;
&lt;p&gt;If anything, this pandemic has shown us just how wrong our guesses can be, whether or not they&amp;rsquo;re informed by facts, especially when it has to do with human behavior. We&amp;rsquo;ve seen violent fights erupt over toilet paper. We&amp;rsquo;ve seen peaks and troughs on the stock market that didn&amp;rsquo;t have anything to do with the underlying companies. We&amp;rsquo;ve seen arson on 5G cell towers. Because human beings are irrational, and it&amp;rsquo;s really hard to capture that irrationality in our model for how users are going to behave.&lt;/p&gt;
&lt;p&gt;We may never be able to accurate predict how irrationality is going to affect the load on our application in production. But that doesn&amp;rsquo;t mean that we shouldn&amp;rsquo;t try. There are still things that we can do to mitigate the risk. I think that any application that is public-facing should be assessed for exposure to the risk of fear or other human psychological factors.&lt;/p&gt;
&lt;h2 id="how-do-we-account-for-fear-in-our-performance-testing"&gt;How do we account for fear in our performance testing?&lt;/h2&gt;
&lt;p&gt;I actually wrote a whole blog post on this particular situation (the Dutch corona line), and how it might have been possible to predict (maybe not with 100% accuracy but with reasonable accuracy) how many people would have called the hotline.&lt;/p&gt;
&lt;p&gt;For example, we can look at statistics like the of the Netherlands or how many people normally get flu-like symptoms or at least report them at this time of the year. These are statistics that are readily available from the Department of Health, and we could have used them to inform our decisions on the workload model for such an application. We may not have gotten it exactly, but we would have at least bin in the same ballpark.&lt;/p&gt;
&lt;p&gt;If we have a good enough idea about the workload that our application would have to handle when it&amp;rsquo;s influenced by fear, we can start running load tests around that. Another good open-ended kind of test to run, especially for applications that are particularly susceptible to fear, is the stress test. In a stress test, you push your application to its limits and you find out what they are. You could, for instance, start with your peak work load, and then add a certain number of users every 30 minutes and see how much your application can actually handle. You can do the same with soak tests, where you&amp;rsquo;re exposing your application to the same amount of load for an extended period of time. Both of those kind of exploratory tests help you define the limits of your application and how it would respond if fear plays a role in the workload model in production.&lt;/p&gt;
&lt;p&gt;If we overlook this critical human element in our test design, then we leave ourselves, and our applications, vulnerable to performance degradation and, perhaps, outages.&lt;/p&gt;
&lt;p&gt;Till next time, happy flooding!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Read &lt;a href="https://nicolevanderhoeven.com/blog/20200813-dutch-coronavirus-hotline/"&gt;this blog post&lt;/a&gt; for more about the coronavirus hotline.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Ask a Flooder 18: How do I load test video streaming with JMeter?</title><link>https://nicolevanderhoeven.com/blog/20200722-aaf18/</link><pubDate>Wed, 22 Jul 2020 22:49:15 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200722-aaf18/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-18-how-do-i-load-test-video-streaming-with-jmeter-video"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/ask-a-flooder-18-how-do-i-load-test-video-streaming-with-jmeter-video"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this video, I answer the question: &amp;ldquo;How do I load test video streaming with JMeter?&amp;rdquo;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/Q00briuogto?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Or listen to the audio version here:&lt;/p&gt;
&lt;iframe src="https://open.spotify.com/embed-podcast/episode/69F5lmOeFfEJr6ZgVWFGOu" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media"&gt;&lt;/iframe&gt;
&lt;h2 id="http-live-streaming-hls-and-performance"&gt;HTTP Live Streaming (HLS) and performance&lt;/h2&gt;
&lt;p&gt;One of the most popular protocols for video streaming is &lt;a href="https://developer.apple.com/streaming/examples/"&gt;HTTP Live Streaming&lt;/a&gt;, or HLS, and that&amp;rsquo;s what I&amp;rsquo;m going to show you today. An HLS video ends with the [file extension .m3u8‍](&lt;a href="https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8%5D(https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8)"&gt;https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8](https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8)&lt;/a&gt;. According to the HLS protocol, when a video is streamed, the first request sent must be a manifest. A manifest is sometimes called a playlist, and it is a list of all the chunks or parts that make up the video. Then, each chunk is downloaded.&lt;/p&gt;
&lt;p&gt;To assess the performance of a video stream, we still want the response time of the manifest, the chunks, and the whole video. However, there are many more metrics that are important in video streaming which aren&amp;rsquo;t captured by just the response time. For example, how do you determine whether a video was played smoothly or if it stopped to buffer? A video that keeps pausing might just drive a user away, and it&amp;rsquo;s difficult to tell whether that is happening just from the response time.&lt;/p&gt;
&lt;h2 id="how-to-load-test-video-streaming-with-jmeter"&gt;How to load test video streaming with JMeter&lt;/h2&gt;
&lt;h3 id="downloading-and-installing-the-ubik-video-streaming-plugin"&gt;Downloading and installing the Ubik Video Streaming plugin&lt;/h3&gt;
&lt;p&gt;Luckily, there&amp;rsquo;s a plugin for that, created by a company called Ubik Ingénierie. The &lt;a href="https://ubikloadpack.com/"&gt;Ubik Load Pack&lt;/a&gt; is a set of enterprise-grade plugins for JMeter. One of those plugins is a &lt;a href="https://ubikloadpack.com/video-streaming-performance.php"&gt;Video Streaming Plugin&lt;/a&gt;, and it happens to be a really easy way to get started with video streaming. This is a paid plugin, but you can &lt;a href="https://ubikloadpack.com/video-streaming-performance.php#formulaire"&gt;sign up for a free 11-day trial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Once you do that, you&amp;rsquo;ll get an email from Ubik with a link to download the bundle. Go to lib/ext and then copy this .jar file into the same directory on your JMeter installation. Start up JMeter, and it&amp;rsquo;ll ask you for the license file. Browse to the license file in the bundle you downloaded. JMeter will restart.&lt;/p&gt;
&lt;h3 id="using-the-jmeter-plugin-in-your-load-testing-script"&gt;Using the JMeter plugin in your load testing script&lt;/h3&gt;
&lt;p&gt;Now let&amp;rsquo;s start creating the Test Plan. Create a Thread group, and then right click on the thread group, go to Add &amp;gt; Sampler and then select the &amp;ldquo;ULP Video Streaming sampler&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Click on the sampler and then paste in the URL to the HLS file that you&amp;rsquo;d like to test. This should end in a .m3u8. This plugin supports several protocols for video streaming, but we can just leave it at auto and it&amp;rsquo;ll automatically detect which one it is.&lt;/p&gt;
&lt;p&gt;In Play Options, you can choose whether to play the entire video or just a part of it, or even whether you want to include the video subtitles in your test.&lt;/p&gt;
&lt;p&gt;This Network Options panel is fantastic because it allows you to limit your network speed. Slow networks, like mobile networks, really affect user experience, so it&amp;rsquo;s really important to take this into account when running load tests. You might even use a parameter here and do something like throttle to 3G speeds for 80% of your traffic, and leave it on Auto 20% of the time. But I&amp;rsquo;ll just leave this blank for now.&lt;/p&gt;
&lt;p&gt;Next, let&amp;rsquo;s add a View Results Tree listener. Then, let&amp;rsquo;s run the script once, just to see if it works.&lt;/p&gt;
&lt;p&gt;As you can see, we can see the manifest retrieved first, and then all the chunks. We didn&amp;rsquo;t get any errors, so let&amp;rsquo;s run this as a load test. We can disable this listener because it just consumes extra resources on our load generator.&lt;/p&gt;
&lt;h3 id="ramping-up-your-load-test-on-flood"&gt;Ramping up your load test on Flood&lt;/h3&gt;
&lt;p&gt;To ramp this up into a load test, we&amp;rsquo;ll have to go into Thread Group and change these settings. Ideally, we want to be able to change these values from the Flood UI later so we don&amp;rsquo;t have to go into the script whenever we change them, so I&amp;rsquo;ll type in these Flood-specific properties. I&amp;rsquo;ll leave a link in the description about these properties. I&amp;rsquo;ll also set it to run Forever so that we can change the duration and the video will just keep playing to fill that duration.&lt;/p&gt;
&lt;p&gt;To capture some of Ubik&amp;rsquo;s cool metrics, let&amp;rsquo;s add a Simple Data Writer listener here and write the results to a CSV file. On Flood, all flood results are stored on /data/flood/results, so we&amp;rsquo;ll add an output.csv file in that directory that we can download after the test.&lt;/p&gt;
&lt;p&gt;So that&amp;rsquo;s our script! Now we&amp;rsquo;ll have to include the plugin and related files so that Flood can access them as well.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s go back to the bundle we downloaded and go to the bin folder to look for &lt;a href="http://user.properties/"&gt;user.properties&lt;/a&gt;. Let&amp;rsquo;s open that up, and we&amp;rsquo;ll change the license path to &lt;code&gt;/data/flood/files&lt;/code&gt;, which is the directory that Flood saves files we upload to. To preserve this directory structure, we&amp;rsquo;ll compress just the lib and bin folders.&lt;/p&gt;
&lt;p&gt;On Flood, we&amp;rsquo;ll start a new stream here and upload three things: the jmx script, the license, and the compressed archive of the lib and bin folders from the bundle.&lt;/p&gt;
&lt;p&gt;Then we&amp;rsquo;ll go through the rest of the process here, setting the test parameters. Time to launch the test!&lt;/p&gt;
&lt;h3 id="analyzing-video-streaming-load-test-results"&gt;Analyzing video streaming load test results&lt;/h3&gt;
&lt;p&gt;Flood shows you results of your load test while it&amp;rsquo;s running as well as after the test. You can see metrics like concurrency, network throughput, transaction rate, and response time for the test. You can also see these metrics for each individual transaction, including the video or sampler as a whole, the manifest, and the chunks.&lt;/p&gt;
&lt;p&gt;To see the CSV that our script generated, we can download the Archived Results from a flood.&lt;/p&gt;
&lt;p&gt;In JMeter, click on Tools &amp;gt; Generate Report and fill in the fields, selecting the output.csv from the flood&amp;rsquo;s Archived Results, JMeter&amp;rsquo;s &lt;a href="http://user.properties"&gt;user.properties&lt;/a&gt; file, and then an output directory for the report.&lt;/p&gt;
&lt;p&gt;Ubik&amp;rsquo;s plugin creates a few custom graphs in the HTML report:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Buffer fill in Millis&lt;/li&gt;
&lt;li&gt;Lag ratio in percentage&lt;/li&gt;
&lt;li&gt;Lag ratio without buffer fill in percentage&lt;/li&gt;
&lt;li&gt;Lag time in Millis&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Using Ubik&amp;rsquo;s Video Streaming plugin is an easy and thorough way to load test video streaming with JMeter, and I highly recommend it. I used an HLS video to demonstrate it, but this plugin supports several protocols:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HLS&lt;/li&gt;
&lt;li&gt;Mpeg DASH&lt;/li&gt;
&lt;li&gt;Smooth&lt;/li&gt;
&lt;li&gt;Adobe HDS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more information, read Ubik&amp;rsquo;s tutorial on how to use their plugin with Flood &lt;a href="https://www.flood.io/blog/running-a-video-streaming-performance-test-using-flood-io-and-ubikloadpack"&gt;here&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Entrevista con Señor Performo en PerfBytes Español</title><link>https://nicolevanderhoeven.com/blog/20200622-entrevista-con-senor-performo/</link><pubDate>Mon, 22 Jun 2020 21:56:02 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200622-entrevista-con-senor-performo/</guid><description>&lt;p&gt;Aquí está una entrevista que he hecho con Leando Melendez (Señor Performo) en su podcast, PerfBytes Español. Hablamos de performance testing, mis idiomas, y mis consejos para mujeres que quieren entrar en el mundo de tecnología.&lt;/p&gt;
&lt;a class="spreaker-player" href="https://www.spreaker.com/user/perfbytes/perfbytesesp-s02e04-entrevistanicole" data-resource="episode_id=31696383" data-theme="light" data-autoplay="false" data-playlist="false" data-cover="https://d3wo5wojvuv7l.cloudfront.net/images.spreaker.com/original/2aed331516599f75dd433a42006da511.jpg" data-width="100%" data-height="400px"&gt;Listen to "Entrevista Nicole van der Hoeven" on Spreaker.&lt;/a&gt;&lt;script async src="https://widget.spreaker.com/widgets.js"&gt;&lt;/script&gt;</description></item><item><title>Ask a Flooder 17: How do I use unique test data on Element?</title><link>https://nicolevanderhoeven.com/blog/20200618-aaf17/</link><pubDate>Thu, 18 Jun 2020 21:58:49 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200618-aaf17/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-17-how-do-i-use-unique-test-data-on-element"&gt;
&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://www.flood.io/blog/ask-a-flooder-17-how-do-i-use-unique-test-data-on-element"&gt;Tricentis Flood&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this video, I talk about how to ensure that Flood Element uses unique test data, using the example of a customer wanting to script unique logins for his application.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/qVpX7MX3jxE?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Or listen to the audio version instead:&lt;/p&gt;
&lt;iframe src="https://open.spotify.com/embed-podcast/episode/7k5TXtoHnswJwBbKHXgJR7" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media"&gt;&lt;/iframe&gt;
&lt;h2 id="transcript"&gt;Transcript:&lt;/h2&gt;
&lt;p&gt;Hi everyone, Nicole van der Hoeven here again back with another Ask a Flooder, and this week&amp;rsquo;s question is a follow-up question from last week. That user had previously asked about test data in Flood Element. This week he&amp;rsquo;s asking: &amp;ldquo;How do I ensure that Flood Element uses unique test data?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;So this user is actually trying to script a login for an application. He has a list of usernames and corresponding passwords that he wants to use. He&amp;rsquo;s already set both of these up in a CSV file, and he&amp;rsquo;s also set up the Element script in the same way that I outline in my previous video. However, this user is seeing errors in the test due to the application not allowing a given user account to be used simultaneously in two or more devices. The problem is that the way that he&amp;rsquo;s set it up is that he has Element running on multiple nodes, and each node has the chance to pick the same user account.&lt;/p&gt;
&lt;p&gt;So how do you make sure that it&amp;rsquo;s a unique 1:1 ratio for an instance of Element and a user account in the CSV file? If you haven&amp;rsquo;t already watched the previous week&amp;rsquo;s video, you should pause this, watch that, and then come back here, so it makes a little more sense because the script that I&amp;rsquo;m using is building on what we already did in the previous week.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s talk about the differences between this script and the previous week&amp;rsquo;s.&lt;/p&gt;
&lt;p&gt;First, I&amp;rsquo;m declaring a global variable here called &lt;code&gt;globalBrowserID&lt;/code&gt;. The idea is to create a unique and globally identifiable string that I can attach to every account in the CSV file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;const&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;globalBrowserID&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;ENV&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;FLOOD_GRID_INDEX&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;_&amp;#39;&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;ENV&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;FLOOD_GRID_NODE_SEQUENCE_ID&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;_&amp;#39;&lt;/span&gt; &lt;span style="color:#f92672"&gt;+&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;ENV&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;BROWSER_ID&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;toString&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The global browser ID consists of three parts:- The first is a grid index, which is a number assigned to every grid, and it&amp;rsquo;s also globally unique. So if there are three grids being used in the test, then the grid indexes would be 0, 1, and 2.- The second one is a grid node sequence ID, and this is unique within the grid. The node sequence ID is a number that is assigned to every node in a single grid.- The last one is a browser ID. The browser ID is a number assigned to an instance of Element running on a single node.&lt;/p&gt;
&lt;p&gt;These are all zero-based, so the very first instance of Element running on the very first node and on the very first grid in the entire test would be &lt;code&gt;0_0_0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re going to have to modify our CSV file to make use of this browser ID. So whereas the user previously had username and password, I&amp;rsquo;ve added an ID column. From then, these will have to be sequential. So &lt;code&gt;0_0_0&lt;/code&gt;, &lt;code&gt;0_0_1...&lt;/code&gt; And &lt;code&gt;0_0_1&lt;/code&gt; would be the second instance of Element running still on the first node, on the first grid. And you can make as many of these as you need.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;id,username,password
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;0_0_0,user1,password1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;0_0_1,user2,password2
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;0_0_2,user3,password3
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1_0_0,user4,password4
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;1_0_1,user5,password5
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;ve also modified the interface &lt;code&gt;UserData&lt;/code&gt; to describe the fields in the CSV file. So there&amp;rsquo;s &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;username&lt;/code&gt;, and &lt;code&gt;password&lt;/code&gt;, and I&amp;rsquo;ve defined them all as strings.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;TestData&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;fromCSV&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;UserData&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;users_multiplegrids.csv&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; .&lt;span style="color:#a6e22e"&gt;filter&lt;/span&gt;((&lt;span style="color:#a6e22e"&gt;line&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;index&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;browserID&lt;/span&gt;) =&amp;gt; &lt;span style="color:#a6e22e"&gt;line&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;id&lt;/span&gt; &lt;span style="color:#f92672"&gt;===&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;globalBrowserID&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; .&lt;span style="color:#a6e22e"&gt;circular&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This line is telling Element to take this data file with this filename and filter it based on the line, the index, and the browserID such that &lt;code&gt;id&lt;/code&gt; is equal to the browser ID. So what happens here is that Element will take the global browser ID, which let&amp;rsquo;s say is &lt;code&gt;0_0_0&lt;/code&gt; for the very first one. It&amp;rsquo;ll then take that &lt;code&gt;0_0_0&lt;/code&gt; and look at the CSV file for anything in the ID field that has the value &lt;code&gt;0_0_0&lt;/code&gt;. And then it will continue to use the rest of that line.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve also made the CSV file circular just because that&amp;rsquo;s always a good practice to get into.&lt;/p&gt;
&lt;p&gt;And as always, I think it&amp;rsquo;s a great idea to debug this, especially when you&amp;rsquo;re dealing with multiple grids and multiple nodes on that grid.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;Print to console&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;async&lt;/span&gt; (&lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Browser&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;data&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;UserData&lt;/span&gt;) =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;console&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;log&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;global browser ID: &amp;#39;&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;globalBrowserID&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;| user: &amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;`&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;data&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;username&lt;/span&gt;&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39; | password: &amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;`&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;data&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;password&lt;/span&gt;&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;)    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;})
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;ve also added the username and password here, just in case we need to verify the state that that user is in.&lt;/p&gt;
&lt;p&gt;So let&amp;rsquo;s run the test. Since we&amp;rsquo;re just running this locally, we&amp;rsquo;ll see that the first value indeed is &lt;code&gt;0_0_0&lt;/code&gt;, and the user we&amp;rsquo;re selecting is &lt;code&gt;user1&lt;/code&gt; and &lt;code&gt;password1&lt;/code&gt;, which lines up with the username and password values corresponding to &lt;code&gt;0_0_0&lt;/code&gt; in the CSV file.&lt;/p&gt;
&lt;p&gt;I hope that helped, and until next time, happy flooding!&lt;/p&gt;
&lt;p&gt;Download the &lt;a href="https://github.com/flood-io/load-testing-playground/blob/master/element/test-data/example.ts"&gt;full script&lt;/a&gt; and the &lt;a href="https://github.com/flood-io/load-testing-playground/blob/master/element/test-data/users.csv"&gt;data file&lt;/a&gt; to follow along.&lt;/p&gt;</description></item><item><title>Ask a Flooder 16: How do I use test data with Element?</title><link>https://nicolevanderhoeven.com/blog/20200609-aaf16/</link><pubDate>Tue, 09 Jun 2020 22:18:41 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200609-aaf16/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-16-how-do-i-use-test-data-with-element-video"&gt;
&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://www.flood.io/blog/ask-a-flooder-16-how-do-i-use-test-data-with-element-video"&gt;Tricentis Flood&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this video, I discuss how to make your load testing scripts more realistic by including test data. The load testing tool I use is &lt;a href="https://element.flood.io/"&gt;Flood Element&lt;/a&gt;, but you can apply these principles to any tool. You&amp;rsquo;ll find a copy of the Element script I used below.&lt;/p&gt;
&lt;p&gt;‍&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/EGhVm-R12qI?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;And, if you prefer, here&amp;rsquo;s the audio version:&lt;/p&gt;
&lt;iframe src="https://open.spotify.com/embed-podcast/episode/4OW5slSCmAuBc9NPa1NKtk" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media"&gt;&lt;/iframe&gt;
&lt;h2 id="transcript"&gt;Transcript&lt;/h2&gt;
&lt;p&gt;Hi everyone, Nicole van der Hoeven here back with another Ask a Flooder, and this time the question is: How do I use test data with Flood Element?&lt;/p&gt;
&lt;p&gt;Now let&amp;rsquo;s talk about why you might want to use test data. In load testing, it&amp;rsquo;s important to make your scripts behave as similarly to real users as possible so that the load that you generate is production-like. The problem is that if you send the same data over and over again to the server, that server is probably going to cache that response. The response being cached means that the server will return the response way faster than it normally would if it had been a unique request. So we can use test data, instead of static data hardcoded in your scripts, to make sure that this doesn&amp;rsquo;t happen.&lt;/p&gt;
&lt;p&gt;Using test data can also help us test different responses. For example, let&amp;rsquo;s say we&amp;rsquo;re testing a loan application system, where a user inputs the application ID, the server looks it up, and returns the status of that loan application. Now, loan applications might be in different stages of the process. For instance, some might be saved but not submitted, or maybe they&amp;rsquo;ve been submitted but failed the identity verification check.&lt;/p&gt;
&lt;p&gt;If we used the same application ID every time, then the server would always return the same status and the same details. Instead, let&amp;rsquo;s create a CSV file that we can use as test data. It might look something like this.‍&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;applicationId
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;A100001
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;B100002
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;C100003
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;D100004
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We can have &lt;code&gt;applicationId&lt;/code&gt; as the single header here, and we can populate this with a list of different application IDs in different stages of the process. That way, when we run the script, the server will have to respond authentically to every request without it being cached.&lt;/p&gt;
&lt;p&gt;Now to create our script. This is an empty Element script. To start with, make sure you&amp;rsquo;re importing &lt;code&gt;TestData&lt;/code&gt; here in the first line of your script.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;import&lt;/span&gt; { &lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;TestSettings&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;Until&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;By&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;Browser&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;TestData&lt;/span&gt; } &lt;span style="color:#a6e22e"&gt;from&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;@flood/element&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The first thing we&amp;rsquo;re going to need to do is to create an interface for the CSV file. Let&amp;rsquo;s call it &lt;code&gt;AppData&lt;/code&gt;. Within this interface, we&amp;rsquo;ll need to define all the fields that we intend to use in our data file and what type of values we can expect to be in those fields. Looking at our CSV here, we&amp;rsquo;ve just got the application ID, so I&amp;rsquo;m just going to copy that, and it&amp;rsquo;s a mixture of characters and numbers, so I&amp;rsquo;m going to put that in as a string.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;interface&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;AppData&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;applicationId&lt;/span&gt; &lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;string&lt;/span&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now we need to tell Element how to find this test data. We&amp;rsquo;ll say that it&amp;rsquo;s from the CSV, using the interface we&amp;rsquo;ve just created. Now we&amp;rsquo;ll tell Element the filename. In this situation, the CSV file that I&amp;rsquo;m using is actually in the same directory, so I don&amp;rsquo;t need to specify a path here, but if you&amp;rsquo;re putting it somewhere else, then you&amp;rsquo;ll need to specify the folder and the path to it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;TestData&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;fromCSV&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;AppData&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;applicationids.csv&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now let&amp;rsquo;s use the data in a step. In real life, you might want to use an application ID to type it into a text field, but for demonstration purposes, I&amp;rsquo;m just going to show you how to output it to the console log. Printing to the console is also a good way to debug your tests, especially if you&amp;rsquo;re dealing with test data.&lt;/p&gt;
&lt;p&gt;We need to let Element know that we want to use AppData. So now, let&amp;rsquo;s output this to the console. Since we&amp;rsquo;re just debugging, let&amp;rsquo;s output the application ID. To actually get the value from the data file, we&amp;rsquo;ll use this syntax:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;Print to console&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;async&lt;/span&gt; (&lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Browser&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;data&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;AppData&lt;/span&gt;) =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;console&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;log&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;application ID: &amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;`&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;data&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;applicationId&lt;/span&gt;&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;) 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;})
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;‍By default, Element reads the data files sequentially. The problem with that is we only have a handful of application IDs. So if we wanted to run this one script 100 times, we&amp;rsquo;re going to run out of data. What we can do here is add &lt;code&gt;circular&lt;/code&gt;. That way, when the script reaches the very last value of the file, the next value it selects will be the first one, and it never runs out of test data.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;TestData&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;fromCSV&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;AppData&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;applicationids.csv&amp;#39;&lt;/span&gt;)    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; .&lt;span style="color:#a6e22e"&gt;circular&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Another thing you might be wondering is how to make it so that Element chooses a random value every time. To do that, we&amp;rsquo;ll also have to add &lt;code&gt;shuffle&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;TestData&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;fromCSV&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;AppData&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;applicationids.csv&amp;#39;&lt;/span&gt;)    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; .&lt;span style="color:#a6e22e"&gt;circular&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;‍Now let&amp;rsquo;s try to run the test.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;element run test-data.ts
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As you can see, it&amp;rsquo;s been finished. The application ID that was selected was indeed a random one because the first one would have started with A. So, it actually chose the last one randomly.&lt;/p&gt;
&lt;p&gt;And that&amp;rsquo;s it for test data with Element. Now, this user actually had a follow-up question, which was about unique test data. I&amp;rsquo;m going to answer that in the next video. Until next time, happy Flooding!&lt;/p&gt;
&lt;h2 id="sample-script"&gt;Sample script&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;import&lt;/span&gt; { &lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;TestSettings&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;Until&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;By&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;Browser&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;TestData&lt;/span&gt; } &lt;span style="color:#a6e22e"&gt;from&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;@flood/element&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;import&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;as&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;assert&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;from&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;assert&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;export&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;const&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;settings&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;TestSettings&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; {    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;loopCount&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;,    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;description&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;Test Data&amp;#39;&lt;/span&gt;,    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;screenshotOnFailure&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;disableCache&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;clearCache&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;clearCookies&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;/*** Test Data * Version: 1.0 */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;export&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;default&lt;/span&gt; () =&amp;gt; {    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;interface&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;AppData&lt;/span&gt; {        
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;applicationId&lt;/span&gt; &lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;string&lt;/span&gt;    }    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;TestData&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;fromCSV&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;AppData&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;applicationids.csv&amp;#39;&lt;/span&gt;)    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; .&lt;span style="color:#a6e22e"&gt;circular&lt;/span&gt;()    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; .&lt;span style="color:#a6e22e"&gt;shuffle&lt;/span&gt;()    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;Print to console&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;async&lt;/span&gt; (&lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Browser&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;data&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;AppData&lt;/span&gt;) =&amp;gt; {        
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;console&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;log&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;application ID: &amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;`&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;data&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;applicationId&lt;/span&gt;&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;`&lt;/span&gt;)    
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; })
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Load testing on the Google Cloud Platform</title><link>https://nicolevanderhoeven.com/blog/20200528-load-testing-on-google-cloud-platform/</link><pubDate>Thu, 28 May 2020 22:25:06 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200528-load-testing-on-google-cloud-platform/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/load-testing-on-the-google-cloud-platform"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/load-testing-on-the-google-cloud-platform"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re excited to welcome another cloud provider to the Flood lineup, giving you even more options for running your load tests. You can now use Flood to run load tests on the &lt;a href="https://cloud.google.com/"&gt;Google Cloud Platform (GCP)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Many of you have requested an integration with Google Cloud, citing many of its strengths:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Full &lt;a href="https://cloud.google.com/blog/products/open-source/bringing-the-best-of-open-source-to-google-cloud-customers"&gt;integrations with open-source tools&lt;/a&gt; like Influx and Redis&lt;/li&gt;
&lt;li&gt;World-class &lt;a href="https://cloud.google.com/security"&gt;security&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;High-performance &lt;a href="https://cloud.google.com/infrastructure"&gt;global network&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Seamless access to other apps in the Google ecosystem, such as Search and Maps&lt;/p&gt;
&lt;p&gt;We think that adding support for GCP instances opens up a lot of opportunities for flooders wanting to take advantage of these benefits.&lt;/p&gt;
&lt;h2 id="using-flood-with-google-cloud"&gt;Using Flood with Google Cloud&lt;/h2&gt;
&lt;p&gt;You&amp;rsquo;ll notice a new Google Cloud section in &lt;a href="https://app.flood.io/account/integrations"&gt;the Integrations page&lt;/a&gt; while you&amp;rsquo;re logged into Flood:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200528-01.png" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll need to add your GCP service account key to allow Flood to access your account on your behalf. Once you&amp;rsquo;ve done this, you&amp;rsquo;ll be able to start grids and floods right from the Flood interface you&amp;rsquo;re already using.&lt;/p&gt;
&lt;p&gt;For more details on how to set up Flood to use your GCP account, check out &lt;a href="https://guides.flood.io/infrastructure/host-your-own-infrastructure/using-your-own-google-cloud-account"&gt;our documentation&lt;/a&gt; or follow along with the video below:&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/oYTo0jwRfMo?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Anyone with a Flood subscription, including a free one, can use Google Cloud instances at no extra cost from Flood; however, GCP usage may incur separate costs.&lt;/p&gt;
&lt;p&gt;GCP is the third cloud provider that we support at Flood, after &lt;a href="https://guides.flood.io/infrastructure/host-your-own-infrastructure/using-your-own-aws-account"&gt;Amazon Web Services&lt;/a&gt; and &lt;a href="https://guides.flood.io/infrastructure/host-your-own-infrastructure/using-your-own-azure-account"&gt;Microsoft Azure&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Ask a Flooder 15: How do I install Element?</title><link>https://nicolevanderhoeven.com/blog/20200512-aaf15/</link><pubDate>Tue, 12 May 2020 22:45:18 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200512-aaf15/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-15-how-do-i-install-element-video"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/ask-a-flooder-15-how-do-i-install-element-video"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this Flood Element tutorial, I demonstrate the steps required to install Flood Element, including dependencies it requires. Flood Element is an open-source browser-based load testing tool created by Tricentis Flood.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bit.ly/2YM1mnV"&gt;Learn more about Flood Element&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://nodejs.org/en/download/current/"&gt;Installation instructions for NodeJS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://classic.yarnpkg.com/en/docs/install/"&gt;Installation instructions for Yarn&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bit.ly/2yuYrWl"&gt;Installation instructions for Element&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=oWtnStKrh98"&gt;Video: Getting Started with Element&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bit.ly/2YJIQg5"&gt;Guides: Using Element with Flood‍&lt;/a&gt;&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/N7VLqqueqJE?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Audio version here:&lt;/p&gt;
&lt;iframe src="https://open.spotify.com/embed-podcast/episode/6EZ97ImNGUiDAGcEyGGNYM" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media"&gt;&lt;/iframe&gt;
&lt;h2 id="transcript"&gt;Transcript&lt;/h2&gt;
&lt;p&gt;Hi everyone, Nicole van der Hoeven here again, back with another Ask a Flooder, and today&amp;rsquo;s question is: &amp;ldquo;How do I install Element?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Now, I already made a previous video on how to get started with Element, but I didn&amp;rsquo;t actually go into the details of how to install it, so that&amp;rsquo;s what I&amp;rsquo;m going to do in this video today. There are actually a few parts to installing Element, and all of these instructions are going to be on &lt;a href="http://element.flood.io/"&gt;element.flood.io&lt;/a&gt;. If you go onto the site and click on Install, you&amp;rsquo;ll see all of the instructions depending on which operating system you&amp;rsquo;re on.&lt;/p&gt;
&lt;p&gt;First, you need to install NodeJS. This is sort of like how, if you&amp;rsquo;re familiar with JMeter, you have to install Java before installing JMeter. NodeJS is what Element runs on. Secondly, you&amp;rsquo;ll need a package manager. You can use NPM or Yarn, but in this video, I&amp;rsquo;m going to take you through how to do it with Yarn. And thirdly, there&amp;rsquo;s installing Element itself.&lt;/p&gt;
&lt;p&gt;First, download NodeJS. I&amp;rsquo;m going to leave links in the description to all of the sites that I visit so that you can go through all of the instructions later. On the Node site, download whichever installer suits your operating system. Go through the installation steps, and afterwards, check to make sure that NodeJS is properly installed on your machine. You can do that by going into the terminal and typing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;node -v
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Just make sure that the version that&amp;rsquo;s shown here is the same version that you&amp;rsquo;ve downloaded.&lt;/p&gt;
&lt;p&gt;Secondly, install the latest version of Yarn. On the Yarn site, you&amp;rsquo;re going to have to choose your operating system and the version. We recommend using the latest stable version. And then go through the instructions for your operating system. After you&amp;rsquo;ve done that, check your Yarn installation by typing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;yarn --version
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And the last step is installing Element. On the Element site, you can find the exact code that you need to type into your terminal. It&amp;rsquo;s:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;yarn global add @flood/element-cli
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So you can just copy that into your terminal. As of the time of this recording, the latest version of Element is 1.2.3. Looks like that&amp;rsquo;s installed. To check the version of Element, type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;element --version
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So that&amp;rsquo;s how to install Element. We&amp;rsquo;ve gotten a lot of questions recently about Element in particular, so I&amp;rsquo;m going to answering them in future videos. Hope this helped, and until next time, happy flooding!&lt;/p&gt;</description></item><item><title>Innovation in Isolation</title><link>https://nicolevanderhoeven.com/blog/20200505-innovation-in-isolation/</link><pubDate>Tue, 05 May 2020 22:59:57 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200505-innovation-in-isolation/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/innovation-in-isolation"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/innovation-in-isolation"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ve always been a fully distributed team at Flood, but the current world crisis has still changed the way we work. Here are some of the things we&amp;rsquo;re doing to keep self-isolation from being &lt;em&gt;too&lt;/em&gt; isolating— and maybe it&amp;rsquo;ll help your team too!&lt;/p&gt;
&lt;p&gt;Within the Flood team, flooders-in-training (aka children) have made more surprise appearances in team meetings. Work has been punctuated with grocery runs to buy essentials before they run out. Some of us who were out of our home countries when all this happened have had to arrange emergency travel before international borders shut. It would be foolish to deny the impact on team morale as the entire world goes through this collective trauma, eyes glued to numbers that increase by the minute.&lt;/p&gt;
&lt;p&gt;Not exactly the most productive work environment.&lt;/p&gt;
&lt;p&gt;Yet there&amp;rsquo;s still work to be done (something we&amp;rsquo;re grateful for), and there are still many features we&amp;rsquo;d love to bring to Flood. So how do we keep everyone motivated to release and maintain software?&lt;/p&gt;
&lt;h2 id="encouraging-banter"&gt;Encouraging banter&lt;/h2&gt;
&lt;p&gt;Work shouldn&amp;rsquo;t be all about work. Understanding everyone&amp;rsquo;s personal circumstances is vital to a team&amp;rsquo;s ability to work together professionally. We use Slack as our primary communication tool throughout the day, and we already had quite a few non-work channels on there (#anything, #hobbies, #gaming, #drones, and #travel to name a few). Now we have one for COVID-related chatter as well.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200505-01.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;In this channel, we share news from our parts of the world, post photos of things that are sold out in our local supermarkets, talk about new hobbies we&amp;rsquo;ve taken up to stay sane, and discuss the struggles of co-working with spouses and children who are now also working or studying from home.&lt;/p&gt;
&lt;p&gt;Having a dedicated channel gives people license to open up about what&amp;rsquo;s going on in their personal lives, and it helps the team understand where everyone&amp;rsquo;s headspace is at. We also use #eng-covid-19 for memes. A lot of memes. It&amp;rsquo;s easier to work through a tough situation if you can laugh about it together.&lt;/p&gt;
&lt;h2 id="over-communicating"&gt;Over-communicating&lt;/h2&gt;
&lt;p&gt;Our co-founder and Product Manager, Ivan Vanderbyl, recently &lt;a href="https://enterprisersproject.com/article/2020/4/9-collaboration-tool-tips-remote-teams"&gt;wrote a great article&lt;/a&gt; with some tips for keeping communication lines open. This is particularly important during this crisis, where schedules and priorities can change quickly.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Emojis - We use emojis as a non-verbal cue to convey tone, approval, agreement, and disagreement. We add emojis to messages we send and also use them as reactions on Slack to messages from other people. Even when you don&amp;rsquo;t have an answer or when a response is not required, emojis signal acknowledgment so that nobody feels like they&amp;rsquo;re shouting into the void. Over time, we&amp;rsquo;ve developed emojis that are specific to Flood culture, such as the avocado:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200505-02.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Source: Our &lt;a href="https://twitter.com/flood_io/status/1230166412066512896"&gt;Twitter account&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;‍We even have a fruit-based vocabulary of emojis that we can use in our Slack status messages to convey our general mood. Being in Carrot Mode, for instance, means that you&amp;rsquo;re trying to focus and would appreciate not being direct messaged or @ mentioned.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200505-03.png" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;‍When working remotely, and especially when in self-isolation, everyone has their own cadence for working. It&amp;rsquo;s on each person to communicate that schedule so that others can respect it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Text chat - We&amp;rsquo;re used to working asynchronously due to time zones, so text-based discussions are necessary. We try to over-communicate and &amp;ldquo;think out loud&amp;rdquo; before making decisions just in case we have to suddenly stop working due to illness or other pandemic-related reasons. Even something as simple as leaving a link to a document that we&amp;rsquo;re working on means that someone else will be able to find it if we&amp;rsquo;re unavailable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Voice chat - We tend to use voice chat for quick discussions or updates about work-related things. It&amp;rsquo;s also great for those of us in Europe who are suffering from slower internet connection speeds at certain times of the day due to everyone being home and streaming Netflix.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Video calls - Video calls are for team retros, 1:1 calls with managers, and personal or sensitive conversations where body language is crucial. It&amp;rsquo;s also great for recreating that &amp;ldquo;hanging out at a pub&amp;rdquo; vibe. Speaking of which&amp;hellip; welcome to the Flood pub!&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200505-04.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;The Flood Pub is open on Friday afternoons. It&amp;rsquo;s where we all hang out together with a beverage of our choice and talk about things that are entirely not work-related. We hop on a Zoom call together, Tim (our General Manager) fires up the &amp;ldquo;jukebox&amp;rdquo; (Spotify playlist), and we end the week by getting some facetime with each other—just as we would do (and have done) if we were together in person.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200505-05.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;‍Meeting in this low-pressure context lets us talk about things we wouldn&amp;rsquo;t mention otherwise. It&amp;rsquo;s also a fun way to check in with each other after another week at work (and in quarantine).&lt;/p&gt;
&lt;h2 id="doing-stuff"&gt;Doing stuff&lt;/h2&gt;
&lt;p&gt;While communicating openly is productive, getting stuff done as a team boosts spirits.  Here&amp;rsquo;s what we&amp;rsquo;ve done recently to kick our output into high gear.&lt;/p&gt;
&lt;h3 id="boinc"&gt;BOINC&lt;/h3&gt;
&lt;p&gt;Like most of you, we&amp;rsquo;ve been cooped up in our houses, watching events unfold and feeling helpless as things happen that are beyond our control. BOINC gives us a chance to do something to contribute that IS in our control.&lt;/p&gt;
&lt;p&gt;BOINC is a platform by the University of California Berkeley that lets you volunteer your spare computer (or mobile device!) processing power to science. From the official site, Boinc &amp;ldquo;downloads scientific jobs to your computers and runs them invisibly in the background.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;In our case, we wanted to help sequence proteins like the novel coronavirus using Rosetta@Home. BOINC is a perfect fit for Flood because we are in the unique position of starting up and managing thousands of virtual machines 24/7. Our Ops team has been hard at work automating the donation of our computing power to the Rosetta@Home project when these machines aren&amp;rsquo;t being used.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200505-06.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re proud to say our contribution is INcreasing over time as our engineers find new ways to streamline the process. We&amp;rsquo;re already in the &lt;a href="https://www.boincstats.com/stats/-1/user/detail/87605321733/overview"&gt;top 5% of BOINC users in the world&lt;/a&gt; by contribution.&lt;/p&gt;
&lt;h3 id="gig-great-ideas-gathering"&gt;GIG: Great Ideas Gathering&lt;/h3&gt;
&lt;p&gt;Every year, the mothership (Tricentis) runs a three-day hackathon called GIG. Two weeks ago was the first-ever GIG where most participants, not just the Flood team, were working remotely.&lt;/p&gt;
&lt;p&gt;The theory behind hackathons is that the daily grind can be exhausting after a while, and it can sometimes be beneficial to introduce a short burst of work to revitalize the team. Hackathons provide a framework for small groups to pitch, execute, and report on a single idea without committing too much time to it. Everyone gets a chance to step away from regular duties and work furiously together on something they might not have otherwise gotten to work on.&lt;/p&gt;
&lt;p&gt;A hackathon where the team members are separated by distance and timezone is certainly another beast, but here are some lessons we learned about remote hackathons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Come up with a good idea&lt;/strong&gt;: This is easier said than done, but a good hackathon idea is a creative solution that delivers a lot of value. Here are the ideas we came up with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Floody - Use AI to improve onboarding by walking new users through the steps for running a flood (live on Flood now!)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Flood Bot - Add smarter checks to detect patterns in load tests and help flooders understand their results (prototype)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Flood Gate - Use AWS Fargate to reduce costs in provisioning, scaling, and managing virtual servers by about 30% (proof of concept)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When thinking up ideas for GIG, we didn&amp;rsquo;t commit to releasing them publicly. Even a project idea that doesn&amp;rsquo;t end up making it into the finished product is an occasional worthwhile detour for team productivity and morale.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Limit scope&lt;/strong&gt;: GIG is a sprint, not a marathon. While my team (comprised of Jason Rizio and me) was planning out what we wanted to do, we quickly realized that there was a lot more that we wanted to do, but it just wasn&amp;rsquo;t feasible within the strict timeframe. In the end, we decided to go for an incremental piece of work that we could push to production before the deadline instead of completing just one step towards something abstract and unreleasable.The other Flood teams also needed to whittle down the scope to a smaller, completable chunk: a working prototype.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clarify assignments&lt;/strong&gt;: With members on different timezones, it was essential to have an initial meeting to plan out everything that needed to be done and by when. In this situation particularly, we found it useful to split apart the project into independent chunks, to minimize the need to collaborate in real-time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Touch base regularly&lt;/strong&gt;: When working independently, team members can quickly diverge off the main path. To avoid that, we met up at least daily by hopping on an audio call on Zoom to spend a few minutes updating each other on the work we&amp;rsquo;d done. Doing this gives others a chance to help out when one member encounters roadblocks.For anything that didn&amp;rsquo;t need to be real-time, we worked asynchronously on chat. Here&amp;rsquo;s a screenshot of the number of messages and files exchanged to our dedicated GIG Slack channel during the event:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200505-07.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;‍Yup, 1,535 messages and 60 files in 3 days. That&amp;rsquo;s collaboration!&lt;/p&gt;
&lt;p&gt;We generally prefer public rather than private channels, and we certainly stuck to that throughout GIG. When you&amp;rsquo;re working with more than one person, it&amp;rsquo;s counterproductive to have private conversations that can&amp;rsquo;t be referenced by other people.&lt;/p&gt;
&lt;p&gt;We also learned that it&amp;rsquo;s useful to keep tabs on what the other teams are doing. After the event started, my team realized that another team was changing a page on the Flood app that we intended to use. Luckily, both teams were able to work around it.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also only fair to let other teams chime in on important decisions within the project that might affect future work— like the name for your mascot.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200505-08.jpeg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Leave time for the video&lt;/strong&gt;: It&amp;rsquo;s not just about doing the work; it&amp;rsquo;s about communicating what you&amp;rsquo;ve done in a way that others can appreciate. Here&amp;rsquo;s a video that my team (composed of Jason Rizio and me) put together for Floody and our improvements to the onboarding process:&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/OeIPWovOua4?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Celebrate&lt;/strong&gt;: After the work is done, don&amp;rsquo;t forget to pat each other on the back for the hard work! For us, this meant &lt;a href="https://twitter.com/c_a_dunlop/status/1246111919762591746"&gt;a round of tacos&lt;/a&gt; for everyone and a trip to the Flood pub. (Why do we have so many food-based rewards?)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="its-not-easy"&gt;It&amp;rsquo;s not easy&lt;/h2&gt;
&lt;p&gt;Keeping a team unified and working efficiently towards a common goal is always tricky, and working remotely, especially during a world crisis, doesn&amp;rsquo;t change that. Distributed team members need to put in more effort to consciously over-communicate, make room for each other&amp;rsquo;s unique circumstances, and do little projects that foster creativity when we&amp;rsquo;re all feeling a little lackluster. Incorporating these tips can create a culture of healthy productivity within a remote team.&lt;/p&gt;
&lt;p&gt;‍&lt;/p&gt;</description></item><item><title>On-premise load testing advantages and disadvantages</title><link>https://nicolevanderhoeven.com/blog/20200430-on-premise-load-testing/</link><pubDate>Thu, 30 Apr 2020 23:06:59 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200430-on-premise-load-testing/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/on-premise-load-testing-advantages-and-disadvantages"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/on-premise-load-testing-advantages-and-disadvantages"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Where you run your load test can affect the results that you get as well as your project&amp;rsquo;s bottom line. In general, there are two infrastructure options to consider for load testing your apps: on-premise and cloud. Which type of environment is best for load testing both web or mobile apps?&lt;/p&gt;
&lt;h2 id="differences-between-on-premise-and-cloud-load-testing"&gt;Differences between on-premise and cloud load testing&lt;/h2&gt;
&lt;h3 id="what-is-on-premise-load-testing"&gt;What is on-premise load testing?&lt;/h3&gt;
&lt;p&gt;On-premise load testing is running your performance or load testing scripts on load generators you physically control. Typically, these load generators are machines that are either in your office or data center. In on-premise load testing, you are responsible for all aspects of the maintenance of the load generators, including hardware upgrades and software installations such as testing tools, but that also comes with increased control and security.&lt;/p&gt;
&lt;h3 id="what-is-cloud-load-testing"&gt;What is cloud load testing?&lt;/h3&gt;
&lt;p&gt;In cloud load testing, you run your load tests on a service provider&amp;rsquo;s machines, effectively outsourcing the provisioning and maintenance of your load generators. Running &amp;ldquo;on the cloud&amp;rdquo; means you&amp;rsquo;re paying someone else to be responsible for these machines. In cloud load testing, you don&amp;rsquo;t &amp;ldquo;own&amp;rdquo; the machines your test is running on; it&amp;rsquo;s more like renting some time on someone&amp;rsquo;s data center whenever you need it. Cloud-based infrastructure isn&amp;rsquo;t necessarily less secure than on-premise infrastructure, but there are certainly more security considerations to keep in mind.&lt;/p&gt;
&lt;h3 id="pros-and-cons-of-on-premise-load-testing"&gt;Pros and cons of on-premise load testing&lt;/h3&gt;
&lt;p&gt;On-premise load testing is no better or worse than cloud load testing; it just depends on what you need. There&amp;rsquo;s a meme that the cloud is just a fancy term for someone else&amp;rsquo;s computer— but &lt;a href="https://www.zdnet.com/article/stop-saying-the-cloud-is-just-someone-elses-computer-because-its-not/"&gt;that&amp;rsquo;s an oversimplification&lt;/a&gt; that glosses over nuances that might make a difference to your bottom line.&lt;/p&gt;
&lt;p&gt;Here are some questions to ask yourself when deciding between load testing on the cloud or on-premise.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200430-01.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Test infrastructure can make or break your load tests.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id="cloud-vs-on-premise-load-testing-how-do-you-decide"&gt;Cloud vs. on-premise load testing: how do you decide?&lt;/h3&gt;
&lt;h4 id="why-are-you-running-a-load-test"&gt;Why are you running a load test?&lt;/h4&gt;
&lt;p&gt;If your intention for running load tests is to test your web application&amp;rsquo;s load balancing, the source of the web traffic, and the location of your environment, may not be as important. If you intend to do stress testing, you may want the scalability of a cloud setup.&lt;/p&gt;
&lt;h4 id="who-is-the-intended-audience-of-your-application"&gt;Who is the intended audience of your application?‍&lt;/h4&gt;
&lt;p&gt;Load testing is most accurate when it is as realistic to the production workload and user base as possible. Running a load test on-premises means that the traffic comes from one location, which could be ideal if your application is an internal one.&lt;/p&gt;
&lt;h5 id="do-you-have-the-resources-in-your-teamcompany-to-maintain-load-generators"&gt;Do you have the resources in your team/company to maintain load generators?&lt;/h5&gt;
&lt;p&gt;All machines need to be provisioned, set up, and maintained to function correctly. Depending on how many machines you need, you may even need a team of trained professionals to monitor your environment.&lt;/p&gt;
&lt;h4 id="what-is-your-budget"&gt;What is your budget?&lt;/h4&gt;
&lt;p&gt;Both cloud and on-premise load testing have costs. Cloud load testing requires a smaller outlay of cash initially but may cost more to maintain as you continue to pay for the computing time. On-premise load testing requires more money upfront but may cost less to maintain in the long run.&lt;/p&gt;
&lt;h4 id="how-many-virtual-users-do-you-want-to-run"&gt;How many virtual users do you want to run?&lt;/h4&gt;
&lt;p&gt;The number of virtual users you intend to test your application against correlates to the number of load generators you require. In general, the more machines you need, the more expensive it becomes (for both cloud and on-premise load testing), but if you only need a handful of users, perhaps you can find a machine or two on-premise that could do the trick.&lt;/p&gt;
&lt;h3 id="advantages-of-on-premise-load-testing"&gt;Advantages of on-premise load testing&lt;/h3&gt;
&lt;p&gt;‍
&lt;img src="https://nicolevanderhoeven.com/assets/20200430-02.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h4 id="increased-control"&gt;Increased control&lt;/h4&gt;
&lt;p&gt;Since you own the machines you&amp;rsquo;re testing on, you can set your environment up with your exact specifications in mind. You&amp;rsquo;ll be able to make hardware upgrades or update versions of operating systems and load testing tools whenever you want, without needing to liaise with a third-party provider. This option can come in handy if you routinely use non-standard configurations or legacy software. If you&amp;rsquo;re also doing other types of non-functional testing, like security testing, it may be easier to change the configuration on on-premise machines.&lt;/p&gt;
&lt;h4 id="greater-data-security"&gt;Greater data security&lt;/h4&gt;
&lt;p&gt;The question of cloud vs. on-premises may be a business decision. Some industries or businesses with stringent compliance and regulatory requirements may have no choice but to run tests on-premise because owning the load generators also means controlling who has access to the data that&amp;rsquo;s on them. An on-premise environment lets you lock down access if necessary. With cloud load testing, you&amp;rsquo;d need to have security arrangements with the cloud provider that you choose so that any test data or identifying client information seen or accessed by your test scripts remains confidential.&lt;/p&gt;
&lt;h4 id="lower-cost-and-lower-barrier-to-entry-in-some-situations"&gt;Lower cost and lower barrier to entry in some situations&lt;/h4&gt;
&lt;p&gt;If you don&amp;rsquo;t intend to run too many users of your test script and you already have a spare machine or two at the office, on-premise load testing may be the easiest and most cost-effective way to get started. This way, you avoid having to request the budget for a new tool and needing to train your team on a new interface.&lt;/p&gt;
&lt;h4 id="fewer-variations-due-to-latency"&gt;Fewer variations due to latency&lt;/h4&gt;
&lt;p&gt;Controlling your own load generators means controlling the network they run on. If your corporate network is generally stable, and your test scenarios don&amp;rsquo;t involve testing from different geographical locations, reported response times (and user experience) more closely reflect server processing time rather than latency and travel time.&lt;/p&gt;
&lt;h3 id="disadvantages-of-on-premise-load-testing"&gt;Disadvantages of on-premise load testing&lt;/h3&gt;
&lt;p&gt;‍
&lt;img src="https://nicolevanderhoeven.com/assets/20200430-03.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h4 id="higher-cost-in-some-situations"&gt;Higher cost in some situations&lt;/h4&gt;
&lt;p&gt;Maintaining your own load generators comes with a higher up-front cost, which may be a showstopper for smaller projects or companies. The more concurrent users you require for your load test, the more machines you need, the more licenses you need for your testing tool (unless it&amp;rsquo;s open source), and the longer it takes to recover your investment.&lt;/p&gt;
&lt;h4 id="geographical-limitations"&gt;Geographical limitations&lt;/h4&gt;
&lt;p&gt;Since all your machines are in one place, you can&amp;rsquo;t accurately simulate the user experience for customers who might access your web app from another location. You also can&amp;rsquo;t fully test the effect of CDNs and other tools that your application might employ to keep response times low. Web apps that can be accessed by anyone on the internet might require performance tests that take into account customers from different regions.&lt;/p&gt;
&lt;h4 id="more-setup"&gt;More setup&lt;/h4&gt;
&lt;p&gt;You need to do all the setup yourself for both hardware and software components. You also need a way to coordinate your test, so that load generators start and end when you want them to. You may want to divert some resources towards environment management.&lt;/p&gt;
&lt;h4 id="less-flexibility"&gt;Less flexibility&lt;/h4&gt;
&lt;p&gt;With on-premise load generators, you can&amp;rsquo;t add, remove, or scale up nodes on the fly according to your test— something cloud load testing excels at.&lt;/p&gt;
&lt;h2 id="on-premise-load-testing-best-practices"&gt;On-premise load testing best practices&lt;/h2&gt;
&lt;p&gt;The environment you&amp;rsquo;re testing in is especially important when you&amp;rsquo;re using your own infrastructure. Here are some best practices for a performance testing strategy that involves on-premise load generation.&lt;/p&gt;
&lt;h3 id="run-baseline-tests"&gt;Run baseline tests&lt;/h3&gt;
&lt;p&gt;Treat load testing like a scientific experiment. Before you begin changing variables to improve performance, spend some time figuring out your test configuration so that it&amp;rsquo;s repeatable. Pay attention to things like workloads, business processes, the number of users you&amp;rsquo;re running per load generator, test environment configuration values, script pacing and think time set in your testing tool, and test script transactions. Make sure that the resource utilization on your machines remains healthy during a test; otherwise, you&amp;rsquo;re load testing the load generators themselves rather than your application servers.&lt;/p&gt;
&lt;p&gt;Then, run a few tests against your application servers without making any changes. This way, you create a &amp;ldquo;control group&amp;rdquo; or control test against which to compare future tests.&lt;/p&gt;
&lt;p&gt;This process is called &lt;em&gt;baselining&lt;/em&gt; your application performance.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200430-04.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Flood&amp;rsquo;s Project View lets you track an application&amp;rsquo;s performance over time and compare recent tests to a baseline&lt;/em&gt;
‍&lt;/p&gt;
&lt;h3 id="consider-using-containers-or-virtual-machine-images"&gt;Consider using containers or virtual machine images&lt;/h3&gt;
&lt;p&gt;Along the lines of reducing variables, it&amp;rsquo;s especially important to use load generators that are as identical as you can make them. You can manually check that you&amp;rsquo;re installing the same software and tools on each one, or you can do as cloud providers do and automate this process.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s easy to miss software that are necessary for monitoring or the load testing tool you&amp;rsquo;re using. For example, JMeter and Gatling require certain versions of Java. Test automation or browser-level load testing tools might require web browsers.&lt;/p&gt;
&lt;p&gt;You can use &lt;a href="https://www.docker.com/resources/what-container"&gt;containers such as Docker&lt;/a&gt; to create a standalone package of everything you need for your test. Alternatively, if you&amp;rsquo;re using virtual machines, you can also create a full system image that you can use for every virtual machine.&lt;/p&gt;
&lt;p&gt;The difference between the two is that a container lets you be more granular about what is included in the package that you then deploy to all your load generators. Virtual machines include hardware components that you can set, whereas containers are software-only, decreasing package sizes.&lt;/p&gt;
&lt;p&gt;Using containers or images allows you to keep your load generators as identical as possible (in terms of hardware and software) so that you can assume similar results from each one.&lt;/p&gt;
&lt;p&gt;‍‍&lt;img src="https://nicolevanderhoeven.com/assets/20200430-05.jpg" alt="" loading="lazy" decoding="async"&gt;
‍&lt;/p&gt;
&lt;h3 id="dont-neglect-monitoring"&gt;Don&amp;rsquo;t neglect monitoring&lt;/h3&gt;
&lt;p&gt;It&amp;rsquo;s easy to forget that your application servers aren&amp;rsquo;t the only ones that need monitoring. Your load generators need monitoring as well, so that they don&amp;rsquo;t end up being the bottleneck in your tests. Here&amp;rsquo;s &lt;a href="https://flood.io/blog/load-testing-tutorial-server-monitoring"&gt;a starter list of server metrics&lt;/a&gt; that you should consider monitoring.&lt;/p&gt;
&lt;p&gt;You might also consider how you can integrate &lt;a href="https://stackify.com/mistakes-evaluating-application-performance-management/"&gt;performance management&lt;/a&gt; tools you already use into your monitoring strategy.&lt;/p&gt;
&lt;h3 id="spend-time-on-a-framework-for-gathering-data"&gt;Spend time on a framework for gathering data&lt;/h3&gt;
&lt;p&gt;One of the biggest challenges in on-premise load testing is figuring out how to get data from your tests. Each machine runs your test script independently of the others, so at the end of your test, you&amp;rsquo;re likely to end up with several results files. After you download these off every machine, how do you combine them into a single summary?&lt;/p&gt;
&lt;p&gt;Manually collating results is an option, but it&amp;rsquo;s a tedious one. You can copy all the files into one directory and then concatenate them so that you end up with one giant one. Depending on the size of those results files and how long you ran the test, however, this may not be feasible. For larger files, you might consider aggregating the data and increasing the granularity, so that instead of seeing raw response time for every transaction, you only see the average response time for every 15 seconds. You can use a tool like &lt;a href="https://www.elastic.co/logstash"&gt;Logstash&lt;/a&gt; for this.&lt;/p&gt;
&lt;p&gt;It takes some time and technical expertise to set up a framework for results gathering that works for your purposes, especially if you want to go a step further and have real-time results.&lt;/p&gt;
&lt;p&gt;Of course, you can also skip this part by just using the framework we&amp;rsquo;ve already set up on Flood. Tim Koopmans, our co-founder, created the first prototype of what would become Flood specifically because he got tired of having to set up this framework for every engagement.&lt;/p&gt;
&lt;h2 id="how-to-run-an-on-premise-load-test-with-flood-agent"&gt;How to run an on-premise load test with Flood Agent&lt;/h2&gt;
&lt;p&gt;‍
The easiest way to get started with an on-premise load test is by using &lt;a href="https://flood.io/blog/introducing-flood-agent-standalone-infrastructure-for-load-testing"&gt;Flood Agent&lt;/a&gt;. Flood Agent is an executable that you can install onto a machine that effectively turns it into a full-fledged load generator. Then, you can start a test from the Flood web interface and have your test script start running on your machines.&lt;/p&gt;
&lt;p&gt;Agent takes care of a few typical problems we&amp;rsquo;ve discussed so far:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It uses containers to ensure that load generators are identically provisioned.&lt;/li&gt;
&lt;li&gt;It automatically gathers CPU, memory, and network metrics on load generators.&lt;/li&gt;
&lt;li&gt;It coordinates the execution of the load test so that you only need to start it from one central place.&lt;/li&gt;
&lt;li&gt;It enables real-time monitoring of results while the test is running.&lt;/li&gt;
&lt;li&gt;It aggregates and collates all the results for you into a dashboard.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We think Agent addresses pain points that we&amp;rsquo;ve seen over and over again in our own on-premise performance testing projects as well as in our customers&amp;rsquo;. Agent is a &lt;a href="https://github.com/flood-io/flood-agent/releases/latest"&gt;free download&lt;/a&gt; and works with &lt;a href="https://guides.flood.io/scripting-and-tools/choosing-a-tool"&gt;all performance testing tools that Flood supports&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;On-premise load testing is still a valid option despite the growth in popularity of cloud-based infrastructure, and it has its advantages and disadvantages. This type of load testing trades a little bit of flexibility for increased data security and control, which is a tradeoff that some companies may be willing to make.&lt;/p&gt;
&lt;p&gt;On-premise load testing has traditionally included a lot of tedious setup and maintenance. Still, you can reduce maintenance effort by creating an internal load testing framework upfront that automates coordination, monitoring, and results collection. Using Flood Agent can mitigate time spent on this initial setup.&lt;/p&gt;</description></item><item><title>Ask a Flooder 13: How do you do mobile load testing?</title><link>https://nicolevanderhoeven.com/blog/20200428-aaf13/</link><pubDate>Tue, 28 Apr 2020 23:21:08 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200428-aaf13/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-13-how-do-you-do-mobile-load-testing"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/ask-a-flooder-13-how-do-you-do-mobile-load-testing"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;How do you load test a native mobile app? I discuss the general approach to mobile load testing, what a device farm is, and why a device farm isn&amp;rsquo;t necessary for load testing. I also discuss the best mobile load testing tools to use.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/y_rRu0cDey4?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Or listen to the audio version here:&lt;/p&gt;
&lt;iframe src="https://open.spotify.com/embed-podcast/episode/2fevtJd7pPIAUDkMpdnzkV" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media"&gt;&lt;/iframe&gt;
&lt;p&gt;Hi everyone, Nicole here again, back with another Ask a Flooder, and today&amp;rsquo;s question is:&lt;/p&gt;
&lt;h2 id="how-do-you-do-mobile-load-testing"&gt;How do you do mobile load testing?&lt;/h2&gt;
&lt;p&gt;Now, this question came from a customer who was under the misconception that in order to do mobile load testing, they would need to use what we call a device farm. A device farm is a collection of different kinds of mobile phones. You would ideally have the most popular makes of mobile phones (the hardware models) and the operating systems and system versions. You can imagine that this can very easily get a little out of hand to coordinate because of fragmentation. There are just so many devices out on the market, and then there&amp;rsquo;s the question of how you actually generate the load from that.&lt;/p&gt;
&lt;p&gt;You would somehow need some sort of test automation script that was running and then coordinate os that they all run at the same time, and you would use that as a load test. As you can imagine, whether you use real devices or simulators, this kind of thing would get complicated and expensive very quickly. But the good news is that it&amp;rsquo;s unnecessary if it&amp;rsquo;s load testing that you want to do. Now I say that because, for functional testing or compatibility testing, you ARE going to want to test your application on a variety of different browsers. But with load testing, you&amp;rsquo;re really more concerned about the back end part of the equation. You want to generate load on your application servers. In reality, most mobile apps work by sending API requests to that server, usually by some sort of restful API. Luckily, API load testing has been around for a while, so we do have some industry-tested ways to run this.&lt;/p&gt;
&lt;h2 id="what-are-the-best-tools-for-api-load-testing"&gt;What are the best tools for API load testing?&lt;/h2&gt;
&lt;p&gt;Essentially, you&amp;rsquo;re going to want to test protocol-level tools. That means that you don&amp;rsquo;t want to be using browser-level tools in which you&amp;rsquo;re using scripts to drive a full browser. All you really need is something that sends requests on the protocol-level. That&amp;rsquo;s great because it&amp;rsquo;s actually way more efficient.&lt;/p&gt;
&lt;p&gt;You have two really good open-source options for this, JMeter and Gatling. I&amp;rsquo;ve already gone a little bit into the differences between these two in my previous video on how you choose a tool for load testing, which I will leave a link to.&lt;/p&gt;
&lt;p&gt;And here are some other resources that will help you get started with mobile load testing. I also have another video about how to record network traffic from a native mobile app on JMeter, which sounds a little complicated, but I promise it&amp;rsquo;s not. In that video, I go over the steps with you, and I&amp;rsquo;m actually doing it in real-time with you as well. I show you the screen recording from my mobile and from JMeter on my laptop, so you can always pause and watch it at your own pace.&lt;/p&gt;
&lt;p&gt;The second thing is that I already wrote a blog post, which is sort of a guide for mobile load testing, which goes into the steps into way more detail than I can here.&lt;/p&gt;
&lt;p&gt;And lastly, I have written blog posts about two real-life examples of mobile load testing. The first one was the Iowa Caucus Reporter app. I ran through it from the workload modeling to the scripting and then the actual execution. More recently, I also wrote about the Robinhood app. Be sure to check out the links in the description to find out more.&lt;/p&gt;
&lt;p&gt;Until next time, happy flooding!&lt;/p&gt;</description></item><item><title>Browser-based load testing in 2020</title><link>https://nicolevanderhoeven.com/blog/20200423-browser-based-load-testing-2020/</link><pubDate>Thu, 23 Apr 2020 16:48:09 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200423-browser-based-load-testing-2020/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/browser-based-load-testing-in-2020"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/browser-based-load-testing-in-2020"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We &lt;a href="https://flood.io/blog/level-up-your-load-testing-with-browser-level-users"&gt;first announced&lt;/a&gt; our open-source browser-based load testing tool based on Puppeteer, &lt;a href="https://element.flood.io/"&gt;Flood Element&lt;/a&gt;, in February 2018. Despite our decision to make it an entirely separate tool from Flood, we&amp;rsquo;ve enjoyed using it so much as a team that several of us have written about it:&lt;/p&gt;
&lt;p&gt;Tim Koopmans: &lt;a href="https://flood.io/blog/load-testing-for-devops-with-browser-level-users-blu"&gt;Load testing for DevOps&amp;hellip; with Browser Level Users (BLU)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kevin Dunne: &lt;a href="https://flood.io/blog/a-new-approach-to-load-testing-with-browser-level-users"&gt;A new approach to load testing with browser level users&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;me: &lt;a href="https://flood.io/blog/prepare-for-viral-videos-with-flood-element"&gt;Prepare for viral videos with Flood Element&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lachie Cox: &lt;a href="https://flood.io/blog/why-you-should-load-test-with-browsers"&gt;Why should you load test with real browsers?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;our friend Eduardo Riol, as translated by Antonio Jimenez: &lt;a href="https://flood.io/blog/selenium-vs-puppeteer-for-test-automation-is-a-new-leader-emerging"&gt;Puppeteer vs. Selenium for test automation: is a new leader emerging?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Clearly, we&amp;rsquo;re huge fans of load testing a web application with real browsers. But does the wider software testing industry share that sentiment?&lt;/p&gt;
&lt;h2 id="browser-based-load-testing-in-2020"&gt;Browser-based load testing in 2020&lt;/h2&gt;
&lt;p&gt;Browser-level load testing is still pretty new, and there aren&amp;rsquo;t too many providers offering it right now. Luckily, we just so happen to have access to a database of load tests run on Flood since 2013. Here&amp;rsquo;s a bar chart visualizing data we&amp;rsquo;ve collected about the load testing tools flooders have used (we support Selenium, JMeter, Gatling, and Element).&lt;/p&gt;
&lt;h3 id="load-tests-executed-on-flood-over-time-grouped-by-load-testing-tool"&gt;Load tests executed on Flood over time, grouped by load testing tool&lt;/h3&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200423-01.png" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h3 id="browser-level-load-testing-is-increasing-in-popularity"&gt;Browser-level load testing is increasing in popularity&lt;/h3&gt;
&lt;h4 id="in-2020-almost-35-of-the-load-tests-run-on-flood-are-browser-based-load-tests"&gt;In 2020, almost 35% of the load tests run on Flood are browser-based load tests.&lt;/h4&gt;
&lt;p&gt;While the total number of load tests run across all tools increased across the board, the percentage of tests that utilized Selenium and Element, as compared to JMeter and Gatling, has also increased from 2018. Both Selenium and Element are browser-based load testing tools.&lt;/p&gt;
&lt;p&gt;By contrast, JMeter, a protocol-level load testing tool which previously enjoyed a 70% share of the traffic on Flood, now accounts for only a bit over 50% of usage. JMeter&amp;rsquo;s share of the protocol-level pie is higher than Gatling&amp;rsquo;s, but the percentage of usage for both tools appears to be contracting when compared to that of browser-based tools.&lt;/p&gt;
&lt;h3 id="element-use-is-increasing-faster-than-selenium-use"&gt;Element use is increasing faster than Selenium use&lt;/h3&gt;
&lt;p&gt;Despite the fact that Selenium has been around longer, &lt;strong&gt;25% of all floods today are run using Element&lt;/strong&gt;. This is a significant increase in just two years, and one that bodes well for the future. While we&amp;rsquo;re still fans of Selenium and still support it, one reason we see for the dominance of Element in today&amp;rsquo;s market is resource efficiency.&lt;/p&gt;
&lt;p&gt;In our baseline tests, we&amp;rsquo;ve seen that Element can run from 20-50 users per Flood node (an &lt;a href="https://aws.amazon.com/blogs/aws/m5-the-next-generation-of-general-purpose-ec2-instances/"&gt;AWS m5.xlarge instance&lt;/a&gt;), whereas Selenium can only run up to 5. This leads to some significant cost savings, as running the same number of users with Element requires fewer load generators than with Selenium.&lt;/p&gt;
&lt;p&gt;Another reason might be the fact that Element uses Puppeteer in the background. Puppeteer, developed by Google, understandably shines when driving Google Chrome (and recently, Firefox). Puppeteer load testing is growing in popularity due to the wealth of metrics it has access to.&lt;/p&gt;
&lt;h2 id="how-browser-based-load-testing-works"&gt;How browser-based load testing works&lt;/h2&gt;
&lt;p&gt;Traditional load testing is done on the protocol level by sending messages directly to the web server. These messages are sent without simulating the application interface, and the responses that are received from the server are not visualized, either. &amp;ldquo;Users&amp;rdquo; in protocol-level load testing scripts are actually threads, with each one sending a list of messages at predefined intervals, and we refer to these users as Protocol-Level Users (PLU). JMeter and Gatling use PLU to generate load.&lt;/p&gt;
&lt;p&gt;The screenshot below shows what one request for a single action might look like in a JMeter test plan.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200423-02.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Example of an HTTP request with parameters on JMeter&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In browser-based load testing, real browser instances are opened on load generators, and the load testing tool plays the part of a real user in navigating the web application using the GUI. We refer to the virtual users in browser-based load testing as Browser-Level Users (BLU).&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s an example of the same action in the JMeter example above, but this time in an Element test script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;Step 1&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;async&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt; =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;//Click Start button
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;let&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;startButton&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;findElement&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;.btn-default&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;startButton&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;click&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;})
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This version simply describes the button to be found and clicked, whereas the protocol-level version needs to be more precise in what exactly is passed to the server.&lt;/p&gt;
&lt;p&gt;Both types of load testing tools can apply the same load on an application (as long as it supports both methods— see the next section). The main difference is in how the load is generated.&lt;/p&gt;
&lt;p&gt;A protocol-level script will contain instructions on which messages to send, which protocols to use, which headers to include, and other information that a typical end-user would not see.&lt;/p&gt;
&lt;p&gt;A browser-level script will contain instructions on how to &lt;em&gt;interact&lt;/em&gt; with the application: which buttons to click, what to type in text fields, which links to follow, and other on-screen elements that an end-user would be familiar with. This leads us to one of the big advantages of browser-based load testing.&lt;/p&gt;
&lt;h2 id="pros-and-cons-of-browser-based-load-testing"&gt;Pros and cons of browser-based load testing&lt;/h2&gt;
&lt;h3 id="pros"&gt;Pros&lt;/h3&gt;
&lt;h4 id="simple-scripting-or-no-scripting-at-all"&gt;Simple scripting— or no scripting at all&lt;/h4&gt;
&lt;p&gt;Protocol-level tools require in-depth knowledge about how an application works, what format it expects requests to be in, and how it responds. On the browser-level, you don&amp;rsquo;t need to know any of that. When scripting a login process, for instance, you just need to tell the script to type a username and password in the right fields and then click Log In. The script doesn&amp;rsquo;t need to know that the form submits an encrypted request using the Auth0 API (something you&amp;rsquo;d need to know for a protocol-level script).&lt;/p&gt;
&lt;p&gt;In some cases, you might be able to get away with using something like our &lt;a href="https://flood.io/blog/record-load-tests-in-flood-element-using-qtest-explorer"&gt;qTest Explorer plugin&lt;/a&gt; to record a business process, generating a script without any scripting at all. Even when you have to write or modify the script, though, it&amp;rsquo;s a lot less intimidating than most protocol-level scripts.&lt;/p&gt;
&lt;p&gt;They&amp;rsquo;re also easier to troubleshoot. In addition to opening a real browser instance on your computer when you run a script locally, Element can also display this information on the console (shown here on iTerm):&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200423-03.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;em&gt;Screenshots upon execution on Element using iTerm&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;‍This allows you to understand what&amp;rsquo;s going on in the script and in the application, letting you detect bottlenecks faster.&lt;/p&gt;
&lt;h4 id="reduced-test-complexity"&gt;Reduced test complexity&lt;/h4&gt;
&lt;p&gt;The streamlined requirements for scripting lead to a straightforward test. There&amp;rsquo;s no chance of getting request parameters or values wrong.&lt;/p&gt;
&lt;h4 id="ability-to-test-entire-stack-from-the-user-perspective"&gt;Ability to test entire stack from the user perspective&lt;/h4&gt;
&lt;p&gt;Unlike testing APIs, you don&amp;rsquo;t need to decide which server you want to hit or make sure you have the appropriate requests to hit all the servers. A browser-level test script interacts with page elements like a real user would, so all underlying application servers are tested. Pair this with &lt;a href="https://guides.flood.io/infrastructure/demand-infrastructure/advantages-of-testing-in-the-cloud"&gt;cloud-based infrastructure on Flood&lt;/a&gt;, and you&amp;rsquo;ve got a compact package for testing your application.&lt;/p&gt;
&lt;h4 id="capable-of-testing-any-user-behavior"&gt;Capable of testing any user behavior&lt;/h4&gt;
&lt;p&gt;Protocol-level load test tools struggle with some types of applications, such as single-page apps (SPAs), where a lot of the processing is done on the client side. Browser-level load testing tools shine here, because scripted interactions for these apps are no different for SPAs than other web apps.&lt;/p&gt;
&lt;h4 id="record-network-and-user-interaction-times-for-front-end-optimization"&gt;Record network and user interaction times for front-end optimization&lt;/h4&gt;
&lt;p&gt;Browser-level tools show you response times from the user&amp;rsquo;s perspective: how long after a user clicks the log in button does the user see his or her account balance? This metric is a practical one that may differ wildly from the traditional response times that a protocol-level tool reports. Measuring real user experience is a great value add for your test.&lt;/p&gt;
&lt;h4 id="easier-to-maintain"&gt;Easier to maintain&lt;/h4&gt;
&lt;p&gt;Lower script complexity means that a browser-based test script is more resilient to changes in the codebase. A change in the underlying requests sent will not require a change in the test script, making it perfect for regression testing.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also easier to pass on to other members of the team due to high readability. Here&amp;rsquo;s an example of how to select a value from a dropdown menu in Element:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-javascript" data-lang="javascript"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;selectByValue&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;#challenger_age&amp;#39;&lt;/span&gt;,&lt;span style="color:#e6db74"&gt;&amp;#39;34&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It&amp;rsquo;s easy to see that the script is looking for an element with the ID &amp;ldquo;challenger_age&amp;rdquo; and selecting the value &amp;ldquo;34&amp;rdquo;. This step could correspond to dozens of requests that need to be scripted if testing on the protocol level, which makes those scripts harder to understand without a proper handover.&lt;/p&gt;
&lt;h3 id="cons"&gt;Cons&lt;/h3&gt;
&lt;p&gt;Browser-based load testing tools have a higher CPU and memory footprint than protocol-based tools. Test scripts in JMeter and Gatling send messages to and record responses from a server without really needing to parse responses. By contrast, browser-based tools parse the server response in order to access the Domain Object Model (DOM) elements on the page.&lt;/p&gt;
&lt;p&gt;Using real browsers might be closer to the real user experience, but it also takes its toll on node resources. It is possible to run in headless mode, where browsers are started &amp;ldquo;invisibly&amp;rdquo; without actually graphically rendering them. However, even then, a browser-level tool can run fewer concurrent users on a node than a protocol-level tool.&lt;/p&gt;
&lt;h2 id="best-tools-and-applications-for-browser-based-load-testing"&gt;Best tools and applications for browser-based load testing&lt;/h2&gt;
&lt;p&gt;While other commercial tools exist for this, we&amp;rsquo;re partial to open source tools at Flood.&lt;/p&gt;
&lt;h3 id="selenium"&gt;Selenium&lt;/h3&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200423-04.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Selenium load testing is appealing because Selenium is already well-known for test automation and functional testing, and a lot of companies already have full test suites in Selenium. The possibility of reusing those resources and just running them at scale as load tests is, by far, the most compelling reason to use Selenium.&lt;/p&gt;
&lt;h3 id="puppeteer"&gt;Puppeteer&lt;/h3&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200423-05.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Google&amp;rsquo;s just getting started with Puppeteer, and the amount of metrics it exposes is exciting: it seems like anything in Chrome Developer Tools can be accessed by Puppeteer. Imagine running a load test on ONE tool that gives you statistics about back-end performance (response times, the effect of bandwidth restrictions, resources returning errors) AND front-end performance (client-side script console logs, render times, time to first paint, etc). It&amp;rsquo;s hard to imagine a future where this ISN&amp;rsquo;T a valuable tool in the performance arsenal.&lt;/p&gt;
&lt;p&gt;Under Puppeteer, of course, is &lt;a href="https://element.flood.io/"&gt;Element&lt;/a&gt;— our load-flavored version of Puppeteer.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200423-06.png" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h2 id="is-protocol-based-load-testing-dead"&gt;Is protocol-based load testing dead?&lt;/h2&gt;
&lt;p&gt;No. Testing on the protocol-level may have its drawbacks, but it&amp;rsquo;s popular for a reason. If you&amp;rsquo;re testing mobile apps or API endpoints, protocol-level testing tools allow you to focus on hitting what you want to test and only what you want to test. Sometimes you don&amp;rsquo;t want to test the whole stack. It really depends on your test scenarios.&lt;/p&gt;
&lt;p&gt;Plus, protocol-level tools tend to be really resource efficient. We&amp;rsquo;ve been able to easily run about 1000 users per Flood node with JMeter and Gatling, easily outstripping browser-level tools. It makes sense, since JMeter and Gatling don&amp;rsquo;t need to start browser instances to generate load.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s significantly cheaper to generate very high loads with protocol-level tools. This efficiency makes protocol-level tools a good choice for high concurrency load testing and especially stress testing.&lt;/p&gt;
&lt;h2 id="what-are-we-doing-to-support-blu"&gt;What are we doing to support BLU?&lt;/h2&gt;
&lt;p&gt;Clearly, our usage metrics show that browser-based load testing is on the rise, and we&amp;rsquo;re planning to ramp up our offerings in this area while also maintaining support for protocol-level tools. Here&amp;rsquo;s what you can look forward to from us:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New releases
&lt;ul&gt;
&lt;li&gt;We just released &lt;a href="https://element.flood.io/docs/1.0/install"&gt;version 1.2.3 of Element&lt;/a&gt; a few weeks ago, which addresses some bugs and improve stability for certain actions.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Dedicated Element team
&lt;ul&gt;
&lt;li&gt;We&amp;rsquo;ve put together a team of developers who will be focusing on improving Element exclusively. Despite Element being an open source tool, we&amp;rsquo;re putting our own resources behind it to improve it faster.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Partnering with consulting services
&lt;ul&gt;
&lt;li&gt;It can be difficult to get started on a new tool, and Element is no exception. While we provide a load testing platform to run Element scripts, some companies want help to create the scripts in the first place. To this end, we&amp;rsquo;ve partnered with expert consultants who have already been using Element with great success: &lt;a href="https://foulkconsulting.com/"&gt;Foulk Consulting&lt;/a&gt; and &lt;a href="https://www.planittesting.com/"&gt;Planit Testing&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;When choosing a performance testing tool, it&amp;rsquo;s important to consider the advantages and disadvantages of protocol-level and browser-level testing tools. We think both types of tools deserve to be in a solid performance and load testing strategy. They can also be used in tandem in a hybrid load testing approach, improving overall application performance and scalability.&lt;/p&gt;
&lt;p&gt;In 2018, we predicted that testing web-based applications with real browsers would increase in popularity, so we&amp;rsquo;re thrilled to see our theory validated in 2020. Browser-based load testing is increasing in usage, and our open source tool, Element, is leading the charge. It&amp;rsquo;s exciting to be at the forefront of this revolution, and we intend to increase support for load testing with real browsers even more this year.&lt;/p&gt;</description></item><item><title>Ask a Flooder 12: Puppeteer vs Selenium: which one is better for load testing?</title><link>https://nicolevanderhoeven.com/blog/20200421-aaf12/</link><pubDate>Tue, 21 Apr 2020 17:36:28 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200421-aaf12/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-12-puppeteer-vs-selenium-which-one-is-better-for-load-testing"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/ask-a-flooder-12-puppeteer-vs-selenium-which-one-is-better-for-load-testing"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When it comes to software testing, the debate of Puppeteer vs Selenium is a hot one. Nicole tackles it here to determine which one is better for load testing in particular. Spoiler: The answer is still &amp;ldquo;it depends&amp;rdquo;.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/K61W7ivhsuE?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Or catch the audio version here:&lt;/p&gt;
&lt;iframe src="https://open.spotify.com/embed-podcast/episode/76u25lI7sFx5SwgbsFLU5Z" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media"&gt;&lt;/iframe&gt;
&lt;p&gt;Hi everyone, Nicole here again, back for another Ask a Flooder, and today, the question is: &amp;ldquo;Puppeteer vs. Selenium: which one is better for load testing?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re actually getting this quite a bit now as Puppeteer grows in popularity, but first, let&amp;rsquo;s discuss the similarities. They&amp;rsquo;re tools that you can use to drive browsers. The work by identifying and interacting with elements on a website in the same way that a user would. They are also both open-source, and both can be used for load testing. This is a great strategy because instead of writing tests for an automation suite and then tests for load testing, you can just write the one test suite and re-use it, so it saves a lot of resources in the end. To answer this question, I&amp;rsquo;m going to focus on load testing because that&amp;rsquo;s what my experience is in.&lt;/p&gt;
&lt;h2 id="difference-between-selenium-and-puppeteer"&gt;Difference between Selenium and Puppeteer&lt;/h2&gt;
&lt;h3 id="pros-and-cons-of-selenium"&gt;Pros and cons of Selenium&lt;/h3&gt;
&lt;p&gt;Now for the difference. Selenium supports more browsers than does Puppeteer. It supports Chrome, Firefox, IE, Safari, and Opera, so there are a lot more options to choose from depending on your application.&lt;/p&gt;
&lt;p&gt;Selenium is also what I would call automation-first. It was built with automation in mind, which means it&amp;rsquo;s very good at that. It&amp;rsquo;s very robust, and if you have a complicated test scenario, Selenium is an excellent choice.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also been around for much longer than Puppeteer, which is important because that means it&amp;rsquo;s had more time to build up a community. There are way more resources and tutorials for Selenium than for Puppeteer.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also, unfortunately, very resource-intensive. That&amp;rsquo;s not something that you would typically care too much about from a test automation perspective, but when you&amp;rsquo;re running thousands of users on the cloud, it IS important to keep in mind that Selenium, just because of how it&amp;rsquo;s built and its complexity, can only run about five users per node. We&amp;rsquo;ve found that out at Flood, after baselining specifically an AWS m5.xlarge instance. So you can look at the specs of that and compare it with the machines that you&amp;rsquo;re wanting to run Selenium on, to see how that would equate for you.&lt;/p&gt;
&lt;h3 id="pros-and-cons-of-puppeteer"&gt;Pros and cons of Puppeteer&lt;/h3&gt;
&lt;p&gt;Puppeteer is a NodeJS library developed by Google, which means it plays very well with Chrome. There are a whole lot of things that you have access to with Puppeteer, and if you&amp;rsquo;re using it with Chrome, pretty much anything in Chrome, including rendering times, you can see and access with a Puppeteer script. So that&amp;rsquo;s a huge advantage.&lt;/p&gt;
&lt;p&gt;Unfortunately, that also means it supports fewer browsers. Obviously, it supports Chrome very well, and they recently came out with support for Firefox, although they do have plans to incorporate support for more browsers in the future.&lt;/p&gt;
&lt;p&gt;One of Puppeteer&amp;rsquo;s advantages is that we at Flood actually created a tool on top of Puppeteer. It&amp;rsquo;s also open-source. It&amp;rsquo;s called Flood Element, and Element is built to be performance-first because obviously, that&amp;rsquo;s what we had in mind when we were building it. It takes everything that&amp;rsquo;s good about Puppeteer and makes it really easy to set parameters that you normally would expect to need for load testing, like users and ramp-up.&lt;/p&gt;
&lt;p&gt;This also means that it&amp;rsquo;s way less resource-intensive. I said that with Selenium, you can run up to five users on an AWS m5.xlarge instance, and for the same instance type, you can run, from our experiments, anywhere from 30-50 Element scripts/users. That is a huge saving when you&amp;rsquo;re running a really large-scale test.&lt;/p&gt;
&lt;h2 id="should-you-choose-selenium-or-puppeteer-for-load-testing"&gt;Should you choose Selenium or Puppeteer for load testing?&lt;/h2&gt;
&lt;p&gt;I would say that if you already have a large Selenium automation suite, if you have a complex test scenario, or if you aren&amp;rsquo;t running that many users for your load test, then Selenium is a great choice. If you ARE running thousands of users, though, and resource efficiency, and therefore cost efficiency, is really important to you, then choose Element.&lt;/p&gt;
&lt;p&gt;My advice is always to try both. If you have the time, do a proof of concept with both of them. That way, your whole team can better understand what the pros and cons are for each one and decide which one is best going forward. Or maybe you don&amp;rsquo;t even decide on one. At Flood, we support both of them at the same price, so it depends on what you prefer.&lt;/p&gt;
&lt;p&gt;Until next time, happy flooding!&lt;/p&gt;</description></item><item><title>Ask a Flooder 11: What are the best JMeter plugins?</title><link>https://nicolevanderhoeven.com/blog/20200414-aaf11/</link><pubDate>Tue, 14 Apr 2020 19:47:53 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200414-aaf11/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-11-what-are-the-best-jmeter-plugins"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/ask-a-flooder-11-what-are-the-best-jmeter-plugins"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In this video, I talk about how to install the JMeter Plugin Manager as well as other plugins, what the best JMeter plugins are, and why you need them. JMeter is an open-source load testing tool that is already robust, but there are some fantastic plugins that have been developed for it that you might want to use in your next load test.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/eYyLoH-FQrk?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Audio version here:&lt;/p&gt;
&lt;iframe src="https://open.spotify.com/embed-podcast/episode/36GUgvf17bRwmJxg8CNkvy" width="100%" height="232" frameborder="0" allowtransparency="true" allow="encrypted-media"&gt;&lt;/iframe&gt;
&lt;p&gt;Hi everyone, Nicole here, back again for another Ask a Flooder, and I hope everybody is staying alert, not anxious, during these crazy times. In today&amp;rsquo;s Ask a Flooder, our customer asks: &amp;ldquo;What are the best JMeter plugins?&amp;rdquo;&lt;/p&gt;
&lt;h2 id="what-is-a-jmeter-plugin"&gt;What is a JMeter plugin?&lt;/h2&gt;
&lt;p&gt;So first, I want to talk about what a JMeter plugin is and how you can actually install one. Apache JMeter is a really great, robust load testing that is one of my personal favorites. There are still some things that could be done better or could be extended, and the great thing about being an open-source tool is that anybody, pretty much, can just jump in and develop these plugins for JMeter to extend functionality, so that it supports more protocols or to customize load profiles in a way that is easier. We already have &lt;a href="https://flood.io/blog/jmeter-plugins-the-top-10-plugins-and-how-they-help"&gt;a blog post on this&lt;/a&gt;, and I will leave a link to that article as well in the description because it goes into a lot more detail. However, I still want to give you my personal top 3 JMeter plugins.&lt;/p&gt;
&lt;h2 id="how-do-you-install-a-jmeter-plugin"&gt;How do you install a JMeter plugin?&lt;/h2&gt;
&lt;p&gt;You can install a plugin for JMeter in two ways.&lt;/p&gt;
&lt;p&gt;One is to download it from &lt;a href="https://jmeter-plugins.org/"&gt;JMeter Plugins&lt;/a&gt;, which I will give you a link to, and then you paste that into either the lib — it&amp;rsquo;s usually in the lib folder, but it could be in the ext (extensions) folder. Each plugin is going to differ as to what you need to copy into what folder, but that&amp;rsquo;s why I prefer the second method, which is the &lt;a href="https://jmeter-plugins.org/wiki/PluginsManager/"&gt;Plugin Manager&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Plugin Manager is a plugin itself, so you will initially need to do that copy and pasting of the jar file. Once you have the JMeter Plugin Manager installed, downloading and installing a plugin is as simple as choosing which ones you want and then clicking install. JMeter restarts, and that&amp;rsquo;s pretty much it. So I do recommend that the Plugin Manager be the first plugin that you install. But that&amp;rsquo;s still not my top 3 favorite - that&amp;rsquo;s just an optional step.&lt;/p&gt;
&lt;h2 id="what-are-the-top-3-jmeter-plugins"&gt;What are the top 3 JMeter plugins?&lt;/h2&gt;
&lt;h3 id="custom-thread-groups"&gt;Custom Thread Groups&lt;/h3&gt;
&lt;p&gt;Now for the actual plugins. My #1 favorite is the Custom Thread Groups. See, with JMeter, you get the standard default thread group, and all that does is it asks you how many users you want to run, how many loops, the duration, and the ramp-up. That&amp;rsquo;s it. So that&amp;rsquo;s good for a lot of uses, but it doesn&amp;rsquo;t really help you in cases where maybe you want to plan a spike test, and you want to make sure that all the users have fully ramped up and gotten to a certain point, and then all hit the server at once. Or maybe you want to do a step load. Previously I&amp;rsquo;ve discussed stress testing and how a step load can be useful for that. In that case, the Thread Group doesn&amp;rsquo;t quite cut it because it only ramps up a user, and then it continues at the same level of load for the duration of the test.&lt;/p&gt;
&lt;p&gt;So, if you want any sort of variation in the middle (increasing users or decreasing), then you&amp;rsquo;re going to want something else.The Custom Thread Groups plugin has a lot of different types of thread groups. My favorite is the Ultimate One because you can probably do almost anything on that one. It also has the Stepping, Concurrency, Arrivals, and Free-Form Arrivals, so you have quite a few options.&lt;/p&gt;
&lt;h3 id="throughput-shaping-timer"&gt;Throughput Shaping Timer&lt;/h3&gt;
&lt;p&gt;Plugin #2 is the Throughput Shaping Timer. I love it because not a lot of load testing tools, even the proprietary ones, actually have this. This is really handy when you have a project where you&amp;rsquo;re given a requirement that isn&amp;rsquo;t in terms of the number of users; it&amp;rsquo;s in terms of hits per second, or requests per second, or something to do with the actual throughput of the test.&lt;/p&gt;
&lt;p&gt;The problem with that is that the throughput tends to change, so you can&amp;rsquo;t actually take as a given that it&amp;rsquo;ll remain constant for the duration of the test. Things like response time or latency are going to affect that throughput. For instance, when you have one user or one thread that&amp;rsquo;s running, and it sends a request and receives the response back in one second, you can&amp;rsquo;t necessarily say that that&amp;rsquo;s going to be the same when there are a thousand threads doing the same thing. The server&amp;rsquo;s under more load, so maybe it&amp;rsquo;ll take five seconds instead of one second— but that&amp;rsquo;s already changed your throughput. Before, one thread was doing one request per second, and now it&amp;rsquo;s doing one request every five seconds.&lt;/p&gt;
&lt;p&gt;So it can get a little complicated, and the Throughput Shaping Timer is one of my favorites because it promises to solve all that. The Throughput Shaping Timer dynamically changes the think time, so at the beginning of a test, for instance, when there are no response time issues and requests are being returned really quickly, it might increase the think time so that it slows down your load test. So you&amp;rsquo;re not going over that throughput that you wanted to maintain. And then later on in the test, when all the users are ramped up, then it&amp;rsquo;ll decrease the think time that it uses. So it&amp;rsquo;s great because you just have this consistent throughput throughout your test. It&amp;rsquo;s a really intelligent way to test.&lt;/p&gt;
&lt;p&gt;I do want to say, though, that you do also want to play around with this a bit and make sure you understand how this works. One page could have several requests in it, and you&amp;rsquo;ll want to take that into consideration when you&amp;rsquo;re choosing what to set in that timer.&lt;/p&gt;
&lt;h3 id="http2-request-sampler"&gt;HTTP/2 Request Sampler&lt;/h3&gt;
&lt;p&gt;My #3 is the HTTP/2 Sampler. If you don&amp;rsquo;t know what HTTP/2 is, it&amp;rsquo;s an upgraded or next-generation protocol to the normal HTTP that we already use. The HTTP/2 protocol is supposed to be faster and more efficient, so more and more web apps are switching to it because of that.&lt;/p&gt;
&lt;p&gt;The problem is that JMeter&amp;rsquo;s HTTP request sampler is only really for HTTP sites, so the HTTP/2 sampler is an upgraded version of the HTTP sampler. It&amp;rsquo;s really easy to use. The experience is pretty much going to be the same for you, but in the background, it uses the faster HTTP/2 protocol rather than the slower one.&lt;/p&gt;
&lt;p&gt;My colleague, Jason Rizio, actually &lt;a href="https://flood.io/blog/jmeter-tutorial-http2-test"&gt;wrote a whole blog post about this&lt;/a&gt;, so if you want to learn more, I will put a link in the description.&lt;/p&gt;
&lt;p&gt;I hope that answered your question, and until next time, happy flooding!&lt;/p&gt;</description></item><item><title>Introducing Flood Agent: standalone infrastructure for load testing</title><link>https://nicolevanderhoeven.com/blog/20200407-introducing-flood-agent/</link><pubDate>Tue, 07 Apr 2020 19:03:42 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200407-introducing-flood-agent/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/introducing-flood-agent-standalone-infrastructure-for-load-testing"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/introducing-flood-agent-standalone-infrastructure-for-load-testing"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Working from home during this pandemic and wondering how to start load tests from the office? Today, we&amp;rsquo;re officially introducing Flood Agent, a way to turn your own physical or virtual machines into load generators that you can control from anywhere with an internet connection.&lt;/p&gt;
&lt;h2 id="tldr"&gt;TL;DR:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Installing Flood Agent on a machine lets you start load tests on it remotely from Flood—even if it&amp;rsquo;s within a corporate VPN.&lt;/li&gt;
&lt;li&gt;Flood Agent is a simple binary that you can install on Linux, macOS, and Windows machines.&lt;/li&gt;
&lt;li&gt;Once you&amp;rsquo;ve installed Flood Agent, your machines show up on the Flood web app to use as load generators or grids.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="boldly-going-where-no-one-has-gone-before"&gt;Boldly going where no one has gone before&lt;/h2&gt;
&lt;p&gt;Load testing within your company&amp;rsquo;s VPN and trying to coordinate it from home is like being on a maintenance pod trying to contact your starship, but a Mazarite ship is broadcasting a jamming signal, so comms are down. That Mazarite ship is your company&amp;rsquo;s firewall, and it can make testing difficult.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200407-01.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;The easiest way around this is to provision load generators in the cloud. However, because your application servers are still behind a firewall, you&amp;rsquo;d need to convince IT security to &lt;a href="https://guides.flood.io/test-execution/infrastructure/static-ip-addresses#hosted-grids"&gt;whitelist the IP addresses&lt;/a&gt; of the load generators. Depending on how tight security policies are, this may not be an option even in this new world of remote working.&lt;/p&gt;
&lt;p&gt;Flood Agent is a way to start load tests on Flood from the load generators you already have. It&amp;rsquo;s a cross-platform agent that you can install on your regular load generators, allowing you to control them on Flood.&lt;/p&gt;
&lt;p&gt;‍‍&lt;img src="https://nicolevanderhoeven.com/assets/20200407-02.png" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Flood Agent is kind of like the &lt;a href="https://en.wikipedia.org/wiki/Borg#Borg_Collective"&gt;Borg Collective&lt;/a&gt;. Each machine that you install Flood Agent on is assimilated into the Borg. A hive mind (you, on the Flood site) controls all Borgs, coordinating test execution with robotic efficiency.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://media.giphy.com/media/J6P7vFEQ6PcgE/giphy.gif" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Check out this video to follow along as I walk you through the process of setting up Flood Agent, or you can keep reading for the text version.&lt;/p&gt;
&lt;p&gt;‍&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/6VFn96aKSU8?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
‍&lt;/p&gt;
&lt;h2 id="installing-and-configuring-flood-agent"&gt;Installing and configuring Flood Agent&lt;/h2&gt;
&lt;p&gt;Flood Agent is a free binary, and it runs on Linux, Mac, or Windows machines. You can &lt;a href="https://github.com/flood-io/flood-agent/releases/latest"&gt;download the appropriate version&lt;/a&gt; for your operating system and then follow the installation instructions here for more information:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://guides.flood.io/infrastructure/standalone-infrastructure/getting-started-on-linux"&gt;Getting started on Linux&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://guides.flood.io/infrastructure/standalone-infrastructure/getting-started-on-macos"&gt;Getting started on macOS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://guides.flood.io/infrastructure/standalone-infrastructure/getting-started-on-windows"&gt;Getting started on Windows&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After installing Flood Agent, you can configure it according to how you want to use it. Start Flood Agent in your terminal and use the configure functionality. Here&amp;rsquo;s what that command looks like on macOS, but you can follow the links above for other operating systems:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;./flood-agent configure
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="linking-your-flood-account"&gt;Linking your Flood account&lt;/h3&gt;
&lt;p&gt;The command above yields a prompt for a token like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200407-03.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;This token allows Flood to run load tests on the load generator that you&amp;rsquo;ve installed Flood Agent in. To get the token, go to the &lt;a href="https://app.flood.io/account/api"&gt;API Access page&lt;/a&gt; on your Flood account (&lt;a href="https://app.flood.io/sign-up"&gt;you already have one, don&amp;rsquo;t you?&lt;/a&gt;) and click REVEAL token.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200407-04.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;You should see a string of characters like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200407-05.jpg" alt="" loading="lazy" decoding="async"&gt;
‍&lt;/p&gt;
&lt;p&gt;Copy your token (anything after the = sign) and paste it into the Flood Agent terminal window.&lt;/p&gt;
&lt;h3 id="choosing-load-testing-tools"&gt;Choosing load testing tools&lt;/h3&gt;
&lt;p&gt;Next, you can choose which tools you&amp;rsquo;d like to set up and which version of those tools Flood Agent uses to run your tests.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200407-06.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Starting with JMeter, Flood Agent asks you which of the tools you&amp;rsquo;d like to configure. You can choose to set up your tools at the beginning so that you don&amp;rsquo;t have to set them up again, or you can go back to this configuration wizard at any point to add another tool. Either way, you need to provide the tools that you select in one of two ways: via a Docker image supplied by Flood, or via a &lt;a href="https://guides.flood.io/infrastructure/standalone-infrastructure/getting-started-local-jmeter-and-gatling"&gt;local installation&lt;/a&gt; that you already have.&lt;/p&gt;
&lt;p&gt;For this example, I chose to configure JMeter and to use a local installation. Local installations give you the most flexibility because you can use the version of the tool that you prefer, along with any special plugins. However, if you already have Docker installed or don&amp;rsquo;t want to manually install JMeter separately, you can also use our Docker image for JMeter.&lt;/p&gt;
&lt;p&gt;Selecting a local installation prompts you to provide the location of that directory:&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200407-07.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;For JMeter, this looks something like &lt;code&gt;/Users/nvanderhoeven/jmeter/apache-jmeter-5.1.1.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After you enter this file path, Flood Agent checks to make sure the directory is valid. You can also set the configuration for other tools in this dialog.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200407-08.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;After you finish the configuration, the wizard writes to a config.yaml file in your Flood Agent directory. You can also edit this configuration file directly in the future if you prefer.&lt;/p&gt;
&lt;h2 id="verifying-flood-agent-configuration"&gt;Verifying Flood Agent configuration&lt;/h2&gt;
&lt;p&gt;To run a final check on whether Flood Agent has been installed correctly, type &lt;code&gt;./flood-agent check&lt;/code&gt;. You should see a summary of the configuration options you selected as well as some connectivity and validity checks, like this:&lt;/p&gt;
&lt;p&gt;‍
&lt;img src="https://nicolevanderhoeven.com/assets/20200407-09.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;These green check marks mean you&amp;rsquo;re good to go! If you&amp;rsquo;re running Flood Agent from within a corporate network, though, you may see some errors here.&lt;/p&gt;
&lt;h2 id="troubleshooting-network-connectivity-within-a-corporate-network"&gt;Troubleshooting network connectivity within a corporate network&lt;/h2&gt;
&lt;p&gt;If your company already has a web proxy, check out &lt;a href="https://guides.flood.io/infrastructure/standalone-infrastructure/deployment/integrating-with-a-web-proxy"&gt;our guide on running floods through this proxy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please ensure that the load generator that you&amp;rsquo;ve installed Flood Agent on has access to the following endpoints:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;https://drain.flood.io&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;https://beacon.flood.io&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;https://vault.flood.io&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;https://flood-archives.s3-accelerate.amazonaws.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;https://logs.us-east-1.amazonaws.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;https://sns&amp;gt;.*.amazonaws.com
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;https://sqs&amp;gt;.*.amazonaws.com
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You may need to request these from your IT department.&lt;/p&gt;
&lt;p&gt;If you get stuck, please contact us at &lt;a href="mailto:support@flood.io"&gt;support@flood.io&lt;/a&gt;. We&amp;rsquo;d love to go over your specific situation and get you up and running.&lt;/p&gt;
&lt;p&gt;Once Flood Agent returns a successful check, you can start up your own grid!&lt;/p&gt;
&lt;h2 id="turning-your-machine-into-a-flood-grid"&gt;Turning your machine into a Flood grid&lt;/h2&gt;
&lt;p&gt;A grid, in Flood terminology, is a group of machines to be used for load generation. To make your machine a grid, run this command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;./flood-agent --grid askaflooder
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;where &lt;code&gt;askaflooder&lt;/code&gt; is the name of your grid.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200407-10.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Once you see those [agent] ready and awaiting next job messages, you&amp;rsquo;re ready to run your test!&lt;/p&gt;
&lt;h2 id="running-a-load-test-on-your-own-infrastructure"&gt;Running a load test on your own infrastructure&lt;/h2&gt;
&lt;p&gt;Log into your account on Flood, if you aren&amp;rsquo;t already, and &lt;a href="https://guides.flood.io/overview-of-flood/scripting-your-load-test#creating-a-stream"&gt;create a new stream&lt;/a&gt; like you normally would, uploading your load testing script and data files. When &lt;a href="https://guides.flood.io/overview-of-flood/launching-your-test"&gt;launching your test&lt;/a&gt;, though, select the option for Hosted infrastructure and then choose the grid with Flood Agent running on it.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200407-11.jpg" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Go ahead and launch your test. Congratulations, you&amp;rsquo;re now set up to run a load test on your on-premise load generators!&lt;/p&gt;
&lt;h2 id="giving-it-a-go"&gt;Giving it a go&lt;/h2&gt;
&lt;p&gt;Flood Agent is a free download, so you&amp;rsquo;ll only need to pay when you run load tests on Flood. However, we also have a free tier— perfect for a proof-of-concept while you&amp;rsquo;re working from home.&lt;/p&gt;
&lt;p&gt;If you have any questions about Flood Agent, check out &lt;a href="https://guides.flood.io/infrastructure/standalone-infrastructure/flood-agent"&gt;our documentation&lt;/a&gt; or &lt;a href="mailto:support@flood.io"&gt;email us&lt;/a&gt;. We&amp;rsquo;d be happy to get you started!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/flood-io/flood-agent/releases"&gt;Download Flood Agent for free here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;‍&lt;img src="https://nicolevanderhoeven.com/assets/20200407-12.gif" alt="" loading="lazy" decoding="async"&gt;
&lt;/p&gt;</description></item><item><title>Ask a Flooder 10: What is the difference between load testing and stress testing?</title><link>https://nicolevanderhoeven.com/blog/20200406-aaf10/</link><pubDate>Mon, 06 Apr 2020 20:26:24 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200406-aaf10/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-10-what-is-the-difference-between-load-testing-and-stress-testing-video"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/ask-a-flooder-10-what-is-the-difference-between-load-testing-and-stress-testing-video"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s the difference between load testing and stress testing? When should you choose to run a load test on your application, and when is a stress test more appropriate? Well, it&amp;rsquo;s all in the intention.&lt;/p&gt;
&lt;p&gt;‍&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/igP2q__zMcc?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Hi everyone, Nicole here again, back with another Ask a Flooder, and this time the question is:&lt;/p&gt;
&lt;h2 id="what-is-the-difference-between-load-testing-and-stress-testing"&gt;What is the difference between load testing and stress testing?&lt;/h2&gt;
&lt;p&gt;Okay, again, this is a matter of semantics, but I think the difference is in the intention. Load testing and stress testing are both types of back-end performance testing, and I did also make a video on it that I&amp;rsquo;ll link in the description down below.&lt;/p&gt;
&lt;h3 id="load-testing-is-about-seeing-how-your-server-reacts-to-finite-load"&gt;Load testing is about seeing how your server reacts to finite load&lt;/h3&gt;
&lt;p&gt;Now, with load testing, you usually have to start with a specific idea of the load profile that you want to test. You get to this number by looking through your Google Analytics or other analytics on your site to see what load you need to test at, and then the intention is to see how your server responds to that load. So the load is fixed: you know WHAT you want to test, and you just want to see how the server reacts to it. So it&amp;rsquo;s more finite in scope. In general, it&amp;rsquo;s also more about how your server reacts to normal or expected load, whether that&amp;rsquo;s now or in the future.&lt;/p&gt;
&lt;h3 id="stress-testing-explores-your-applications-upper-limits"&gt;Stress testing explores your application&amp;rsquo;s upper limits&lt;/h3&gt;
&lt;p&gt;Stress testing, on the other hand, is a little bit more open-ended and a little bit more destructive. So instead of starting with how much load you want to put on [your server], in stress testing, what you generally do is you increase the load. You usually use a step load profile: so you start a certain number of users, you wait maybe 30 minutes, and then you increase it again. And you end up with this staircase kind of load profile. What you&amp;rsquo;re doing there is you just let it increase until your server fails because the intention of stress testing is to get your server to fail. And, once it fails, does it fail gracefully? Does it show an error message? These are really things that test the upper limits of your server, and that&amp;rsquo;s what stress testing really is.&lt;/p&gt;
&lt;h3 id="they-can-be-interchangeable"&gt;They can be interchangeable&lt;/h3&gt;
&lt;p&gt;At Flood, we tend to use the word &amp;ldquo;load&amp;rdquo; testing to refer to both kinds of testing because both of them entail applying load on your application server. It&amp;rsquo;s not really that important to distinguish between one or another; what&amp;rsquo;s [important] is that your team uses the same definition so that when YOU say &amp;ldquo;load testing,&amp;rdquo; they know what you mean.&lt;/p&gt;
&lt;p&gt;Until the next time, happy flooding!&lt;/p&gt;
&lt;h2 id="resources"&gt;Resources&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://nicolevanderhoeven.com/blog/20200324-aaf07"&gt;Video on performance testing vs load testing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Real-life stress testing in action: &lt;a href="https://nicolevanderhoeven.com/blog/20200309-fomo-and-performance-testing"&gt;Robinhood app failure&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Ask a Flooder 09: What are the best tools for load testing?</title><link>https://nicolevanderhoeven.com/blog/20200331-aaf09/</link><pubDate>Tue, 31 Mar 2020 20:35:36 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200331-aaf09/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/ask-a-flooder-09-what-are-the-best-tools-for-load-testing-video"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/ask-a-flooder-09-what-are-the-best-tools-for-load-testing-video"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;One of our most commonly-asked questions is: &amp;ldquo;What are the best tools for load testing?&amp;rdquo; The answer will depend on a few things: your reason for load testing, the application you want to test, what kind of load testing you want to carry out, your team&amp;rsquo;s experience with scripting, and how many virtual users you want to run.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: In this video, I say that traditional load testing tools can&amp;rsquo;t simulate requests that are triggered by interactions on the client-side. This isn&amp;rsquo;t technically true: if you know what the requests are, you can build those requests manually on a protocol-level tool (like JMeter or Gatling). However, this takes more work compared to browser-level tools that just do this natively.&lt;/em&gt;
‍
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/I5Wo6x2OoZU?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;Transcript:&lt;/p&gt;
&lt;p&gt;Hi everyone, Nicole back again with another Ask a Flooder, and this time I&amp;rsquo;m tackling one of the questions we get asked A LOT, which is:&lt;/p&gt;
&lt;h2 id="what-are-the-best-tools-for-load-testing"&gt;What are the best tools for load testing?&lt;/h2&gt;
&lt;h3 id="why-open-source-load-testing-tools-are-awesome"&gt;Why open-source load testing tools are awesome&lt;/h3&gt;
&lt;p&gt;Now, I want to preface this by saying that we really love open-source tools here at Flood, because 1) they&amp;rsquo;re really pretty full-fledged these days. You don&amp;rsquo;t have to make any compromises on features, and, in fact, some of these open-source tools have more features than some newer load testing tools just because they&amp;rsquo;ve been out longer. And secondly, they have large communities. Because they&amp;rsquo;re open-source, lots of people are using it, and lots of people are developing for it. So there are lots of plugins normally, and they support any kind of protocol that you can think of. And lastly, cost. It&amp;rsquo;s hard not to mention cost because it can be a really important factor depending on the budget of your project. And if you&amp;rsquo;re starting out as a load tester, I think that it might even be the best way to start with load testing, because you can take that knowledge with you and apply it to other projects and other companies regardless of the budget that they have.&lt;/p&gt;
&lt;h3 id="questions-to-ask-yourself-in-choosing-a-load-testing-tool"&gt;Questions to ask yourself in choosing a load testing tool&lt;/h3&gt;
&lt;h4 id="why-are-you-doing-load-testing"&gt;Why are you doing load testing?&lt;/h4&gt;
&lt;p&gt;I always advocate starting with WHY. Why are you actually load testing? Is there a particular production defect that you noticed that you&amp;rsquo;re trying to solve? Is there already a problem, or are you just preparing to launch? These are things that are going to inform the type of tool that you use because you might want to make sure that that tool supports the protocols that you need.&lt;/p&gt;
&lt;h4 id="what-are-you-load-testing"&gt;What are you load testing?&lt;/h4&gt;
&lt;p&gt;Secondly, what type of app are you testing? Because if you have a single-page app, where your end-user is interacting with the page and client-side scripts are running to make requests to servers, then that&amp;rsquo;s something that most traditional load testing tools aren&amp;rsquo;t going to be able to do.&lt;/p&gt;
&lt;p&gt;There are two general types of load testing tools: there&amp;rsquo;s browser-based, and there&amp;rsquo;s protocol-based. I&amp;rsquo;ll leave a link in the description talking about the differences between the two, but in general, if you want to go for browser-level testing, I would suggest Selenium and Element. Now, they&amp;rsquo;re both very good options. Selenium is probably the more robust in terms of automation of the two, but Element is better one in terms of efficiency because it was built with performance in mind. So Selenium&amp;rsquo;s automation-first and Element is really performance-first.&lt;/p&gt;
&lt;p&gt;Now, for protocol-level tools, you can&amp;rsquo;t go wrong with either JMeter or Gatling.&lt;/p&gt;
&lt;h4 id="what-experience-does-your-team-have-with-scripting"&gt;What experience does your team have with scripting?&lt;/h4&gt;
&lt;p&gt;Thirdly, what&amp;rsquo;s the level of technical expertise that your team has? I think it&amp;rsquo;s important to be realistic about what your team can do, given the amount of time that they have. So if you have a team that has never done load testing and has never done any scripting before, then I would suggest using our Test Builder or something similar. On Flood, we have a Test Builder that is really just an easy interface that actually runs JMeter under the hood, but it just kind of simplifies JMeter and boils it down to what are the URLs that you want to test. That is a really easy way to get started, and it&amp;rsquo;s also a great [way to run a] proof of concept. If you have some automation testers on your team that are trying to do the load testing, well, maybe you should stick to tools that they already use. So it might be easier for them to get up and running with either Selenium or Element rather than learning a new tool. And if you have developers on your team, you might consider Ruby JMeter rather than the vanilla JMeter because Ruby JMeter is a lot easier to deal with&amp;mdash; because you don&amp;rsquo;t have to deal with the XML files of a JMeter file (a normal JMX script). You can just plan out your load tests in Ruby. Or, Gatling is also a really good option because it allows you to write scripts in Scala. Scala is really really powerful, and you can create an entire framework with Gatling, which is also something to keep in mind.&lt;/p&gt;
&lt;h4 id="how-many-virtual-users-do-you-want-to-run-in-your-load-tests"&gt;How many virtual users do you want to run in your load tests?&lt;/h4&gt;
&lt;p&gt;And lastly, how many users do you want to simulate? Now protocol-level tools are going to really shine here because Element and Selenium both require a higher usage of resources on your load generators just because of the complexities involved in starting a browser instance, whereas protocol-level tools are just super efficient at sending these requests. So I would suggest that if you&amp;rsquo;re talking about thousands of users, I would use the protocol-level tools unless there&amp;rsquo;s a really good reason why that&amp;rsquo;s not going to give you the results that you&amp;rsquo;re looking for. Between JMeter and Gatling&amp;ndash; well, they&amp;rsquo;re both excellent tools, but Gatling has been shown to particularly be good for really high levels of usage. But JMeter is also a good alternative, and you can run thousands of users of JMeter without any problem.&lt;/p&gt;
&lt;h2 id="just-get-started"&gt;Just get started!&lt;/h2&gt;
&lt;p&gt;As always, I&amp;rsquo;d suggest just getting started. Pick whatever tool sounds like it might be the best for you, do a proof of concept on that one, and you can always try the other ones as well. On Flood, we don&amp;rsquo;t restrict you to just using one tool, so you can use one; you can use all four; you can run them at the same time if you want. It all depends on what you need for your testing.&lt;/p&gt;
&lt;p&gt;Till next time, happy flooding!&lt;/p&gt;</description></item><item><title>How AirTasker uses Ruby JMeter and Flood for their load testing</title><link>https://nicolevanderhoeven.com/blog/20200224-airtasker/</link><pubDate>Mon, 24 Feb 2020 18:23:31 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20200224-airtasker/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/how-airtasker-uses-ruby-jmeter-and-flood-for-their-load-testing"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/how-airtasker-uses-ruby-jmeter-and-flood-for-their-load-testing"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In the recent RubyConf 2020 held in Melbourne, Australia, Nancy Cai from AirTasker talked about how they built a performance testing framework using Ruby JMeter and Flood. Luckily, we had some pleasantly surprised Flooders in attendance to take notes during this fantastic talk!&lt;/p&gt;
&lt;p&gt;AirTasker is a platform allowing the outsourcing of everyday tasks. When discussing the reasons that AirTasker decided they wanted to carry out performance and load testing, Nancy told a fascinating story about an overly successful marketing campaign—a good problem to have, but a problem nonetheless. The Sydney Cats and Dogs Home, an animal shelter, teamed up with AirTasker to pay one lucky person $500 to spend the day playing with the resident animals. The prospect of this dream job created an enormous surge in AirTasker&amp;rsquo;s traffic that caused alarm bells to go off on the underlying application servers, resulting in an end-user experience that was less than desired.&lt;/p&gt;
&lt;p&gt;Nancy included this hilarious slide about some common feelings regarding application performance.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200224-01.png" alt="A common feeling when application performance is brought up" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h2 id="steps-for-running-a-performance-test-the-airtasker-way"&gt;Steps for running a performance test, the AirTasker way&lt;/h2&gt;
&lt;p&gt;To avoid repeating that mistake, Nancy and her team set out to run performance testing by using the following simple steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Determine performance criteria.&lt;/li&gt;
&lt;li&gt;Configure the test environment to be as production-like as possible.&lt;/li&gt;
&lt;li&gt;Plan and design based on user behavior, including preparing test data.&lt;/li&gt;
&lt;li&gt;Implement test design and set up the framework (which in AirTasker&amp;rsquo;s case involved Ruby JMeter as the performance testing tool and Flood as a load testing solution).&lt;/li&gt;
&lt;li&gt;Run test.&lt;/li&gt;
&lt;li&gt;Analyze and fine-tune results.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="setting-up-a-load-testing-tool-and-framework"&gt;Setting up a load testing tool and framework&lt;/h2&gt;
&lt;p&gt;When it came to selecting the right tools for the job, AirTasker wanted tools that met the following criteria:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ability to simulate production-like traffic easily&lt;/li&gt;
&lt;li&gt;Widespread use in the industry&lt;/li&gt;
&lt;li&gt;Ease of creation and maintenance of tests for everyone&lt;/li&gt;
&lt;li&gt;Historical results aggregation&lt;/li&gt;
&lt;li&gt;Visualization of performance metrics&lt;/li&gt;
&lt;li&gt;Integration with CI and monitoring tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Nancy&amp;rsquo;s team compared several load testing tools and found they enjoyed using the Apache JMeter tool, which is a popular open source load testing software. However, they quickly ran into an &amp;ldquo;out of memory&amp;rdquo; error after attempting to run about 400-800 concurrent users on a single machine. She and her team decided to use a distributed load testing platform to run the load they required to scale up more effectively.&lt;/p&gt;
&lt;p&gt;Enter Flood.&lt;/p&gt;
&lt;h2 id="why-airtasker-chose-flood"&gt;Why AirTasker chose Flood&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200224-02.png" alt="JMeter, Flood, and the Ruby JMeter gem combination is a winner" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We also chose Flood.io [&amp;hellip;] because it comes in with a really good open-source gem called Ruby JMeter. It is a Ruby-based DSL for building JMeter test plans. - Nancy Cai, AirTasker&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Nancy and her team enjoyed the benefits of being able to write load tests natively in Ruby and then using Flood&amp;rsquo;s Ruby JMeter gem, which is a Domain-Specific Language (DSL). Flood allowed them to turn their Ruby scripts into .jmx files, which is the native XML format that JMeter uses.&lt;/p&gt;
&lt;p&gt;When they were ready to scale up, AirTasker ran the same JMeter script in Flood.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20200224-03.png" alt="Sample of a report on Flood from a JMeter test" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;The real-time Flood dashboard allowed them to see that there was a problem on one of the API endpoints, called &amp;ldquo;Get pet reviews.&amp;rdquo; Further investigations revealed a performance issue due to a long-running query against a database server in the code, which AirTasker&amp;rsquo;s developers could fix.&lt;/p&gt;
&lt;h2 id="best-practices"&gt;Best practices&lt;/h2&gt;
&lt;p&gt;Nancy gives some great advice for anyone running a performance test, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;asking the right questions as a load tester&lt;/li&gt;
&lt;li&gt;running baseline tests&lt;/li&gt;
&lt;li&gt;being aware of the difference between your test and production environments&lt;/li&gt;
&lt;li&gt;keeping in mind the caching and autoscaling mechanisms that may drastically change the results&lt;/li&gt;
&lt;li&gt;the differences between stress testing and other types of performance testing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We were so thrilled to hear Nancy&amp;rsquo;s story on how Flood helped AirTasker run their performance tests. Catch the entirety of Nancy&amp;rsquo;s talk below, and check out the resource links at the end of the post to follow Nancy&amp;rsquo;s story.‍&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/Q09wJm4P8Xw?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://github.com/flood-io/ruby-jmeter"&gt;Flood&amp;rsquo;s Ruby JMeter gem&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nancy-cai/performance-test-ruby-jmeter"&gt;Nancy&amp;rsquo;s GitHub repo&lt;/a&gt; where you can find a copy of her test scripts&lt;/p&gt;
&lt;p&gt;Follow Nancy on &lt;a href="https://twitter.com/nancycai8"&gt;Twitter&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Follow Nancy on &lt;a href="https://github.com/nancy-cai"&gt;GitHub&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Tips and Tricks for Using Flood Element</title><link>https://nicolevanderhoeven.com/blog/20181123-tips-and-tricks-for-using-flood-element/</link><pubDate>Fri, 23 Nov 2018 23:07:24 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20181123-tips-and-tricks-for-using-flood-element/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/tips-and-tricks-for-using-flood-element"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/tips-and-tricks-for-using-flood-element"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In case you missed it, there’s a new performance test tool on the block, and it’s called &lt;a href="https://element.flood.io/"&gt;Flood Element&lt;/a&gt;. It’s a scalable browser-based tool that allows you to write scripts in javascript that interact with web pages like a real user.&lt;/p&gt;
&lt;p&gt;Using Browser Level Users is a &lt;a href="https://flood.io/blog/why-you-should-load-test-with-browsers/"&gt;newer approach to load testing&lt;/a&gt; that overcomes a lot of the common challenges we hear about traditional methods of testing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Easier scripting that is akin to common functional tools like Selenium and easier to learn&lt;/li&gt;
&lt;li&gt;More realistic results that are based on true browser performance rather than API responses&lt;/li&gt;
&lt;li&gt;Ability to test against all components of your web app, including things like Javascript that is rendered via the browser&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Given the above benefits, it’s a no brainer to check out Flood Element for your web load testing, especially if you have struggled with the existing tools on the market like JMeter or HP LoadRunner.&lt;/p&gt;
&lt;p&gt;Pairing Element with &lt;a href="https://flood.io/"&gt;Flood&lt;/a&gt; turns it into a pretty powerful load test tool. We have a &lt;a href="https://help.flood.io/getting-started-with-load-testing/step-by-step-guide-flood-element"&gt;great guide here&lt;/a&gt; that you can follow if you’d like to get started with it. As you can imagine, I’ve been using and testing Element for several months now and I thought I’d share some tips I’ve learned along the way.&lt;/p&gt;
&lt;h2 id="initialising-your-script"&gt;Initialising your script&lt;/h2&gt;
&lt;p&gt;You can always start from scratch, but the quickest way to get started is to type&lt;/p&gt;
&lt;p&gt;&lt;code&gt;element init myfirstelementtest&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;from your terminal, filling in the project name you’d prefer.&lt;/p&gt;
&lt;p&gt;You’ll then be asked to type in the title of your test as well as the URL you’d like to script against. After a minute, you’ll see that a new directory has been created:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20181123-01.png" alt="New directory in Flood Element" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Element will automatically create a file called &lt;code&gt;test.ts&lt;/code&gt;. This file will contain the skeleton of a script, along with some sample code to help you find a button and then click on it. But before you open it, let’s move on to…&lt;/p&gt;
&lt;h2 id="choosing-the-right-text-editor"&gt;Choosing the right text editor&lt;/h2&gt;
&lt;p&gt;Scripting in Element is already pretty simple, but I’ve found two things that really help while scripting are syntax highlighting and code completion. Syntax highlighting will greatly improve your experience when first learning a new test tool like Element, and code completion will make your scripting lightning fast as you become more experienced in the process. My text editor of choice is &lt;a href="https://code.visualstudio.com/"&gt;Visual Studio Code&lt;/a&gt;, which has both of those features. It’s slick and clean, and it does the job.&lt;/p&gt;
&lt;p&gt;Syntax highlighting is when the text editor intelligently changes the font colour of your code according to its role in the programming language you’re using. Here’s a screenshot of the test.ts file we generated earlier in VS Code to show you what I mean:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20181123-02.png" alt="Generated sample Flood Element script" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;This makes it easier to make sense of the code at a glance: comments are in green, values and labels are in orange, etc.&lt;/p&gt;
&lt;p&gt;Code completion is when you start to type something, and VS Code helpfully opens a context menu with suggestions for methods you can use.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20181123-03.gif" alt="Auto-completion in VSCode" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;I love this because it means I don’t have to remember the exact name of the method. It also suggests names of variables you’ve already defined and highlights code that doesn’t make sense. This will help to make your tests more maintainable and readable for others, which is a great benefit as you look to scale your testing out in the future.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20181123-04.gif" alt="Suggestions in VSCode" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h2 id="taking-screenshots"&gt;Taking screenshots&lt;/h2&gt;
&lt;p&gt;One of the most powerful features of Element is its ability to take screenshots. I find it immensely useful when debugging because sometimes it’s just easier to see what’s going on visually. With protocol based tools, debugging can often be a much more involved and technical process.&lt;/p&gt;
&lt;p&gt;There are two ways to take screenshots in Element:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add a setting to automatically take a screenshot when an error is encountered. You can do this by setting screenshotOnFailure to true in TestSettings:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;export&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;const&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;settings&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;TestSettings&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;device&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Device&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;iPadLandscape&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;userAgent&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;flood-chrome-test&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;clearCache&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;disableCache&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;screenshotOnFailure&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="2"&gt;
&lt;li&gt;Explicitly take a screenshot at a particular point in the script. You can do this by adding&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;takeScreenshot&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;to your code.&lt;/p&gt;
&lt;h2 id="viewing-screenshots"&gt;Viewing Screenshots&lt;/h2&gt;
&lt;p&gt;Once you’ve taken screenshots within your tests, you will likely want to view them and know that they will be stored for future safekeeping. Whether you are running your test locally on have uploaded it to Flood to run with increased concurrency, Flood Element has you covered.&lt;/p&gt;
&lt;h3 id="locally-run-tests"&gt;Locally Run Tests&lt;/h3&gt;
&lt;p&gt;Screenshots will be saved as jpg files in a timestamped folder corresponding to your run. It should look something like: &lt;code&gt;...myfirstelementtest/tmp/element-results/test/2018-11-20T135700.595Z/flood/screenshots/&lt;/code&gt; and the screenshots will be uniquely named so that new screenshots, even for the same step, don’t overwrite older ones.&lt;/p&gt;
&lt;p&gt;However, I rarely have to look up the screenshots in that folder because I prefer to see them in iTerm2 for macOS. iTerm is an alternative to the terminal that works particularly well with Element. When you take a screenshot, iTerm actually shows it in-line:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20181123-05.png" alt="Screenshots shown inline with iTerm" loading="lazy" decoding="async"&gt;
‍&lt;/p&gt;
&lt;h3 id="tests-run-in-flood"&gt;Tests Run in Flood&lt;/h3&gt;
&lt;p&gt;Running an Element script on Flood is ideal when you need larger concurrency. Rather than accessing your screenshot locally, Flood will centralize the images into your account so the images remain even after the cloud load injectors are destroyed. You can get to the screenshot files by downloading Archived Results:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20181123-06.png" alt="Archived Results in Flood" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Or you can also choose to click on a step on the dashboard to see a film strip of your test:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20181123-07.png" alt="Seeing screenshots during a test with Flood" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h2 id="using-logs"&gt;Using Logs&lt;/h2&gt;
&lt;p&gt;You may need to check out the logs for more technical debugging, especially when the screenshots don’t tell the whole story. Whether you are running your test locally on have uploaded it to Flood to run with increased concurrency, Flood Element has you covered.&lt;/p&gt;
&lt;h3 id="locally-run-tests-1"&gt;Locally Run Tests&lt;/h3&gt;
&lt;p&gt;You can print to the console by typing, for example:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;console.log('orderValues = ' + orderValues)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This will print the value of the variable orderValues at that point in the script. You would see this in your terminal if you’re running Element locally.&lt;/p&gt;
&lt;h3 id="tests-run-in-flood-1"&gt;Tests Run in Flood&lt;/h3&gt;
&lt;p&gt;If you’re running the script on Flood, you can either download the log (in the same Archived Results zipped file as mentioned earlier) or you can click on the Logs tab:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20181123-08.png" alt="Test logs on Flood" loading="lazy" decoding="async"&gt;
‍&lt;/p&gt;
&lt;h2 id="fun-with-flags"&gt;Fun with Flags&lt;/h2&gt;
&lt;p&gt;Element comes with a few flags that give you more control over how the script is run locally. Here are a few of my favourites!&lt;/p&gt;
&lt;h3 id="headless-flag"&gt;Headless Flag&lt;/h3&gt;
&lt;p&gt;When in doubt, run Element in non-headless mode to see the script actually opening the web app on Chrome and interacting with the page. This is only possible locally, but there’s nothing like actually seeing for yourself what’s happening in real time instead of relying on screenshots and logs after the fact. To enable this mode, add the flag when running your test:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;element run myfirstelementtest.ts --no-headless&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="watch-flag"&gt;Watch Flag&lt;/h3&gt;
&lt;p&gt;Element will automatically close the browser window when it encounters an error or finishes the iteration. Adding &lt;code&gt;--watch&lt;/code&gt; will leave the browser window open and then will monitor the script. As soon as the script is saved, it will automatically run it in the same window from the beginning. Simply add this flag like the above example:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;element run myfirstelement.ts --watch&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="dev-tools-flag"&gt;Dev Tools Flag&lt;/h3&gt;
&lt;p&gt;This opens a browser instance and runs the script with the Chrome Dev Tools open, allowing you to find locators for the next action you want to script. Simply add this flag like the first example:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;--dev-tools&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="more-flags"&gt;More Flags&lt;/h3&gt;
&lt;p&gt;For more flags, use:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;element run --help&lt;/code&gt;&lt;/p&gt;
&lt;h2 id="try-element"&gt;Try Element&lt;/h2&gt;
&lt;p&gt;You’ve just gotten a crash course on Flood Element. You’re all set! If you haven’t already, download Element &lt;a href="https://element.flood.io/"&gt;here&lt;/a&gt; to start writing functional test scripts and reusing them as load test scripts on Flood. If you don’t have a Flood account, you can easily sign up for a free trial here.&lt;/p&gt;
&lt;p&gt;We’re extremely proud to have been able to contribute to the open-source community and can’t wait to have you try this new addition to the Flood line!&lt;/p&gt;</description></item><item><title>Prepare for Viral Videos With Flood Element</title><link>https://nicolevanderhoeven.com/blog/20181108-prepare-for-viral-videos-with-flood-element/</link><pubDate>Thu, 08 Nov 2018 23:24:31 +0100</pubDate><guid>https://nicolevanderhoeven.com/blog/20181108-prepare-for-viral-videos-with-flood-element/</guid><description>
&lt;link rel="canonical" href="https://www.flood.io/blog/prepare-for-viral-videos-with-flood-element"&gt;
&lt;p&gt;&lt;em&gt;Originally posted &lt;a href="https://www.flood.io/blog/prepare-for-viral-videos-with-flood-element"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;One of the more interesting things to load test is video. You see, traditional load test tools are protocol-based, which means that their approach to load testing video is to capture and simulate the traffic that the browser generates under the covers, sending the same requests to the application. This approach can still be successful&amp;ndash; in fact, one of our favourite clients here at Flood recently &lt;a href="https://blog.hotstar.com/millons-scale-simulations-1602befe1ce5"&gt;used Gatling to simulate 6 million concurrent users&lt;/a&gt; streaming video from their application. However, for some use cases, testing at the protocol level can’t simulate everything that happens in a real world use case.&lt;/p&gt;
&lt;h2 id="the-challenge"&gt;The Challenge&lt;/h2&gt;
&lt;p&gt;If you’re a video creator, the ultimate goal is often a simple goal: creating a viral video. Unfortunately, preparing for and simulating this all-important use case is typically impossible with protocol based tools. The same feature that makes them so efficient &amp;ndash; not using a browser to send the requests &amp;ndash; is the same thing that prevents them from being used to simulate the needed browser level events. You see, things like view counts on a video are normally tracked by scripts running on the page. Traditional tools download these scripts along with other page resources, but the scripts themselves are not executed. Enter Flood Element.&lt;/p&gt;
&lt;h2 id="a-solution-flood-element"&gt;A Solution: Flood Element&lt;/h2&gt;
&lt;p&gt;Flood Element represents a new way of looking at load testing. It is a browser-based tool, which means that it actually drives an instance of the browser to test an application. Rather than telling it what requests to send to simulate a user like you would do with a protocol-based tool, you tell Element which buttons to click or which elements on a page to interact with just as a real user would. Essentially Element IS a user, using your application the way it was meant to be used. This means that it also executes any scripts that would run on the browser side. It’s so realistic that you could even use Element to make your YouTube video viral* by scripting up users to view your content… hypothetically speaking.&lt;/p&gt;
&lt;h2 id="simulating-real-user-views"&gt;Simulating Real User Views&lt;/h2&gt;
&lt;p&gt;Testing video with Flood Element is actually pretty easy, especially if you are familiar with open source testing tools like Selenium. If you haven’t yet begun using Element, go through the installation guide &lt;a href="https://element.flood.io/"&gt;here&lt;/a&gt;. You can download the full script used for this tutorial &lt;a href="https://github.com/flood-io/element/blob/master/examples/youtube.ts"&gt;here&lt;/a&gt;. In this example, we’re going to be using a YouTube video of the opening credits the classical cartoon Top Cat (the indisputable leader of the gang) from Warner Bros.&lt;/p&gt;
&lt;h3 id="step-1-navigate-to-the-video-page"&gt;Step 1. Navigate to the video page&lt;/h3&gt;
&lt;p&gt;Let’s start with a basic script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;import&lt;/span&gt; { &lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;TestSettings&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;By&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;Until&lt;/span&gt; } &lt;span style="color:#a6e22e"&gt;from&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;@flood/element&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;export&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;const&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;settings&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;TestSettings&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;loopCount&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#f92672"&gt;-&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;clearCache&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;disableCache&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;actionDelay&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;8&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;stepDelay&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;screenshotOnFailure&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;userAgent&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;flood-element-test&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;export&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;default&lt;/span&gt; () =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;01_Home&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;async&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt; =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;visit&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;https://www.youtube.com/watch?v=6fvhLlrBrPQI&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;takeScreenshot&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; })
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is the bones of a basic script in Flood Element. It consists of a single step that involves doing two things: visiting the starting URL, which in this case is the direct link to the YouTube video, and then taking a screenshot once loading the page. Taking screenshots is particularly useful when testing video because screenshots give you a way to check that your script is doing what you want it to do. It’s good to take periodic screenshots as well, to measure progress.&lt;/p&gt;
&lt;p&gt;To help you validate that the script runs well locally before scaling to hundreds or thousands of users, you can use our Element CLI. If you save the above code as youtube.ts, open up your terminal in that directory and then type:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;element run youtube.ts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Assuming you’ve got Element set up correctly, you should see something like this: (Note that screenshots are only available when using iTerm as your shell. They are also saved as files under &lt;code&gt;.../tmp/element-results/youtube&lt;/code&gt; .)
‍
&lt;img src="https://nicolevanderhoeven.com/assets/20181108-01.png" alt="Screenshots shown while running Element in iTerm" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;p&gt;Oops! It looks like our script does navigate to the page, but it doesn’t play the video. We’ll need to click on that play button. Let’s add that to our script.&lt;/p&gt;
&lt;h3 id="step-2-click-the-play-button"&gt;Step 2. Click the Play button&lt;/h3&gt;
&lt;p&gt;We’ll need to add some lines to click the play button after visiting the page but before we take the screenshot, so that we can verify later whether or not the play button was clicked.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;02_ClickPlay&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;async&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt; =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;//Click on Play button
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;let&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;playBtn&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;findElement&lt;/span&gt;(&lt;span style="color:#a6e22e"&gt;By&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;xpath&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;//button[@aria-label=&amp;#34;Play&amp;#34;]&amp;#39;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;playBtn&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;click&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;takeScreenshot&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; })
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this example I used Xpath, but you do have the option to select based on partial text, CSS selector, etc. A tool I like to use to get these is Chrome Developer Tools’ Elements tab, which allows you to get the selectors for a particular element.&lt;/p&gt;
&lt;h3 id="step-3-take-periodic-screenshots"&gt;Step 3. Take periodic screenshots&lt;/h3&gt;
&lt;p&gt;To make sure that the video is really playing, we’ll need to take a screenshot a few seconds after the initial screenshot in order to visually confirm that the video has progressed. Even better, we can get Element to take screenshots at regular intervals. So let’s add a third step:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#39;03_Play&amp;#39;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;async&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt; =&amp;gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;//Take a screenshot every 5 seconds until video finishes
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;‍&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; (&lt;span style="color:#a6e22e"&gt;i&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;; &lt;span style="color:#a6e22e"&gt;i&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;lt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;60&lt;/span&gt;; &lt;span style="color:#a6e22e"&gt;i&lt;/span&gt;&lt;span style="color:#f92672"&gt;++&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;takeScreenshot&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;await&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;browser&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;wait&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; })
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To use &lt;code&gt;i&lt;/code&gt;, we&amp;rsquo;ll also need to declare it earlier in the script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;import&lt;/span&gt; { &lt;span style="color:#a6e22e"&gt;step&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;TestSettings&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;By&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;Until&lt;/span&gt; } &lt;span style="color:#a6e22e"&gt;from&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;@flood/element&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;‍&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;i&lt;/span&gt; &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this step, &lt;code&gt;i&lt;/code&gt; will correspond to every 5 seconds of playtime for the video, so we&amp;rsquo;ll need to make sure that the limit of &lt;code&gt;i&lt;/code&gt; that we set is sufficient time for the entire video to play. Every 5 seconds, Element will take a screenshot, which will help us verify that the video is progressing after the test.&lt;/p&gt;
&lt;p&gt;Click &lt;a href="https://github.com/flood-io/element/blob/master/examples/youtube.ts"&gt;here&lt;/a&gt; to download the script before moving on to the next step, unless you’ve been following along at home.&lt;/p&gt;
&lt;h3 id="step-4-run-it-on-flood"&gt;Step 4. Run it on Flood!&lt;/h3&gt;
&lt;p&gt;The final step is to upload it to Flood and run the test. Click &lt;a href="https://guides.flood.io/scripting-and-tools/flood-element/getting-started-with-element"&gt;here&lt;/a&gt; to see a step-by-step guide for how to do just that. You can choose how many users you’d like to run on Flood and across how many nodes. New users will be given 5 node hours which will allow them to run a test with up to 250 users for 1 hour. Each node will have a different IP address, so plan for that accordingly if your application takes that into account.&lt;/p&gt;
&lt;p&gt;One of the things I love about running it this way is that if you click on the arrow to the right of the sole transaction, you can see screenshots taken along the way to prove that the video is being played:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://nicolevanderhoeven.com/assets/20181108-02.jpg" alt="Screenshots during test execution in Flood" loading="lazy" decoding="async"&gt;
&lt;/p&gt;
&lt;h2 id="some-considerations-for-load-testing-video-with-flood-element"&gt;Some Considerations for Load Testing Video with Flood Element&lt;/h2&gt;
&lt;h3 id="taking-screenshots-and-using-logs-are-necessary-for-debugging"&gt;Taking screenshots and using logs are necessary for debugging.&lt;/h3&gt;
&lt;p&gt;Because the page elements while a video is streaming are static, we’re not going to be able to use those as clues as to where we are in our scenario. To compensate, it’s a good idea to take screenshots and use console.log() to determine progress, especially while debugging. Be careful not to go overboard on these when actually running the load test though, as they will consume system resources.&lt;/p&gt;
&lt;h3 id="videos-may-behave-differently-in-headless-mode"&gt;Videos may behave differently in headless mode.&lt;/h3&gt;
&lt;p&gt;While writing this tutorial, I realised that YouTube auto-plays videos when on non-headless mode (aka, when opening a video link manually on a browser or with the &lt;code&gt;--no-headless&lt;/code&gt; flag in Element). When it’s executed in headless mode via Flood Element, it requires a click on the play button to begin. Again, use screenshots to aid you in spotting these differences.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Element’s browser-level scripting capabilities allow it to simulate users that interact with pages just like human users would. Element and Flood are a powerhouse combo, providing the flexibility to test with thousands of users across the world within a few minutes.&lt;/p&gt;
&lt;p&gt;Element seeks to reduce the gap between a scripted user and a real user &amp;ndash; and it’s so realistic that it’s hard to tell the difference. We encourage you to take advantage of our free trial offer and run some real world load tests today!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;*We don’t advise or condone the use of Element to artificially inflate views on YouTube in any way which may violate its &lt;a href="https://www.youtube.com/static?template=terms"&gt;Terms of Service&lt;/a&gt;. The purpose of this article is to showcase Element and how realistically it recreates real users.&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>