<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vlad Mateica on Medium]]></title>
        <description><![CDATA[Stories by Vlad Mateica on Medium]]></description>
        <link>https://medium.com/@vladmateica?source=rss-5677f5d7f068------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Vlad Mateica on Medium</title>
            <link>https://medium.com/@vladmateica?source=rss-5677f5d7f068------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 07:08:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vladmateica/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Test Automation: We forgot how to KISS]]></title>
            <link>https://medium.com/@vladmateica/test-automation-we-forgot-how-to-kiss-2a18059837ea?source=rss-5677f5d7f068------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a18059837ea</guid>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[selenium]]></category>
            <dc:creator><![CDATA[Vlad Mateica]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 09:40:11 GMT</pubDate>
            <atom:updated>2025-01-21T09:51:07.270Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ip_yVK4PGJD8a9hmKJdb5A.jpeg" /></figure><h3>Preface</h3><p>It was the early 2000s and a (very) young version of myself was sitting in front of an old CRT TV scrolling trough the channels when I stumbled upon the <a href="https://en.wikipedia.org/wiki/Scrapheap_Challenge">Scrapheap Challenge</a> on the Discovery Channel. It was in an episode of that show that I first heard about the concep of KISS — Keep It Simple, Stupid and that is what I want to discuss in this article.</p><p>Fast forward 11 odd-years and a 22 year old me was working on my first job as a QA engineer in the automotive industry testing instrument clusters (the part behind your steering wheel; speedo, tacho, board computer). It was there that I first got a taste of test automation, but it wasn’t anything like the fancy stuff that we have today with our high level programming languages, frameworks, DSLs and all that. No, this test automation was done in Excel, yes <a href="https://en.wikipedia.org/wiki/Microsoft_Excel">Microsoft Excel</a>.</p><p>The way it worked is you had 3 columns (step condition, instruction, parameters) for instructions with an extra 2 columns (title and category) to define where a new test case begins. This .xls file was then interpreted by an internal <a href="https://en.wikipedia.org/wiki/LabVIEW">LabView</a> application which would send commands to the <a href="https://en.wikipedia.org/wiki/CANoe">CANoe</a> simulation which replaced the other car ECUs and in turn would send data to the instrument cluster. These instructions were executed sequentially with “step condition” controlling whether a step is executed or not, allowing you to differentiate between different versions of the same thins (think base vs premium model). It had a label instruction, a compare and jump instruction, some basic variables and that was pretty much it. No classes, no methods, no macros or routines; even assembly has routines.</p><p>Having to automate fairly complex tests with that tool got me thinking in ingenious ways but also taught me to <strong>keep things simple, </strong>because you couldn’t do complex things.</p><h3>Why do we automate</h3><p>I am a lazy person, with probably a bit of ADHD, so repetitive tasks are a surefire way to get me to loose focus and wander off into other things.</p><p>Some will do it as a stepping stone to a developer career, others will do it for better job security and opportunities.</p><p>Some of us will do it because it was a fun thing to do in the downtime, we liked messing around with code and found out it can actually save us some time.</p><p>Managers will tell you it’s to learn new skills, become a better QA engineer and meet some KPIs.</p><p>Companies will tell you it’s because automation and CI/CD is the future… but in reality it’s because it saves time and money.</p><p>Regardless of the reasons the end result should be a reduction in boring, repetitive tasks, faster results on the quality of new code and less human intervention in the entire build and release process. It should also mean less missed bugs because automation won’t get bored of running the same thing for the 300th time and not pay full attention to it. Automation also won’t have bad days, hangovers (we’ve all been there), colds or nights when it couldn’t sleep. But herein lies the biggest problem, you are testing code using code — and to quote a line from my favorite graphic novel (<a href="https://en.wikipedia.org/wiki/Watchmen">Watchmen</a>): <em>Who watches the watchmen</em> ?</p><p>The biggest challenge is making sure you can trust your tests and it’s here that point of this article comes into play.</p><h3>Reliability through simplicity</h3><p>The less complex something is, the more reliable and easy to use it is. Let’s look at some examples of reliability and simplicity:</p><ul><li>The infamous <a href="https://en.wikipedia.org/wiki/Toyota_Hilux#Fourth_generation_(N50,_N60,_N70;_1983)">Toyota Hilux</a> that Top Gear tried to destroy not <a href="https://youtu.be/xnWKz7Cthkk?si=4pQItkiJ0ZMQW_M6">once</a>, not <a href="https://youtu.be/xTPnIpjodA8?si=nBP3LoGJJ_rta3vD">twice</a>, but <a href="https://youtu.be/kFnVZXQD5_k?si=R7f9mrh7Q40-LH5Q">thrice</a>… and it still started after minor fixes.</li><li>The <a href="https://en.wikipedia.org/wiki/AK-47">AK-47</a>, perfectly described in <a href="https://youtu.be/GF-t-0hDDIA?si=PgNzloHH0dlbKFre&amp;t=14">this scene</a> from the movie Lord of War</li><li>The <a href="https://en.wikipedia.org/wiki/Hydraulic_ram">hydraulic ram pump</a></li></ul><p>The examples could go on, you probably have a tool or gadget that you use in your everyday life that you marvel at how simple yet useful it is.</p><p>If you want to read more into this <a href="https://dl.acm.org/doi/10.5555/2187809">The Design of Everyday Things by Donald</a> A. Norman is a fantastic book.</p><p>Simple tests mean less things can go wrong but more importantly it means fewer occasions for something to be missed or incorrectly understood; tests with incorrect logic are worse than no tests at all. Tests should “expose” what they do clearly and directly, you should be able to go through the lines of a test and understand what’s being done and how. Having simple tests will also help you debug them quicker and onboard new people faster. Think of a new joiner who has knowledge of the programming language and frameworks you’re using: if the tests are simple and straightforward they will get the hang of everything and start contributing in no time. Now if your automation suite is some esoteric entity that only the chosen ones can understand then not only will the new person take longer but you will also loose the time of another person who’ll have to do the training and subsequent support.</p><p>Over the past few years I’ve been trough several projects and I’ve seen some things that made me want to write this article.</p><h4>Fool proofing tests</h4><p>I feel like is some cases the purpose of tests got skewed to “tests need to be green”. This is wrong, the purpose of tests is <strong>to fail. </strong>You want your automation to raise red flags when something isn’t as expected. Automation is very accurate, any deviation will cause it to fail and that’s precisely why we used it. Let your tests fail, retries not only add complexity (and decrease reliability) but might cause you to miss those pesky, hard to reproduce or transient bugs which some of your users might find very annoying or might even cause problems. This might sound like I’m going against what I just said in the previous paragraph but your tests should be robust in the sense that there are not many things that can go wrong with them, not it the sense of <em>if at first you don’t succeed, try, try again.</em></p><p>I remember a case on one application where sometimes what we called a canvas would just go blank and it looked like all your work was lost. A click on the save button button would solve the problem but then this happened in the middle of a C-level presentation for a potential client — it made things <em>interesting. </em>The problem had been observed months back but it was deemed low priority and a retry was put in the automated tests, that was a hard lesson learned.</p><h4>Over abstraction and wrappers</h4><p>Another thing that I’ve noticed is a tendency to go all in on abstraction and wrapper methods sometimes for no reason than just because it’s possible.</p><p>Don’t go off creating abstract classes and interfaces that are only inherited or implemented by a single class, just write that class. If the need arises in the future do it then, keep things just as complex as they need to be and not an ounce more.</p><p>Do not create methods that run a single line of code, more than once I’ve seen code like this in Selenium tests:</p><pre>public void clickOnElement(WebElement element){<br>  element.click();<br>}</pre><p>Just use the .click() method where you need it, <strong>keep it simple.</strong></p><p>I recently worked on another project that tested an application that made reservations. I spend about 2 hours digging through no more than 6 classes and about 10 methods to find out where the reservation date was set when you wanted to create a new reservation. You wouldn’t just go and set a date, you set a timeframe on a reservation object which then internally would change itself and would even retry different dates until it would manage to make a reservation. This was all hidden at a first glance and I couldn’t understand why sometimes I would end up with a reservation for today and sometimes for tomorrow . It was so convoluted I have a hard time putting it into words.</p><p>Another thing that comes to mind is logging, there are tons of logging libraries out there, tried and tested and used by thousands of projects, do not go and write your own “logger” class like this:</p><pre>public class Logger{<br>  public void logError(String message){<br>    System.out.println(&quot;Error: &quot; + message);<br>  }<br><br>  public void logDebug(String message){<br>    System.out.println(&quot;Debug: &quot; + message);<br>  }<br>  <br>  public void logInfo(String message){<br>    System.out.println(&quot;Info: &quot; + message);<br>  }<br>}</pre><p>This brings me to my next point:</p><h4>Someone else probably already did it, better</h4><p>…and that is not a bad thing. You do not need to reinvent the wheel, there were other people who invented it, just use the wheel and build your cart…or in our case use existing libraries and build your automation. Use existing, and <strong>tested</strong>, libraries and they will save you from a lot of headaches. No need to create API models and methods, we have <a href="https://rest-assured.io/">RestAssured</a> (there are similar libraries for other languages). No need to interface with the browser, we have <a href="https://www.selenium.dev/">Selenium</a>, <a href="https://playwright.dev/">Playwright</a> or <a href="https://www.cypress.io/">Cypress</a> to name a few.</p><p>But Vlad, you will say, this stomps innovation and these tools were created exactly by people who wanted to reinvent the wheel and I will tell you this:</p><h4>Learn to crawl before flying a spaceship</h4><p>We established in the beginning that we automate tests to avoid repetitive tasks and save time to focus on better things, and what are those things ? Reinventing the wheel.</p><p>Start by building a <strong>simple </strong>but robust and reliable automation suite using readily available resources. Use Selenium, use RestAssured, use TestNG and build tests you can use to validate builds and releases <em>while</em> you are working on better things. Think of it in terms of <a href="https://en.wikipedia.org/wiki/Maslow%27s_hierarchy_of_needs">Maslow’s hierarchy of needs</a>, once you have you basic needs taken care of (that <strong>simple</strong> version of your automation) you can start working on the other needs. You can take some time and invest in improving something that you feel it’s not quite right, or you can start working on something completely new that you think will revolutionize testing. If the releases are going smoothly, the product works and bugs are not making it to production not a single manager worth their salt will tell you not to pursue innovation or improvement.</p><h4>Work towards impact not numbers</h4><p>How may times have you seen this situation ?:</p><blockquote>We have 90% automation coverage.<br>Great, that means your releases take no time at all.<br>Oh no, almost all are flaky and we have to check them manually.</blockquote><p>…or something along those lines.</p><p>This is especially for managers: Do not work towards numbers which only look good on paper and help your team with nothing. Focus your efforts on making an impact on the team’s wellbeing and on the product’s quality. Forty percent <strong>reliable</strong> automation is orders of magnitude better than 90% flaky automation. Focusing on impact will actually bring value to the team and product and while initially the gains might seem small they will compound over time and before you know it the team will deliver things you would not have dreamt of.</p><h3>The age of “AI”</h3><p>For the past two years it seems that every day there’s a new LLM, startup or tool that’s going to revolutionize everything through the magic of “AI”.</p><p>I’m going to leave it at this: Would you trust a statistical black box validating the brake ECU of your car ?</p><h3>Conclusion</h3><p>I went against my advice and didn’t really keep this article simple but I’ll keep the conclusion simple.</p><p>Test automation is supposed to be easy and fun. It’s supposed to rid us of those boring repetitive tasks and allow us to focus on creative work. It can only do that if it’s reliable and robust, and simple things tend to be that. Focus on small steps and incremental gains, take care of your basic needs initially and you’ll be able to shoot for the stars after.</p><p>Keep It Simple, Stupid.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a18059837ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>