<?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 Tayls Bells on Medium]]></title>
        <description><![CDATA[Stories by Tayls Bells on Medium]]></description>
        <link>https://medium.com/@devtayls?source=rss-27b3376d9c20------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*osm7x-UsJ2-2O4fpcGToSA.jpeg</url>
            <title>Stories by Tayls Bells on Medium</title>
            <link>https://medium.com/@devtayls?source=rss-27b3376d9c20------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:46:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@devtayls/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[UI Test Automation: Value & Restraint]]></title>
            <link>https://devtayls.medium.com/ui-test-automation-value-restraint-b978a8a1feda?source=rss-27b3376d9c20------2</link>
            <guid isPermaLink="false">https://medium.com/p/b978a8a1feda</guid>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[qa-training]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[qa-testers]]></category>
            <dc:creator><![CDATA[Tayls Bells]]></dc:creator>
            <pubDate>Wed, 14 Apr 2021 16:09:44 GMT</pubDate>
            <atom:updated>2021-04-14T16:09:44.389Z</atom:updated>
            <cc:license>http://creativecommons.org/publicdomain/zero/1.0/</cc:license>
            <content:encoded><![CDATA[<p>I recently had the opportunity to work on a take home assessment for a QA Automation position. The take home assessment involved using <a href="https://webdriver.io/">WebDriver.io </a>to fix up some tests that were flaky, not testing what they claimed to, or just straight up borked. I needed to take these tests from not passing to inspiring confidence that the business landing page was working as intended.</p><p>I had a lot of fun during the assessment thinking about the design principles of testing and how those principles might apply to automated UI testing. And since I seem to have Quality on my mind, I thought it’d be neat to put some thoughts down on paper.</p><h4><strong>(Some) Properties of Bad Tests:</strong></h4><ul><li><em>Flaky</em>: Flaky tests are what you get when the test passes and fails sporadically. That is, the test isn’t <em>reliable</em>. Reliability is the measure of how consistent your test result is. Common causes include a dynamically updating DOM and low specificity selectors.</li><li><em>Invalid</em>: Do you doubt whether your test is actually measuring the aspect of the software that it claims to? If so, your test probably isn’t <em>valid</em>. Validity is the measure of how closely tethered your test is to the state of the world that it is supposed supposed to be measuring.</li></ul><figure><img alt="Dartboards indicating previous hits. Grouped hits are reliable and hits near the center are valid." src="https://cdn-images-1.medium.com/max/389/1*PRijsyt5Ra9v1Vjc1hucZw.jpeg" /><figcaption>via <a href="https://webcourses.ucf.edu/courses/1221818/pages/chapter-5-measurement-concepts">Dr. Michael E. Dunn</a></figcaption></figure><ul><li><em>Borked</em>: Borked tests belong to the super set of all tests that are just, plain, well… broken for one reason or another. This could be because of internal problem like being flaky or invalid to external problems like throwing exceptions or routinely timing out the process halting test execution altogether. That isn’t even half of it though: the real issue with borked tests is that they undermine confidence in the act of testing and even quality control practices writ broadly!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*sK8_Q1cBIfxSkQB_FmDnPA.jpeg" /><figcaption>We all gotta bork sometimes</figcaption></figure><p>Using our collection of bad test properties, we can look at some of the anti-patterns in the test assessment and how we can change them to improve the value that automated testing brings to the table</p><h3><strong>Balancing test completeness vs resource consumption.</strong></h3><pre><strong><em>it</em></strong>(&#39;you can search for content with the quick search bar&#39;, () =&gt; {})</pre><p>This is an example of a test that has a huge possible scope of valid test conditions. We might need to examine: the min and max amount of characters, different character sets, inserting malicious code on top of testing the accuracy and specificity of the results that the search bar returns!</p><p>Of course, writing tests for all those conditions would be incredibly expensive in terms of QA Engineer time. Not to mention that each condition (on this site) would require it’s own page load! Instead, we should look to offload these quality &amp; security concerns to less expensive and more universal parts of the code base. For instance, we can prevent SQL injection by sanitizing inputs on the back end and use integration tests to check that <em>any injected code</em> doesn’t work no matter where it is received from.</p><p>UI testing is expensive to run, expensive to code and expensive to update. We need to be careful to follow the example set by the test automation pyramid and push testing concerns as far down the stack as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*9skw8tSuimBoaWrONOlWbg.png" /><figcaption><a href="https://martinfowler.com/articles/practical-test-pyramid.html">Martin Fowler’s Practical Test Pyramid</a></figcaption></figure><h3><strong>Avoiding ambiguous test cases</strong></h3><pre><strong><em>it</em></strong>(&#39;dropdown menus are navigable&#39;, () =&gt; {})</pre><p>One of the test cases that I had to remedy asked whether the dropdown elements of the navbar were navigable. Well that’s easy to verify, right? How hard could it be to make sure that the dropdown elements open when you interact with them?</p><p>Or wait, do they want to know whether you can use ‘tab’ or accessibility devices to traverse the child elements on the tree? These dropdowns are full of links - do we need to make sure those links actually point somewhere? What happens when the site renders for mobile and that dropdown is engulfed in a hamburger menu? What about if someone isn’t using JS, does the dropdown need to be progressive? Clearly determining whether your menus are navigable is more complex than making the dropdown actually opens.</p><p>Because of how loosely navigability could be defined, I decided to test whether the dropdowns rendered properly into the DOM when interacted with. Seeing as testing the content - a series of links - was going to be brutally expensive to test at the UI level I suggested that we test those links at the integration layer.</p><h3><strong>Asserting often and early</strong></h3><pre><strong><em>it</em></strong>(&#39;all footer links work&#39;, () =&gt; {</pre><pre><strong><em>describe</em></strong>(&#39;The footer exists on the dom&#39;, () =&gt; {<br>  <strong><em>expect</em></strong>(footer).toExist();<br>});<br><br><strong><em>describe</em></strong>(&#39;The Footer Links are clickable&#39;, () =&gt; {<br>  for( let j = 0; j &lt; footerLinks.length; j++) {<br>    <strong><em>expect</em></strong>(footerLinks[j]).toBeClickable();<br>  }<br>});<br><br><strong><em>describe</em></strong>(&#39;The Footer Links are valid javascript URLs&#39;, () =&gt; {<br>  links.forEach( (currentVal) =&gt; {<br>    let flag = isValidUrl(currentVal);<br>    <strong><em>expect</em></strong>(flag).toBeTruthy();<br>  })<br>});<br><br><strong><em>describe</em></strong>(&#39;The Footer Links resolve&#39;, () =&gt; {<br>   //some very expensive code<br>});<br>})</pre><p>A wise engineer<strong><em> </em></strong>once <a href="https://pragprog.com/">wrote</a> that version control is best used <em>early </em>and <em>often. </em>I think the same could be said of assertions. This is because assertions themselves are typically programmatic checks that are very cheap to execute. Especially so in comparison to the time it takes to load a web page and get the all-clear signal to start testing. Combining assertions here allows you to get the biggest bang for your testing buck when there is consistent pressure to increase automated test coverage while the CI/CD pattern demands that build times drops from days to minutes.</p><p>One way to take advantage of this time difference is to first assert fast-to-validate properties of the software under test. In the example above, I chose to test first that the footer was rendered, next that the links in the footer were clickable nodes on the DOM and finally that the URLS the links pointed to were valid JS URL elements. Up to this point we have spent ~3 seconds to load the page and perform sanity check on the footer links.</p><p>Only after all that did I test each link to make sure that it resolved and loaded what we asked for. This allows us to sanity check that things are as they should be before we get down into the nitty gritty of testing a dozen or two links. It shouldn’t be a big surprise to learn that by now we’ve spent ~52 seconds executing the suite. Nearly a whole minute just to test some static links at the bottom of a web page! It’s easy to see why catching errors in the first set of assertions would be so much preferable to waiting an entire minute to see if you can make a relative path on your website.</p><p><em>A note of caution though</em>, we should be careful to not veer into jamming as many assertions as we can into a test case. You’ll find that you quickly run out of properties that make sense to test and that maintaining all those assertions eats up a bunch of human time and makes your test difficult to update. Worse yet, developing unreliable tests is the best way to ensure that your devs begin to ignore the ever-increasing pile-up of failed assertions!</p><p><strong>More Resources:</strong></p><p>Martin Fowler’s wonderful <a href="https://martinfowler.com/articles/practical-test-pyramid.html">Practical Test Pyramid</a> article. Fowler exhaustively lays out much of the collective wisdom of the Quality world.</p><p>Dr. Michael E. Dunn talks about quality measurement by was of psychology research in this <a href="https://webcourses.ucf.edu/courses/1221818/pages/chapter-5-measurement-concepts">course</a>.</p><p>LAMBDATEST’s <a href="https://www.lambdatest.com/learning-hub/">Learning Hub</a></p><p><a href="https://www.cypress.io/">Cypress.io</a> The best darn E2E testing suite out there</p><p><a href="https://www.freecodecamp.org/learn/quality-assurance/">FreeCodeCamp.Org</a> has an Quality Assurance certificate + tutorial. They set up the project and libraries so you can concentrate on learning basics like assertions and CLI commands</p><p>Finally, take a look at the sample repo and my solutions <a href="https://github.com/devtayls/web-tester">here</a></p><p><strong>#automation</strong> <strong>#qa #testing #quality</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b978a8a1feda" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>