<?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 Abdelkader HASSINE on Medium]]></title>
        <description><![CDATA[Stories by Abdelkader HASSINE on Medium]]></description>
        <link>https://medium.com/@abdel-k?source=rss-69deb3c2717a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XILJp1-J12mcqFDCHPMKQA.jpeg</url>
            <title>Stories by Abdelkader HASSINE on Medium</title>
            <link>https://medium.com/@abdel-k?source=rss-69deb3c2717a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 05:00:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abdel-k/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[I Integrated AI in a Listener to Heal Locators in The Real Time]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://generativeai.pub/i-connected-chatgpt-to-my-test-automation-cdc5e00f02fd?source=rss-69deb3c2717a------2"><img src="https://cdn-images-1.medium.com/max/2096/1*sBeBJWJIDfBw8yumEahPjQ.png" width="2096"></a></p><p class="medium-feed-snippet">A Self-Healing Robot Framework Listener That Prevents Tests From Failing Due Locator Update</p><p class="medium-feed-link"><a href="https://generativeai.pub/i-connected-chatgpt-to-my-test-automation-cdc5e00f02fd?source=rss-69deb3c2717a------2">Continue reading on Generative AI »</a></p></div>]]></description>
            <link>https://generativeai.pub/i-connected-chatgpt-to-my-test-automation-cdc5e00f02fd?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdc5e00f02fd</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[test-automation]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Tue, 16 Sep 2025 07:20:21 GMT</pubDate>
            <atom:updated>2025-09-30T10:33:07.464Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[I Replaced Some Test Automation Assertions With GPT-4o API — It Worked Better Than I Expected]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science-collective/i-replaced-some-test-automation-assertions-with-gpt-4o-api-it-worked-better-than-i-expected-094914ddfb72?source=rss-69deb3c2717a------2"><img src="https://cdn-images-1.medium.com/max/1570/1*W4ObuvV7fsJqIO74MsLBwA.png" width="1570"></a></p><p class="medium-feed-snippet">I integrated GPT-4o into my test automation to validate UI, replace assertions, and reduce flaky tests.. the output is great</p><p class="medium-feed-link"><a href="https://medium.com/data-science-collective/i-replaced-some-test-automation-assertions-with-gpt-4o-api-it-worked-better-than-i-expected-094914ddfb72?source=rss-69deb3c2717a------2">Continue reading on Data Science Collective »</a></p></div>]]></description>
            <link>https://medium.com/data-science-collective/i-replaced-some-test-automation-assertions-with-gpt-4o-api-it-worked-better-than-i-expected-094914ddfb72?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/094914ddfb72</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Thu, 17 Jul 2025 01:49:11 GMT</pubDate>
            <atom:updated>2025-07-18T12:46:22.027Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[I Automated Bug Reports with GPT-4 — Here’s What Happened]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://generativeai.pub/i-automated-bug-reports-with-gpt-4-heres-what-happened-369aeb40dcf7?source=rss-69deb3c2717a------2"><img src="https://cdn-images-1.medium.com/max/1338/1*wdoozLrqFQ2Y852AZlrcMg.png" width="1338"></a></p><p class="medium-feed-snippet">How I used GPT-4 and Robot Framework to automatically generate detailed bug reports from test failures&#x200A;&#x2014;&#x200A;complete with screenshots, logs&#x2026;</p><p class="medium-feed-link"><a href="https://generativeai.pub/i-automated-bug-reports-with-gpt-4-heres-what-happened-369aeb40dcf7?source=rss-69deb3c2717a------2">Continue reading on Generative AI »</a></p></div>]]></description>
            <link>https://generativeai.pub/i-automated-bug-reports-with-gpt-4-heres-what-happened-369aeb40dcf7?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/369aeb40dcf7</guid>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-testing]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Sun, 08 Jun 2025 09:23:32 GMT</pubDate>
            <atom:updated>2025-06-13T08:40:25.468Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why Computer Vision Falls Short in Test Automation : What AI Must Fix]]></title>
            <link>https://levelup.gitconnected.com/why-computer-vision-falls-short-in-test-automation-what-ai-must-fix-6728218d45da?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6728218d45da</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[articifical-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Fri, 17 Jan 2025 19:02:24 GMT</pubDate>
            <atom:updated>2025-02-09T17:58:37.560Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Essential Prelude to AI-Driven Test Automation: Why Traditional Computer Vision Falls Short</h3><h4>The Evolution of AI in Test Automation: From Locators to Generative AI (Part 4)</h4><figure><img alt="A robotic hand powering AI brain like network symbolizing the evolution of artificial intelligence in test automation" src="https://cdn-images-1.medium.com/max/812/0*bN-HNUGnD4SQ_zDE.jpeg" /><figcaption>The Evolution of AI in Test Automation: From Locators to Generative AI (Part 4) — © Tung Nguyen from Pixabay</figcaption></figure><p>We’ve long pursued the promise of ultimate test stability, cycling through new tools and paradigms in test automation. Yet, despite all these evolutions, we keep encountering flaky locators and shifting failures , as if the core issue never left.</p><p>For a time, many blamed locators entirely, which led to the rise of computer vision as a more “human-like” approach to mapping screens on mobile devices. Initially, it seemed almost magical , so straightforward and efficient!</p><p>Instead of relying on brittle XPath/CSS selectors, computer vision would navigate and validate the UI directly. However, as I’ve discovered, real-world scalability poses its own challenges. Every phone or use case can render outputs differently, forcing us to tackle new problems.</p><p>From my experience working on both web and mobile app test automation, these scalability issues stand out even more on mobile devices , though they’re present in web automation, too. <br>Differences in rendering engines, device specifications, and environments all complicate the effort to build robust, reliable test solutions at scale.</p><p>Do we truly have the right approach and tools for computer vision in large-scale, dynamic scenarios and various devices under test (DUT)?</p><p>That question drove me to explore new techniques and deeper knowledge, and I’m sharing those insights with you here.</p><p>This fourth installment follows from my earlier articles</p><p>And in this article (<strong>Part 4)</strong> we’ll examine the limits of computer vision in large-scale test automation hrough mobile app automation cases, and explain why more advanced AI, including deep learning and generative AI, are needed to address those persistent challenges…</p><h3>1. Quick Recap: Where Computer Vision Shined</h3><p>Initially, computer vision felt like magic for a few tasks:</p><ul><li><strong>Template Matching</strong>: Identify a specific icon or image snippet on the screen, then tap or verify it.</li><li><strong>Screenshot Comparison</strong>: Check if the new version of the app visually matches the reference one (potentially detect regressions).</li><li><strong>OCR (</strong>Optical Character Recognition): Confirm on-screen text when locators are brittle or missing.</li></ul><p>In a controlled environment , a few stable devices, minimal screen variations, these solutions worked great.</p><h3>2. Understanding the Need for Scaling Test Automation Across More Devices</h3><h4>2.1. What Is an Internal Device Lab?</h4><p>An internal device lab is basically a collection of physical devices your organization maintains in house.</p><p>It’s where engineers can run tests on shared real phones and tablets, often arranged on shelves or in racks.</p><p>These devices usually have known screen sizes, resolutions, and OS versions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/0*B6KuuJrH3JzfmTKt.jpg" /><figcaption><em>An example: Helsinki’s Open Device Lab was established to help the local web developer community test their work on the ever growing range of mobile devices (no copyright on this image)</em></figcaption></figure><p>In my case, we have a small but controlled environment:</p><ul><li>2 or 3 Android phones (always the same models).</li><li>1 iPhone.</li><li>A few older devices lying around for regression testing.</li></ul><p>This setup was great for consistency.<br>It was small enough that we could quickly spot issues and fix them.</p><p>But this bubble also prevents from seeing the challenge: does this can <strong>scale when we will try to run the test on other device types ?</strong></p><h4>2.2. Enter BrowserStack: The Cloud Testing Reality Check</h4><p>As soon as any organization starts to have larger audience, it needs to tests on more mobile devices and OS versions, the realize that internal lab is not enough ( furthermore, internal labs comes with high cost of maintains and integration )</p><p>We, for example, had only a limited variety of Android and iOS versions, and users “out in the wild” had phones we’d never even seen before.</p><p>That’s where <strong>BrowserStack</strong> came in.<br>BrowserStack offers a cloud-based testing service with a huge range of real devices both Android and iOS.</p><p>You can run automated tests on almost any phone model with different OS versions, different screen sizes, and different configurations.</p><blockquote>Agile needs DevOps culture,<br>DevOps culture needs Continuous Testing,<br>Continuous Testing needs Running on the Cloud.</blockquote><p>With this license, we can test on the latest Samsung Galaxy and the newest iPhone, plus older versions that are still in use.</p><p>But what happens if you try to run computer vision–based tests, such as template matching, on <strong>all these different devices in the cloud</strong>?</p><p>That question quickly revealed the <strong>limits</strong> of our computer-vision-based automation strategy.</p><h3>3. Understanding The Limits of Traditional Computer Vision On Test Automation</h3><h4>3.1 Template Matching: A Pixel-by-Pixel Trap</h4><p>A common approach involves template-based image recognition to locate and interact with app elements:</p><ol><li>Capture a small screenshot (a “template”) for example, a user profile icon or login button.</li><li>During test execution, scan the live screen for a perfect or near-perfect pixel match.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S8pnNSZEaUgUVB2l30y_Iw.png" /><figcaption>Screenshot to illustrate template matching in Test Automation</figcaption></figure><p>In a controlled environment where devices share the same resolution and screen size, templates (user icon for exemple) often match reliably.</p><p>Yet, when tests run on unfamiliar devices such as a Google Pixel 7 or an iPhone 13 the same icon may display subtle differences:</p><ul><li>Varying DPI (Density Per Inch)</li><li>Altered color profiles</li><li>Slightly different sizes</li></ul><p>The result is frequently: <strong>“Template image not found.”</strong></p><h4>3.2. Why Templates Aren’t Universal On Mobile APPs</h4><p>When using template-based image recognition, it often becomes necessary to maintain separate templates for Android and iOS.</p><p>At first glance, this seems logical, given that each platform follows its own design philosophy.</p><blockquote>Yet the question remains: <br><em>why manage multiple templates for what is essentially the same icon?</em></blockquote><p><strong>The short answer is : rendering isn’t the same between platforms:</strong></p><ul><li><strong>Material Design (Android):</strong> sharp edges, bold colors, and a clearly structured hierarchy. Animations, shadows, and padding often differ based on hardware capabilities.</li><li><strong>Human Interface Guidelines (iOS):</strong> rounded edges, softer shadows, and an emphasis on translucency and depth.</li></ul><p>So, even if two UIs look similar, the underlying rendering engines handle fonts, edges, and color gradients differently.</p><p>Here’s a visual comparison between iOS and Android on Medium Mobile App to illustrate these variations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*woFDj4v2w-BbK1qlXStKsQ.png" /><figcaption>Platform-Specific Differences: iPhone vs. Google Pixel — Medium App Case — Screenshot Done by the author</figcaption></figure><h4>3.3. Why Templates Fail on Different Devices Even From Same Platform</h4><p>Platform-based visual differences (Android Vs iOS) seemed logic right?</p><p>That’s not all.</p><p>There are more reasons why template matching can fail, even on the same platform, such as between Samsung and Google Pixel or Xiaomi devices:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iYNYLDZoxlS_AvDau21b-A.png" /><figcaption>Screenshot from author’s laptop showing medium rendering on different mobile phones from the same OS — Different Android Phones means Different Rendering</figcaption></figure><ol><li><strong>Screen Sizes &amp; DPI (Dots Per Inch)</strong></li></ol><ul><li>The same icon might be 50×20 pixels on one device but 60×24 on another.</li><li>A higher DPI phone compresses the same UI into fewer or more pixels.</li><li>Pixel-perfect matching fails because the reference template no longer lines up.</li></ul><p><strong>2. Color Calibration</strong></p><ul><li>Samsung is known for vibrant, oversaturated colors.</li><li>Google Pixel tends to lean toward more natural, muted tones.</li><li>Apple devices often have warmer color profiles for user comfort.</li><li>Tiny color differences throw off exact pixel matches.</li></ul><p>In an <strong>internal device lab</strong>, these variances are minimized because you can keep everything consistent — usually same devices that have same OS versions and same screen size etc..</p><p>However, for more effective testing, a wide range of devices — often managed via a cloud environment — is essential. <br>With countless device types, the same templates cannot be used across all devices.</p><h4>3.4. Image Comparison: A Similar Principle at Play</h4><p>The same principle applies to <strong>image comparison</strong>.</p><p>Just as template matching struggles with variations in DPI, color calibration, and rendering differences across devices, image comparison tools face same challenges ( might be worse ).</p><p>While it is supposed to detect visual discrepancies or verify UI consistency, its effectiveness depends heavily on maintaining a controlled environment.</p><p>Minor variations in device screens, operating system can lead to false negative (claiming bugs that doesn’t exist) or missed mismatches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*RYHRJu9GG-BvfHEOXGqpRw.png" /><figcaption>A visual example of <strong>overlapping</strong> and misaligned UI elements while no bug is — screenshot done by the author</figcaption></figure><p>That’s not all, the status bar changes dynamically based on notifications, battery indicators, time, network coverage etc…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C1HEPc54TyMLAEdzaKJ_Tg.png" /><figcaption>Screenshot comparison on the same device: highlighting fragility in test automation due to dynamic elements like time and notification icons causing Flaky Tests — Image from author’s laptop</figcaption></figure><p>Quick Tips :</p><ul><li><strong>A Reference Screenshot for Each Mobile:</strong> this helps accurately capture its unique display characteristics</li><li><strong>Reduce Confidence Level: </strong>lower the threshold for image matching in way that allow minor variations ( around 0.9 )</li><li><strong>Apply a Mask: </strong>apply a color overlay on the status bar ( time and notification areas)</li><li><strong>Stabilize Dynamic Elements: </strong>configure the device under test (DUT) to minimize dynamic content : fixing the system time, disabling notifications etc..</li><li><strong>Selective Screenshot Areas : </strong>focus comparisons on critical, static sections by cropping both the reference and the runtime screenshot</li></ul><h3>4. Considering Existing Computer Vision Solutions</h3><h4>4.1. The Appium Image Plugin</h4><p>The challenges outlined so far often lead teams to explore ready-made tools rather than building their own solutions from scratch.</p><p>Several open source and commercial options promise to address common pitfalls..</p><p>One of the most well known is the <strong>Appium Image Plugin</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RbHAGdDSjvRtWqe5QufRHQ.png" /><figcaption>A screenshot from the Appium images plugin GitHub repository showing the core library files</figcaption></figure><p><strong>What It Provides:</strong></p><ul><li>Screenshot comparison</li><li>Finding Image Template (UI element in the current mobile app screen)</li></ul><p><strong>How It Works:</strong></p><ul><li><strong>Rescaling</strong>: It rescales templates to handle aspect ratio differences (if settings likefixImageTemplateScale or defaultImageTemplateScaleset to True)</li><li><strong>Matching Process</strong>: It uses OpenCV algorithm (specified inMATCH_TEMPLATE_MODE argument) to match images based on what method was called (findTemplateImage or ScreenshotCompare)</li><li><strong>Threshold</strong>: a certain imageMatchThreshold defines how closely the template must match before calling it a success</li><li><strong>Bounding Rectangles</strong>: it can filter matches by location (containerRect)</li><li><strong>Output</strong>: return element coordinate (if applicable) or screenshot difference (with Fail or Pass status based on an internal mechanism)</li></ul><figure><img alt="Table detailing three modes of Appium Image Plugin: matchTemplate (Template Matching), getSimilarity (Pixel Similarity), and matchFeatures (Feature Matching), along with their algorithms and use cases." src="https://cdn-images-1.medium.com/max/1024/1*mh5OQ-xUng0A6EwBy7PhOQ.png" /><figcaption>Overview of Appium Image Plugin Modes for Template Matching</figcaption></figure><p>Despite its convenience and integration with Appium, the plugin remains somewhat basic, leaving many advanced issues unresolved.</p><p>In many cases, custom in-house, app-specific-focused algorithm offer better performance,,,</p><p>yet neither solution provides a complete answer to scaling challenges.</p><h4>4.2. Other Noteworthy Tools</h4><ul><li><a href="http://sikulix.com/"><strong>SikuliX</strong></a><strong>:</strong> It provides image recognition capabilities powered by OpenCV, but doesn’t support mobile app.</li><li><a href="https://applitools.com/"><strong>Applitools</strong></a><strong>:</strong> This tool offered visual AI-powered testing, focusing on visual correctness. While promising, its pricing and integration complexity were deterrents for many project’s scope.</li></ul><h3>Final Thoughts</h3><p>Computer vision techniques — template matching, screenshot comparison, can be powerful for <em>simple, controlled scenarios.</em> They’re straightforward to set up and effective in web app automation and mobile app when testing on the same device under test (DUT).</p><p>Yet, the moment you attempt to <strong>scale your test automation across a broader range of devices and OS versions (mobile app case especially)</strong>, these methods will likely show their cracks.</p><p>They demand constant updates to reference images, fragile workarounds for dynamic UI elements, and unending troubleshooting for color and DPI mismatches.</p><blockquote><strong><em>Where Do We Go From Here?</em></strong><em><br></em>In the next installment, we’ll delve into advanced AI-driven methods, focusing on how neural networks, such as MobileNet-based models, can streamline element recognition. By teaching a model to identify our icons and buttons, we can reduce the need to create and manage numerous template images for different devices or screens.</blockquote><p>Stay tuned!</p><h3>More Resources</h3><ul><li><strong>Test.ai </strong>Appium Plugin by David Röthlisberger — <a href="https://david.rothlis.net/testdotai-appium-plugin">https://david.rothlis.net/testdotai-appium-plugin</a></li><li><em>Scalability Challenges in AI-Powered Test Automation — </em>Journal of Software Testing</li><li><em>Transfer Learning for Adaptive Computer Vision Models — </em>International Conference on Machine Learning</li><li><em>Real-World Limitations of Computer Vision in Mobile App Testing — </em>Proceedings of the International Conference on Mobile Computing</li><li><em>Federated Learning for Scalable and Privacy-Preserving Test Automation — </em>Journal of Artificial Intelligence Research</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6728218d45da" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/why-computer-vision-falls-short-in-test-automation-what-ai-must-fix-6728218d45da">Why Computer Vision Falls Short in Test Automation : What AI Must Fix</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Icon Detection for Test Automation: A Deep Learning Playbook]]></title>
            <link>https://levelup.gitconnected.com/icon-detection-for-test-automation-a-deep-learning-playbook-4b1db3e9184c?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b1db3e9184c</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Fri, 17 Jan 2025 19:02:18 GMT</pubDate>
            <atom:updated>2025-01-17T23:33:11.418Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Evolution of AI in Test Automation: From Locators to Generative AI (Part 5)</h4><figure><img alt="A robotic hand powering AI brain like network symbolizing the evolution of artificial intelligence in test automation" src="https://cdn-images-1.medium.com/max/812/0*bN-HNUGnD4SQ_zDE.jpeg" /><figcaption>The Evolution of AI in Test Automation: From Locators to Generative AI (Part 4) — © Tung Nguyen from Pixabay</figcaption></figure><p>When you’re juggling a long list of devices and OS variations, pixel-perfect computer vision approaches (like template matching or screenshot comparison) can feel like a house of cards: one tiny shift in color or resolution, and the entire thing collapses.</p><p>You will not be happy with something like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/170/1*U3gbAmlKh8jo1o-bNfC5GQ.png" /><figcaption>Screenshot from the author laptop</figcaption></figure><p>Deep learning offers a promising alternative. Rather than matching individual pixels which needs image for each device nearly, neural networks learn the deeper, essential patterns of an icon or UI element, making them resilient to subtle variations in size, color, or rendering.</p><p>But as with any technology, it’s no silver bullet. Building or adopting ML-based icon recognition introduces challenges around data collection, training overhead, and integration obstacles.</p><h3>1. Why We Need “Smarter” Vision</h3><h4>Common Pitfalls of Traditional CV</h4><ul><li><strong>Template Matching Overload</strong>: Relying on template images quickly creates an explosion of templates (per device, OS version, or even screen). One minor size difference can break the match.</li><li><strong>Screenshot Comparison Whack-a-Mole</strong>: Simple pixel-level diffing is easily thrown off by Night Mode, color profiles, or any small UI tweaks.</li></ul><h4>How Deep Learning Helps</h4><p>From my first attempts at OpenCV-based solutions (see previous articles), I realized I’d likely need a model that “understands” app icons. Deep learning models learn the <em>concept</em> of an icon or UI element so they can robustly handle differences in color calibration, resolution, or rendering.</p><p>The trade-off is complexity — collecting data, training, and validating the model. You must decide if that overhead is justified for your team, use case, or management constraints.</p><blockquote>Is the extra complexity worth it?<em><br></em>For apps with frequent design changes or a large device matrix, yes. For simpler apps with minimal visual variation, maybe not.</blockquote><h3>2. Exploring Existing Solutions (Appium Classifier Plugin)</h3><h3>The Appium Classifier Plugin: An Overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*avPLDfUxnHkcSyIAEG9Rcw.png" /><figcaption>Github Screenshot Of The Plugin Repository</figcaption></figure><p>The <a href="https://github.com/appium/appium-classifier-plugin">Appium Classifier Plugin</a> introduces AI-driven capabilities into Appium. It is notable early solution from TestDoAi to integrate AI in Mobile App testing.</p><p>The plugin relied basically on MobileNet-based classifier. Instead of relying on static locators or brittle image-matching, it uses a pre-trained neural network to classify UI components (cart, profile, search, etc.).</p><p><strong>Usage details:</strong></p><p>The -custom locator is introduced. You configure it by setting customFindModules in your Appium capabilities:</p><pre>&quot;customFindModules&quot;: {   &quot;ai&quot;: &quot;test-ai-classifier&quot; }, <br>&quot;shouldUseCompactResponses&quot;: false</pre><p>Then you can do:</p><pre>driver.findElement(&quot;-custom&quot;, &quot;ai:cart&quot;);</pre><p><strong>How it works</strong>:</p><ol><li>Appium fetches the screenshot + UI hierarchy.</li><li>Each element (cropped) is resized to 224×224.</li><li>The classifier returns confidence scores for known categories (e.g., “Cart: 0.78”).</li><li>If a threshold is met, you can interact with that element.</li></ol><p><strong>Pros</strong>:</p><ol><li>More resilient than simple template matching.</li><li>Semantic approach: “cart” is recognized even if it’s slightly different from the original.</li></ol><p><strong>Cons</strong>:</p><ol><li>Accuracy is not perfect: <br>In practice, reported accuracy hovers around 68–81% on certain datasets. Author of the plugin have claimed 98.9% accuracy in demo, but details on how they tested remain unclear.</li><li>Limited to the pre-trained set of common icons unless you retrain on your app icons (which involves data collection and preparing).</li><li><strong>Cloud Incompatibility</strong>:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*acOtXbfhWpqSY__B7-rlMg.png" /><figcaption>Screenshot from the author’s laptop</figcaption></figure><p>BrowserStack and some other test clouds don’t allow custom plugins, blocking large-scale usage.</p><h3>3. Building a Custom Model for Icon Recognition</h3><h4>3.1 Why Bother with a Custom ML Model?</h4><p>A custom icon-recognition model can:</p><ul><li>Identify unique or branded icons across multiple OS versions.</li><li>Scale without requiring one template per device.</li><li>Learn icons for both mobile and web applications, overcoming limitations such as the absence of plugins for web automation.</li><li>Evolve by periodic retraining as the app design changes.</li><li>Overcome challenges like cloud incompatibility, enabling usage even on platforms like BrowserStack.</li></ul><p>However, you’ll need:</p><ul><li><strong>Training Data</strong>: Labeled screenshots from real devices.</li><li><strong>ML Infrastructure</strong>: Pipelines for training and validation.</li><li><strong>Maintenance</strong>: Model retraining or fine-tuning after every major UI shift.</li></ul><h4>3.2 Gathering &amp; Labeling Data</h4><p>How do we get enough labeled data for each icon?<em><br></em>My tric is to use automated scripting to navigate your app and capture screenshots across a variety of devices and OSes.</p><ol><li><strong>Screenshot Libraries</strong>: For each device (or device category), gather screenshots containing your target icons.</li><li><strong>Annotation Tools</strong>: Mark bounding boxes around each icon. Tools like <a href="https://github.com/heartexlabs/labelImg">LabelImg</a> or VGG Image Annotator can help.</li><li><strong>Augmentation</strong>: Slight rotations, scaling, or color shifts can add variety. This doesn’t replace real-device data, but it helps generalization.</li></ol><h3>3.3 Model Architecture &amp; Frameworks</h3><p>Popular object detection frameworks:</p><ul><li><strong>YOLO (v3, v5, v8)</strong>: Fast, single-pass detectors. Newer versions (v5/v8) come with user-friendly training scripts and robust performance.</li><li><strong>SSD (Single Shot Detector)</strong>: Another single-pass approach, balancing speed and accuracy.</li><li><strong>MobileNet-based Detectors</strong>: Good for resource-constrained environments like mobile or edge devices.</li></ul><h4>Example YOLO Training Pipeline (in Python)</h4><p>Below is a simplified outline of how one might train a YOLO-based model (e.g., YOLOv5) for icon detection:</p><pre># 1. Clone YOLOv5 repo<br>git clone https://github.com/ultralytics/yolov5.git<br>cd yolov5<br># 2. Install dependencies<br>pip install -r requirements.txt<br># 3. Prepare data<br># Assume you have &quot;images&quot; and &quot;labels&quot; directories with train/val subfolders.<br># labels in YOLO format (class_id, x_center, y_center, width, height)<br># 4. Train<br>python train.py --img 640 --batch 16 --epochs 50 \<br>  --data data/your_custom_dataset.yaml \<br>  --weights yolov5s.pt \<br>  --name your_custom_icon_model</pre><p>Once training is complete, you’ll get a set of weights (best.pt). You can then run:</p><pre># 5. Validate model<br>python val.py --weights runs/train/your_custom_icon_model/weights/best.pt \<br>  --data data/your_custom_dataset.yaml</pre><h4>Integrating with Test Automation</h4><ol><li>Capture a screenshot with Appium or Selenium.</li><li>Load your YOLO model (using PyTorch, ONNX, etc.).</li><li>Pass the screenshot through the model to detect bounding boxes.</li><li>If confidence is above a threshold, you’ve found your icon. Perform your test step (click or verify).</li></ol><h3>3.4 Retraining &amp; Iteration</h3><p>How often do I need to retrain?<br>Whenever your UI undergoes major changes or you add new icons. Teams often schedule periodic retraining (once a quarter) or do it on-demand after a big redesign.</p><h3>5. Key Takeaways</h3><ol><li><strong>Start Small</strong>: If ML is new to your QA team, begin with a pilot project focusing on a few critical icons.</li><li><strong>Expect a Data Project</strong>: Labeling, cleaning, and maintaining datasets is often the biggest time sink.</li><li><strong>Plan for Iteration</strong>: UI designs change. Your model won’t stay accurate forever; plan regular updates.</li><li><strong>Embrace Hybrid Approaches</strong>: ML is not the cure-all. Many teams still use:</li></ol><ul><li>Traditional locators for stable elements.</li><li>Pixel-based CV for quick or minor checks.</li><li>Neural networks (YOLO, MobileNet) for notoriously flaky or dynamic icons.</li></ul><p>By mixing and matching approaches, you can get the best of all worlds, allowing you to scale visual test automation across a dizzying array of devices without the fragility of pixel-perfect matches.</p><h3>Closing Thoughts</h3><p>Deep learning can give you a major leg up when trying to scale the use of the power of sight in test automation across varied devices. However, it comes with real complexity — data , labeling, retraining, etc .. If you decide to go down this path, start small, iterate often, and remain pragmatic about which parts of your test suite genuinely benefit from an ML solution.</p><p><em>Thanks for reading this installment of “The Evolution of AI in Test Automation: From Locators to Generative AI.” Stay tuned for the next part, where we’ll explore how generative AI might reshape test automation.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b1db3e9184c" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/icon-detection-for-test-automation-a-deep-learning-playbook-4b1db3e9184c">Icon Detection for Test Automation: A Deep Learning Playbook</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Invisible Bug That Broke My Automation: How OCR Changed The Game]]></title>
            <link>https://medium.com/data-science/the-invisible-bug-that-broke-my-automation-how-ocr-changed-the-game-c35e1c79a591?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c35e1c79a591</guid>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[ocr]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Tue, 17 Dec 2024 17:49:07 GMT</pubDate>
            <atom:updated>2025-02-09T18:00:20.010Z</atom:updated>
            <content:encoded><![CDATA[<h4>The evolution of AI in test automation: from locators to generative AI (Part 3)</h4><figure><img alt="A robotic hand powering AI brain like network symbolizing the evolution of artificial intelligence in test automation" src="https://cdn-images-1.medium.com/max/812/0*542LRNXegDMfYfAy.jpeg" /><figcaption>The Evolution of AI in Test Automation: From Locators to Generative AI ( Part 3 ) — © Tung Nguyen de Pixabay</figcaption></figure><p>It’s 10:00 AM on a quiet weekday and I’m staring at yet another failed test report. This wasn’t just any test case , it was one I had reviewed and debugged last week after some UI changes. And now it had mysteriously failed. Again…</p><p>The error? Visibily there is no error.</p><p>What should have been: this text should be displayed on the welcome screen:<br>“Bienvenue à bord de l’application my-app-name!”</p><p>I made a look on the app screenshot and the text was correctly displayed.. there was no issue:</p><figure><img alt="mobile screenshot of the application under test showing the text expected to appear on that screen — mostly blurred , for confidentiality issue" src="https://cdn-images-1.medium.com/max/540/1*TCPpwoaJafFfmRWtoQwuFg.png" /><figcaption>Screenshot from the author mobile showing that the expected text appeared correctly — blurred for confidentiality issue</figcaption></figure><p>I decided to make a look on the Appium XML :</p><pre>&lt;XCUIElementTypeStaticText type=&quot;XCUIElementTypeStaticText&quot; <br>value=&quot;Bienvenue à bord de l&#39;application&amp;#10;my-app-name !&quot; <br>enabled=&quot;true&quot; visible=&quot;false&quot; accessible=&quot;true&quot; x=&quot;879&quot; y=&quot;522&quot; <br>width=&quot;312&quot; height=&quot;50&quot; index=&quot;7&quot;/&gt;</pre><p>That little “ &amp;#10; “ — a sneaky newline character — had crept into the XML output of my app. It didn’t show up in the Appium Inspector before, and my developers swore nothing had changed in the app’s codebase. Yet here I was trying to figure out why the same test worked flawlessly in one version of the app but failed miserably in another.</p><p>I could not help but think: “How much longer are we going to fight with such brittle text representation? “</p><h3>The Apostrophe That Broke Everything</h3><p>This wasn’t just about a single test case; while reading the report I found more failed tests, I took a look at the screenshot, and the text is the same as it is expected. I check the Appium XML and I found this:</p><pre># Exemple of the expected text : <br>That&#39;s not a big deal</pre><p>The appium XML:</p><pre>&lt;XCUIElementTypeStaticText type=&quot;XCUIElementTypeStaticText&quot; <br>value=&quot;That&#39;s not a big deal&quot; <br>enabled=&quot;true&quot; visible=&quot;false&quot; accessible=&quot;true&quot; x=&quot;879&quot; y=&quot;522&quot; <br>width=&quot;312&quot; height=&quot;50&quot; index=&quot;7&quot;/&gt;</pre><p>Did you spot the difference? I bet not.</p><p>It is not the same apostrophe: ‘ is different than ’</p><ul><li><strong>&#39; (Apostrophe or single straight quote)</strong>: this is the standard ASCII single quote (code 39) and it is known as a <em>straight quote, </em>commonly used in programming and text files.</li><li><strong>’ (Right single quotation mark)</strong>: it is a typographic quotation mark and it is part of the extended Unicode character set (code U+2019). It is often used in proper typesetting (referred to as a <em>curly quote</em> or<em> smart quote</em>), commonly used in natural language text to indicate possession (e.g. John’s book).</li></ul><h3>Raising the Issue on GitHub</h3><p>I launched the same tests on previous version of the app where all tests were Passed.</p><p>Guess what?</p><p>The tests passed. Should be something changed in the App. But this doesn’t seem to be fair, as Appium is supposed to handle text encoding problems. I raised the issue on GitHub and highlighted this point.</p><figure><img alt="screenshot show the description of the issue that have been raised on github about the inconsistent text representation" src="https://cdn-images-1.medium.com/max/1024/1*60U1JlJgtULwTswbD0OJ1w.png" /><figcaption>Screenshot from the author laptop</figcaption></figure><h3>Looking for a Better Solution</h3><p>For me, this was a symptom of a bigger problem.</p><p>I realized that we need something more robust, or maybe hit the problem with a different approach… directly thought about how to make automation that doesn’t rely on XML trees and locators... Nice! But computer vision techniques and pixel to pixel will not fit many needs of mine.</p><p>This thought led me to explore OCR libraries. I have used some of it before but it was a different context. I know that it is not that robust for all languages, text styles etc... but I wondered: could these OCR libraries help bridge the gap between what the app displays and what the test sees?</p><p>I went through different approaches, libraries, and parameters to explore and test what they can bring to the game, and what I discovered changed how I approach test automation today.</p><p>Let me share some of those insights, and how you can apply them to your own projects.</p><blockquote>I have written about the locator issues on the first part (pinned in my profile), second article is about computer vision techniques, hit the follow button to keep up with my articles, I will be talking about autopilot testing and generative AI doing test assertions (currently working on a research paper on a close subject; feel free to connect on X if you have similar interest.)</blockquote><h3>2. Starting by the basics</h3><p>OCR works by analyzing an image, identifying text patterns, and converting those patterns into machine-readable characters.</p><p>Here’s the magic broken down (generally speaking):</p><ol><li><strong>Image processing</strong>: OCR tools preprocess the image to enhance text clarity by converting it to grayscale, removing noise, or sharpening edges.</li><li><strong>Text detection</strong>: The tool identifies regions within the image that likely contain text.</li><li><strong>Character recognition</strong>: in this step OCR matches the shapes of individual characters against its built-in or trained datasets to determine what each character is.</li><li><strong>Output generation</strong>: the recognized characters are output as machine readable formats (plain text, JSON, CSV...).</li></ol><p>There’s a wealth of OCR tools out there; here is a quick review:</p><ul><li><strong>Tesseract OCR</strong>: An open-source powerhouse that’s been around for years and supports over 100 languages... lightweight, customizable, and great for text-heavy applications.</li><li><strong>OpenCV’s OCR Modules</strong>: primarily known for image processing, but it integrates OCR capabilities.</li><li><strong>Google Vision API</strong>: If you’re looking for top-notch accuracy with minimal setup, this cloud-based OCR tool leverages AI to handle everything from noisy images to multi-language text.</li></ul><h3>Building My OCR Methods</h3><p>It all started with a simple goal: identify a specific text phrase in a screenshot, locate it, and highlight it. At first glance, it seemed like a straightforward task. Just run OCR on the image, find the text, and draw a box around it, right?</p><p>Not quite.</p><p>Let me walk you through how I built a <strong>OCRAutomator</strong> class using OCR, why it’s not as simple as it sounds, and how we solve the challenges step by step.</p><h4>Step 1: Extracting Text from an Image</h4><p>The first step was to extract text from the screenshot using OCR. For this, I used <strong>Tesseract</strong>. It can break down an image into individual characters and return their locations.</p><p>Here’s the code that does the heavy lifting:</p><pre>def perform_ocr(self):<br>  self.ocr_data = pytesseract.image_to_data(self.image, output_type=Output.DICT)<br>  return [text.strip() for text in self.ocr_data[&#39;text&#39;] if text.strip()]</pre><p>With this function, I can now feed the screenshot taken while tests run into the OCR engine and retrieve the text along with its bounding boxes.</p><figure><img alt="screenshot from the author showing boundboxing text that was detected by ocr" src="https://cdn-images-1.medium.com/max/466/1*XxwCDHW5ZZmq6AMgZgBTSw.png" /><figcaption>Here is the screenshot after bound boxing the text detected by OCR</figcaption></figure><p>But there was an immediate problem: the text was fragmented, and a single phrase like “Hello, world!” was often split into separate words or even individual characters.</p><h4>Step 2: Grouping Words into Phrases</h4><p>To make sense of the OCR output, I needed to group words into coherent phrases… Words on the same line should be considered together but only if they were close enough to belong to the same phrase.</p><p>For this, I wrote a function that checks if words are on the same line and within a reasonable horizontal distance:</p><pre>def group_words_into_phrases(self, max_distance=20):<br>    &quot;&quot;&quot;Group OCR words into phrases based on line number and proximity.&quot;&quot;&quot;<br>    phrases = []<br>    current_phrase = []<br>    for i in range(len(self.ocr_data[&#39;text&#39;])):<br>            if not self.ocr_data[&#39;text&#39;][i].strip():<br>                if current_phrase:<br>                    phrases.append(current_phrase)<br>                    current_phrase = []<br>                continue<br>            if not current_phrase:<br>                current_phrase.append(i)<br>            else:<br>                prev_idx = current_phrase[-1]<br>                # Check if the words are on the same line and close enough<br>                same_line = (self.ocr_data[&#39;line_num&#39;][i] == self.ocr_data[&#39;line_num&#39;][prev_idx])<br>                distance = self.ocr_data[&#39;left&#39;][i] - (self.ocr_data[&#39;left&#39;][prev_idx] + self.ocr_data[&#39;width&#39;][prev_idx])<br>                if same_line and distance &lt;= max_distance:<br>                    current_phrase.append(i)<br>                else:<br>                    phrases.append(current_phrase)<br>                    current_phrase = [i]<br>        if current_phrase:<br>            phrases.append(current_phrase)<br>        return phrases</pre><p>With this, I could finally reconstruct phrases like “Welcome to the app” from scattered words. This was critical for accurately finding the text correctly especially if I’am willing to click on it later.</p><h4>Step 3: Highlighting the Target Phrase</h4><p>Now came a fun part: visually highlighting the text in the image for logging purpose and facilitating later debugging. Once the words are grouped into phrases, I could calculate the bounding box of a phrase by taking the minimum and maximum coordinates of its words.</p><pre>def calculate_bounding_box(self, phrase_indices):<br>    &quot;&quot;&quot;Calculate the bounding box of a phrase.&quot;&quot;&quot;<br>    x0 = min(self.ocr_data[&#39;left&#39;][i] for i in phrase_indices)<br>    y0 = min(self.ocr_data[&#39;top&#39;][i] for i in phrase_indices)<br>    x1 = max(self.ocr_data[&#39;left&#39;][i] + self.ocr_data[&#39;width&#39;][i] for i in phrase_indices)<br>    y1 = max(self.ocr_data[&#39;top&#39;][i] + self.ocr_data[&#39;height&#39;][i] for i in phrase_indices)<br>    return x0, y0, x1, y1<br><br>def highlight_phrase(self, target_phrase, output_path, highlight_color=&quot;red&quot;):<br>    &quot;&quot;&quot;Highlight the target phrase in the image and save the result.&quot;&quot;&quot;<br>    phrases = self.group_words_into_phrases()<br>    draw = ImageDraw.Draw(self.image)<br>    for phrase_indices in phrases:<br>        phrase_text = &quot; &quot;.join(self.ocr_data[&#39;text&#39;][i].strip() for i in phrase_indices)<br>        if target_phrase.lower() in phrase_text.lower():<br>            x0, y0, x1, y1 = self.calculate_bounding_box(phrase_indices)<br>            draw.rectangle([x0, y0, x1, y1], outline=highlight_color, width=3)<br>    self.image.save(output_path)</pre><h4>Step 4: Testing the Solution</h4><p>Finally, it was time to test it.</p><p>And just like that, the target text was boxed and highlighted in red, making it easy to validate its presence visually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*e7nhmGxchOYlH5UbHBzT_g.png" /><figcaption>bound boxing the text detected by OCR after some processing</figcaption></figure><h3>Using OCR for Automation</h3><p>Finding and highlighting text in an image is good step but that doesn’t directly serve automation. Our purpose is to interact with the app by clicking text, verifying its presence, or waiting for it to appear etc…</p><p>Let’s add some Appium (for my case , since i’am working on mobile apps) so that makes the <strong>OCRAutomator </strong>class useful for test automation.</p><h4>Clicking on Text</h4><p>The first task was enabling interactions with text . Quite simple: we detect the text using OCR, get the coordinates , then calculate the center of those coordinates ( bounding box coordinates of the detected text). Using Appium <strong>TouchAction </strong>I can do a click:</p><pre>from appium.webdriver.common.touch_action import TouchAction<br>def click_on_text(self, target_phrase, driver):<br>    &quot;&quot;&quot;<br>    Find the target text and click it using Appium TouchAction.<br>    &quot;&quot;&quot;<br>    self.perform_ocr()<br>    phrases = self.group_words_into_phrases()<br>    for phrase_indices in phrases:<br>        phrase_text = &quot; &quot;.join(self.ocr_data[&#39;text&#39;][i].strip() for i in phrase_indices)<br>        if target_phrase.lower() in phrase_text.lower():<br>            center_x, center_y = self.calculate_text_center(phrase_indices)<br>            TouchAction(driver).tap(x=center_x, y=center_y).perform()<br>            print(f&quot;Clicked on &#39;{target_phrase}&#39; at ({center_x}, {center_y})&quot;)<br>            return<br>    raise ValueError(f&quot;Text &#39;{target_phrase}&#39; not found in the image.&quot;)</pre><p>With this, I could now click on any visible text, bypassing the need for brittle locators.</p><h4>Waiting for Text to Appear</h4><p>Sometimes, the text doesn’t load instantly. To verify the text display, I use a simple <strong>wait_until_text_displayed</strong> function using the existing OCR logic:</p><pre>import time<br>def wait_until_text_displayed(self, target_phrase, driver, timeout=10):<br>    &quot;&quot;&quot;<br>    Wait until the target text is visible within the given timeout.<br>    &quot;&quot;&quot;<br>    start_time = time.time()<br>    while time.time() - start_time &lt; timeout:<br>        self.perform_ocr()<br>        for text in self.ocr_data[&#39;text&#39;]:<br>            if target_phrase.lower() in text.lower():<br>                print(f&quot;Text &#39;{target_phrase}&#39; found!&quot;)<br>                return True<br>        time.sleep(1)<br>    raise TimeoutError(f&quot;Text &#39;{target_phrase}&#39; not displayed within {timeout} seconds.&quot;)</pre><p>this ensures that the test doesn’t proceed until the target text is confirmed visible on the screen.</p><h3>Final Thoughts</h3><p>What we have seen in this article is OCR using the Pytesseract library, which is lightweight and easy to implement. I highly encourage you to explore models-based OCR , EasyOCR library, etc. — it could open the door to more robust and scalable solutions for more complex cases.</p><p>Follow to read the next articles about generative AI in test automation. You can see my previous articles as well:</p><ul><li><a href="https://generativeai.pub/the-evolution-of-ai-in-test-automation-from-locators-to-generative-ai-part-2-b90fe433f585">The Evolution of AI in Test Automation: From Locators to Generative AI ( part 2 )</a></li><li><a href="https://generativeai.pub/the-evolution-of-ai-in-test-automation-from-locators-to-generative-ai-part-2-b90fe433f585">The Evolution of AI in Test Automation: From Locators to Generative AI ( part 2 )</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c35e1c79a591" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/the-invisible-bug-that-broke-my-automation-how-ocr-changed-the-game-c35e1c79a591">The Invisible Bug That Broke My Automation: How OCR Changed The Game</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Basic Self-Healing Automation Mechanism: Python example]]></title>
            <link>https://faun.pub/building-a-basic-self-healing-automation-mechanism-python-example-3b9f6c4637de?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b9f6c4637de</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Tue, 17 Dec 2024 07:56:26 GMT</pubDate>
            <atom:updated>2025-02-10T08:29:54.427Z</atom:updated>
            <content:encoded><![CDATA[<p>QA automation engineers face often frustration of their UI test automation scripts breaking every time there’s a minor change in the application’s user interface. If you have build some automation before ( web scrapping also), you surely have spent considerable time on this issue.</p><p>Imagine a scenario where your test scripts are resilient and have backup plan if a locating element step fails. This is where a self-healing test automation framework comes into play.</p><p>Let’s implement a self-healing mechanism ( Mini Framework) within test automation framework.</p><figure><img alt="image showing someone coding on a laptop besides another person who is focused working with robot" src="https://cdn-images-1.medium.com/max/612/0*i4BZx9_YonFFX-vo" /><figcaption>Banner image for Self-healing mechanism article — open access image</figcaption></figure><h3>Self-Healing Framework ?</h3><p>What I am talking about is to implement “Mechanism” that give more choices for locators and have a fallback locating strategy.</p><p>So instead of failing when a UI element changes (like an Id or xpath), the framework tries alternative methods to locate the element.</p><h3>Could You Explain How ?</h3><p>Well, the idea here is to use multiple locators for each UI element:</p><ul><li>Primary locator</li><li>Fallback back locator</li><li>Visual locator</li></ul><p><strong>Here’s how you can set it up:</strong></p><ol><li><strong>Primary Locator:</strong> Use the most reliable and specific locator such as an element ID.</li><li><strong>Fallback Locator:</strong> Define a secondary locator like a CSS selector or an xpath where you point on multiple attributes.</li><li><strong>Visual Locator:</strong> as an additional layer, use image based recognition to identify elements by their appearance.</li></ol><p><strong>Example in Python with Appium:</strong></p><pre>from appium.webdriver.common.appiumby import AppiumBy<br>class LoginPage:<br>    # Primary locator an ID for example here <br>    login_button_id = (AppiumBy.ID, &quot;com.example.app:id/login_button&quot;)<br>    <br>    # Fallback locator xpath locator ( could be a relative locator <br>    # based on multiple node )<br>    login_button_xpath = (AppiumBy.XPATH, &quot;//android.widget.Button[@text=&#39;Login&#39;]&quot;)<br>    <br>    # Visual locator ( image using opencv or another library )<br>    login_button_image = &quot;path_to_login_button_image.png&quot;</pre><h3>Implementing Locator Selection Logic</h3><p>Create a helper function that attempts to locate an element by trying each defined locator in sequence. If the primary locator fails, it falls back to the next.</p><p><strong>Example function:</strong></p><pre>def find_element_with_fallback(driver, *locators):<br>    for locator in locators:<br>        try:<br>            return driver.find_element(*locator)<br>        except Exception as e:<br>            # use logger class if you are working with robot framework<br>            print(f&quot;Locator {locator} failed with exception: {e}&quot;) <br>    raise Exception(&quot;Element not found with any locator&quot;)</pre><p><strong>Usage:</strong></p><pre>driver = initialize_driver()<br>login_button = find_element_with_fallback(<br>    driver,<br>    LoginPage.login_button_id,<br>    LoginPage.login_button_xpath,<br>    LoginPage.login_button_image<br>)</pre><h3>Integrating Image-Based Recognition</h3><p>For the visual locator, you can use Appium’s image recognition capabilities or integrate a home made using OpenCV.</p><p>Using Appium’s Image Locator:</p><pre>def find_element_by_image(driver, image_path):<br>    return driver.find_element(AppiumBy.IMAGE, image_path)</pre><p>Updating the Helper Function:</p><p>Modify find_element_with_fallback to handle the visual locator if provided.</p><pre>def find_element_with_fallback(driver, primary, fallback, visual=None):<br>    try:<br>        return driver.find_element(*primary)<br>    except:<br>        try:<br>            return driver.find_element(*fallback)<br>        except:<br>            if visual:<br>                return find_element_by_image(driver, visual)<br>            else:<br>                raise Exception(&quot;Element not found with any locator&quot;)</pre><h3>Implementing Logging and Self-Healing Tracking</h3><p>Use logging to keep track of which locators are used and when fallbacks occur. This information is invaluable for identifying flaky elements.</p><p><strong>Setting Up Logging:</strong></p><pre>import logging<br>logging.basicConfig(level=logging.INFO)<br>logger = logging.getLogger(__name__)</pre><p><strong>Enhanced Helper Function with Logging:</strong></p><pre>def find_element_with_fallback(driver, primary, fallback, visual=None):<br>    try:<br>        element = driver.find_element(*primary)<br>        logger.info(&quot;Element found using primary locator.&quot;)<br>        return element<br>    except:<br>        logger.warning(&quot;Primary locator failed.&quot;)<br>        try:<br>            element = driver.find_element(*fallback)<br>            logger.info(&quot;Element found using fallback locator.&quot;)<br>            return element<br>        except:<br>            logger.warning(&quot;Fallback locator failed.&quot;)<br>            if visual:<br>                try:<br>                    element = find_element_by_image(driver, visual)<br>                    logger.info(&quot;Element found using visual locator.&quot;)<br>                    return element<br>                except:<br>                    logger.error(&quot;Visual locator failed.&quot;)<br>            raise Exception(&quot;Element not found with any locator&quot;)</pre><h3>Continuous Improvement and Monitoring</h3><h4>Analyzing Logs</h4><p>Regularly review your logs to identify patterns where fallback locators are frequently used. This could indicate unstable elements in your application that need attention.</p><h4>Updating Locators</h4><p>When you notice that the primary locator often fails, consider updating it to a more reliable one based on the successful fallback locators.</p><h3>Advanced: Introducing AI for Locator Selection</h3><p>If you’re interested in taking your self-healing framework to the next level, you can incorporate AI to predict the best locator strategy based on historical data.</p><h4>Collecting Data</h4><ul><li><strong>Success/failure logs:</strong> Record which locators succeeded or failed over time, how many times fails, which fallback locator have saved the situation ..</li><li><strong>Element attributes:</strong> Collect attributes like element type, class names, text, etc..</li></ul><h4>Training a Model</h4><p>Use this data to train a simple machine learning model (e.g., decision tree, logistic regression) that predicts the most reliable locator strategy, or to construct a fallback locator in within the test runtime ..</p><h4>Implementing AI in Your Framework</h4><p>Modify your helper function to use the AI model’s prediction/ correction to be used when a locator fails.</p><h3>Key Takeaways :</h3><ol><li><strong>Test Execution:</strong> The script tries to locate an element using the primary locator.</li><li><strong>Fallback Mechanism:</strong> If it fails, it automatically tries the fallback locator, and then the visual locator if necessary.</li><li><strong>Logging:</strong> Each attempt is logged for analysis.</li><li><strong>Continuous Improvement:</strong> Use logs to update locators and improve the framework.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*bHNtTvenI2WquWBv.png" /></figure><h4>👋 If you find this helpful, please click the clap 👏 button below a few times to show your support for the author 👇</h4><h4>🚀<a href="http://from.faun.to/r/8zxxd">Join FAUN Developer Community &amp; Get Similar Stories in your Inbox Each Week</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b9f6c4637de" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/building-a-basic-self-healing-automation-mechanism-python-example-3b9f6c4637de">Building a Basic Self-Healing Automation Mechanism: Python example</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Evolution of AI in Test Automation: From Locators to Generative AI ( part 2 )]]></title>
            <link>https://generativeai.pub/the-evolution-of-ai-in-test-automation-from-locators-to-generative-ai-part-2-b90fe433f585?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b90fe433f585</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Thu, 05 Dec 2024 14:40:26 GMT</pubDate>
            <atom:updated>2025-04-18T09:42:48.608Z</atom:updated>
            <content:encoded><![CDATA[<h4>Computer Vision in Test Automation : Giving Automation the Power of Sight</h4><figure><img alt="A robotic hand powering a glowing AI brain-like network, symbolizing the evolution of artificial intelligence in test automation, with a futuristic cityscape background at night" src="https://cdn-images-1.medium.com/max/812/0*542LRNXegDMfYfAy.jpeg" /><figcaption>The Evolution of AI in Test Automation: From Locators to Generative AI (Part 2) — © Tung Nguyen from Pixabay</figcaption></figure><p>It’s 14:00, and the CI/CD pipeline has just failed… again. The culprit? Flaky locators, broken by the latest UI updates. As I stared at the error logs, I couldn’t help but think, ‘Isn’t there a better way?’</p><p>Scrolling through Reddit few days ago, I stumbled upon a post that hit home: ‘Is it normal for locating elements to be the hardest part of automation?’ It wasn’t just normal — it was universal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9dFy0oe0kTT2ldRuR53X8Q.png" /><figcaption><a href="https://www.reddit.com/r/QualityAssurance/comments/15mrrqv/is_it_normal_for_locating_elements_to_be_the/">link for the reddit post here</a></figcaption></figure><p><em>This post got me thinking: the evolution of test automation tools isn’t very slow comparing to dev ? I mean dev got rapid upgrades: Microservices, containerization, orchestration (Kubernetes), cloud, IaaS, CI tools, new programming languages, and frameworks exploded.. just look at how many framework and tool was invented and open-sourced by big tech companies and see how much libraries and updates it has got (React/React Native/ Jest by Meta. Angular, Flutterby Google,, Swift by Apple, typeScript by Microsoft).</em></p><p><em>Test automation in the other hand feels slower: We still heavily rely on tools like Selenium and Appium, with few disruptive innovations like Cypress or Playwright. (Cypress is a below standard)</em></p><p><em>I will be talking about this in next articles. But let’s explore what computer vision bring (actually brought) to test automation.</em></p><h3>1. The Locator Struggle: a Universal Pain Point</h3><p>Imagine building a house on shifting sand. That’s what it’s like relying on traditional locators like XPath, CSS selectors, or IDs. They work fine — until the UI changes. Suddenly, your tests are failing left and right because a developer changed an element’s ID or rearranged the DOM structure.</p><blockquote>Do you know that QA teams spend up to <strong>55%</strong> of their time maintaining test automation code including locators? That’s half of the effort going into just keeping your tests afloat. (source link : <a href="https://www.rainforestqa.com/blog/test-automation-maintenance">https://www.rainforestqa.com/blog/test-automation-maintenance</a>)</blockquote><p>Read first article (part 1) for better understanding of how test automation based on locators works : <a href="https://medium.com/generative-ai/the-evolution-of-ai-in-test-automation-from-locators-to-generative-ai-f15566117cbe">https://medium.com/generative-ai/the-evolution-of-ai-in-test-automation-from-locators-to-generative-ai-f15566117cbe</a></p><h3>2. What If Automation Have Eyes: Computer Vision in Test Automation</h3><h4>The Advent of Visual Recognition</h4><p>To tackle the limitations of locator-based automation, test automaton engineers turned to image recognition technologies like <a href="https://opencv.org/"><strong>OpenCV</strong></a>.</p><h4>Quick Intro of Computer Vision</h4><p><strong><em>What it is?</em></strong> : CV enables computers to interpret and understand visual information by converting images or videos into numerical pixel data (such as RGB values) and applying algorithms to detect patterns and features.</p><blockquote>Remember how you can spot your friend’s face in a crowd without thinking? Computer vision aims to replicate that ability for computers.</blockquote><p><strong><em>How It Solves the Locator Problem?</em></strong> : By using computer vision, <strong>we can identify UI elements based on how they look</strong> rather than where they are in the code.</p><p><strong><em>What’s the impact?</em></strong>: This means that even if the underlying code changes, as long as the element appears the same to the user, your tests will still find it.</p><p>Tools like <strong>Appium</strong> and <strong>Selenium</strong> have integrated this technology and approach (<em>We will tackle this part more in next articles</em>)</p><h3>3. Diving into The Technical Part</h3><h4>1. Template Matching with OpenCV</h4><p>So the biggest problem in test automation, that we need to interact with mobile/ web elements ( click, verify its display, count occurance, etc ..) but as we said early, we are not to locate them using the traditional approach (locators). <br>We will use Computer Vision by providing it with an icon image (called a template image). During test runtime, we will capture a screenshot of the desired screen (e.g., the shopping panel screen) and instruct it to search for that element within the full screenshot</p><p>A minimal code example :</p><pre>import cv2<br>import numpy as np<br>def find_template(screenshot, template, threshold=0.8, return_all=False):<br>    res = cv2.matchTemplate(screenshot, template, cv2.TM_CCOEFF_NORMED)<br>    loc = np.where(res &gt;= threshold)<br>    if loc[0].size &gt; 0:<br>        if return_all:<br>            return list(zip(*loc[::-1]))  # Return all matching coordinates<br>        return int(loc[1][0]), int(loc[0][0])  # Return the first match<br>    return None</pre><p>As you might thought, the heart of the method exists in this line of code:</p><pre>res = cv2.matchTemplate(screenshot, template, cv2.TM_CCOEFF_NORMED)</pre><ul><li>Screenshot: Screenshot path ( you are supposed to take it in the test automation runtime using selenium or appium)</li><li>Template: you template image path ( should be prepared, extracted from figma , or better captured from a screenshot)</li><li><strong>cv2.TM_CCOEFF_NORMED : </strong>it is the template matching method</li></ul><p>Let’s dive more in depth : OpenCV offers various template matching methods. (You can experiment with different ones and explore the results for you use case)</p><ul><li><strong>cv2.TM_CCOEFF:</strong> Correlation coefficient matching.</li><li><strong>cv2.TM_CCOEFF_NORMED:</strong> Normalized correlation coefficient matching.</li><li><strong>cv2.TM_SQDIFF:</strong> Square difference matching.</li><li><strong>cv2.TM_SQDIFF_NORMED:</strong> Normalized square difference matching.</li></ul><blockquote><strong>Note:</strong> When using <em>cv2.TM_SQDIFF</em> or <em>cv2.TM_SQDIFF_NORMED</em>, lower values represent better matches, so you may need to adjust your thresholding logic accordingly.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7TrS9GtgpIOomED7G2OOIA.png" /><figcaption>Table of comparison between different methods</figcaption></figure><p>Let’s use that in test automation context, but first let’s develop some utility functions:</p><pre>import cv2<br>import numpy as np<br>from appium.webdriver.common.touch_action import TouchAction<br>def load_image(image_path):<br>    &quot;&quot;&quot;<br>    Loads an image in grayscale.<br>    &quot;&quot;&quot;<br>    return cv2.imread(image_path, 0)<br>def calculate_center(pt, template):<br>    &quot;&quot;&quot;<br>    Calculates the center of a matched area.<br>    &quot;&quot;&quot;<br>    w, h = template.shape[::-1]<br>    center_x = int(pt[0] + w / 2)<br>    center_y = int(pt[1] + h / 2)<br>    return center_x, center_y<br>def perform_tap(driver, center):<br>    &quot;&quot;&quot; click on coordinates <br>    &quot;&quot;&quot;<br>    action = TouchAction(driver)<br>    action.tap(x=center[0], y=center[1]).perform()</pre><p>Now, we have matching template and the utility functions above, we can use them to meet the test automation needs.</p><h4>Performing Actions Based on Matching Results</h4><ol><li>Verify that an image is displayed on the current screen</li></ol><pre>def is_template_image_displayed(screenshot_path, template_path, threshold=0.8):<br>    &quot;&quot;&quot;<br>    Checks if a template image is displayed in the screenshot.:param screenshot_path: Path to the screenshot image.<br>    :param template_path: Path to the template image.<br>    :param threshold: Matching threshold (default is 0.8).<br>    :return: True if the template is found.<br>    :raises TemplateImageNotFoundError: If the template image is not found.<br>    &quot;&quot;&quot;<br>    # Load images<br>    screenshot = load_image(screenshot_path)<br>    template = load_image(template_path)<br>    # Use find_template to check for matches<br>    if find_template(screenshot, template, threshold) is None:<br>        raise TemplateImageNotFoundError()<br>    <br>    return True</pre><p>2. Count icon/element occurence:</p><pre>def count_template_image_occurrence(screenshot_path, template_path, threshold=0.8):<br>    &quot;&quot;&quot;<br>    Counts the number of occurrences of a template image in a screenshot.:param screenshot_path: Path to the screenshot image.<br>    :param template_path: Path to the template image.<br>    :param threshold: Matching threshold (default is 0.8).<br>    :return: Number of occurrences of the template.<br>    &quot;&quot;&quot;<br>    # Load images<br>    screenshot = load_image(screenshot_path)<br>    template = load_image(template_path)<br>    # Get all matching coordinates<br>    matches = find_template(screenshot, template, threshold, return_all=True)<br>    # Count occurrences<br>    return len(matches) if matches else 0<br></pre><p>3. Click icon/element on current screen</p><pre>def click_using_template_image(driver, screenshot_path, template_path, threshold=0.8):<br>    &quot;&quot;&quot;<br>    Finds the first occurrence of a template image in a screenshot and performs a click action.:param driver: Appium driver instance.<br>    :param screenshot_path: Path to the screenshot image.<br>    :param template_path: Path to the template image.<br>    :param threshold: Matching threshold (default is 0.8).<br>    :raises TemplateImageNotFoundError: If the template image is not found.<br>    &quot;&quot;&quot;<br>    # Load images<br>    screenshot = load_image(screenshot_path)<br>    template = load_image(template_path)<br>    # Find the first matching area<br>    matched_area = find_template(screenshot, template, threshold)<br>    # Fail if no match is found<br>    if matched_area is None:<br>        raise TemplateImageNotFoundError(&quot;No template image found in the screenshot. Test failed.&quot;)<br>    # Calculate the center of the matched area<br>    center = calculate_center(matched_area, template)<br>    # Perform the click action<br>    perform_tap(driver, center)<br>    print(f&quot;Clicked on template at location: {center}&quot;)</pre><h4>2. Screenshot Comparison For Test Automation</h4><p>Some other computer vision technique used in test automation involve using screenshot comparison to identify differences between two screenshots. <strong>This can be used in automated testing to detect UI changes, visual regressions, or mismatches in graphical interfaces.</strong></p><p>We will be using those screenshots and apply CV on them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UMcIZjyu27GC-LRxzpNhEQ.png" /><figcaption>Two screenshot from the same mobile phone with few differences</figcaption></figure><p><strong><em>2.1. Pixel-by-Pixel Comparison: </em></strong><em><br></em>It involves comparing each pixel in two images to check for exact matches. a simple method (only calculation , without CV librarybut sensitive to minor differences (anti-aliasing, compression artifacts, subpixel rendering ..)</p><pre>def compare_images_pixel_by_pixel_with_boxes(img1_path, img2_path):<br>    &quot;&quot;&quot;<br>    Compare two images pixel-by-pixel for exact matches with bounding boxes for differences.<br>    &quot;&quot;&quot;<br>    img1, img2, error = load_and_validate_images(img1_path, img2_path)<br>    if error:<br>        return error<br>    # Main comparison logic<br>    difference = cv2.absdiff(img1, img2)<br>    gray_diff = cv2.cvtColor(difference, cv2.COLOR_BGR2GRAY)<br>    _, diff_mask = cv2.threshold(gray_diff, 30, 255, cv2.THRESH_BINARY)<br>    # Get masks for each image<br>    img1_diff = cv2.subtract(img1, img2)<br>    img2_diff = cv2.subtract(img2, img1)<br>    img1_mask = cv2.threshold(cv2.cvtColor(img1_diff, cv2.COLOR_BGR2GRAY), 30, 255, cv2.THRESH_BINARY)[1]<br>    img2_mask = cv2.threshold(cv2.cvtColor(img2_diff, cv2.COLOR_BGR2GRAY), 30, 255, cv2.THRESH_BINARY)[1]<br>    # Process results<br>    contours1 = find_contours_from_mask(img1_mask)<br>    contours2 = find_contours_from_mask(img2_mask)<br>    create_side_by_side_result_image(img1, img2, contours1, contours2, &quot;pixel_comparison_with_boxes_side_by_side.png&quot;)<br>    return &quot;Comparaison pixel par pixel terminée avec boîtes englobantes.&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xdvfr89BdK1N_gz-IPderg.png" /><figcaption>Result Image: Substruction Technique</figcaption></figure><p><strong><em>2.2. Structural Similarity Index (SSIM)<br></em></strong>It measures the perceived visual difference between two images. More robust than pixel comparison because it focus onstructural differences rather than exact pixel values</p><pre>def compare_images_ssim_with_boxes(img1_path, img2_path):<br>    &quot;&quot;&quot;<br>    Compare two images using SSIM with bounding boxes for differences.<br>    &quot;&quot;&quot;<br>    img1_gray, img2_gray, error = load_and_validate_images(img1_path, img2_path, grayscale=True)<br>    if error:<br>        return error<br>    # Main SSIM comparison logic<br>    score, diff = compare_ssim(img1_gray, img2_gray, full=True)<br>    diff = (diff * 255).astype(&quot;uint8&quot;)<br>    inverted_diff = cv2.bitwise_not(diff)<br>    _, diff_mask = cv2.threshold(inverted_diff, 30, 255, cv2.THRESH_BINARY)<br>    # Get masks for each image<br>    img1_mask = cv2.bitwise_and(diff_mask, cv2.threshold(img1_gray, 30, 255, cv2.THRESH_BINARY)[1])<br>    img2_mask = cv2.bitwise_and(diff_mask, cv2.threshold(img2_gray, 30, 255, cv2.THRESH_BINARY)[1])<br>    # Process results<br>    contours1 = find_contours_from_mask(img1_mask)<br>    contours2 = find_contours_from_mask(img2_mask)<br>    <br>    img1_color = cv2.imread(img1_path)<br>    img2_color = cv2.imread(img2_path)<br>    create_side_by_side_result_image(img1_color, img2_color, contours1, contours2, &quot;ssim_comparison_with_boxes_side_by_side.png&quot;)<br>    return f&quot;Comparaison SSIM terminée avec boîtes englobantes. Score SSIM : {score:.2f}&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xdvfr89BdK1N_gz-IPderg.png" /><figcaption>Result Image: SSIM Technique</figcaption></figure><p><strong><em>2.3. Images subtraction:<br></em></strong>This involves subtracting one image from another to highlight differences. Areas where the images differ will stand out.</p><pre>def compare_images_by_subtraction_with_boxes(img1_path, img2_path):<br>    &quot;&quot;&quot;<br>    Highlight differences by subtracting one image from another with bounding boxes.<br>    &quot;&quot;&quot;<br>    img1, img2, error = load_and_validate_images(img1_path, img2_path)<br>    if error:<br>        return error<br>    # Main subtraction comparison logic<br>    img1_diff = cv2.subtract(img1, img2)<br>    img2_diff = cv2.subtract(img2, img1)<br>    img1_mask = cv2.threshold(cv2.cvtColor(img1_diff, cv2.COLOR_BGR2GRAY), 30, 255, cv2.THRESH_BINARY)[1]<br>    img2_mask = cv2.threshold(cv2.cvtColor(img2_diff, cv2.COLOR_BGR2GRAY), 30, 255, cv2.THRESH_BINARY)[1]<br>    # Process results<br>    contours1 = find_contours_from_mask(img1_mask)<br>    contours2 = find_contours_from_mask(img2_mask)<br>    create_side_by_side_result_image(img1, img2, contours1, contours2, &quot;subtraction_with_boxes_side_by_side.png&quot;)<br>    return &quot;Image subtraction completed with bounding boxes.&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SD5NEB1BbzsHID-Vo1Xdfw.png" /><figcaption>Result Image: Substruction Technique</figcaption></figure><h3>Global Review For Different Techniques</h3><p>Long story short in the following table I tried to put most known computer vision techniques that might be used for test automation. (Deeper explanation and review will be in the next article)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e2ACQBVyTgsFnFaTKvC-pA.png" /><figcaption>Different Image Comparison Methods Can Be Used for Automation Testing</figcaption></figure><h3>From Firefighters to Innovators</h3><p>Returning to that Reddit post, it’s evident that many of QA feel stuck in a loop of endless maintenance. And, by the way, selenium was invented in <strong>2004</strong> by <strong>Jason Hugging</strong> but its true democratization likely occurred around <strong>2010–2015 . </strong>Almost 15 year of continuous testing and agile DevOps culture with test automation didn’t have revolutionary change.</p><p>Computer Vision ? no .. I will be talking about that next article.</p><p><strong>Join the conversation!</strong></p><ul><li>Do you have a particular subject or point that you would like me to talk about ?</li><li>Have you experimented with computer vision in your testing? I would like to hear from you folks!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*mD_Bi840gE5rxqKZ.png" /></figure><p>This story is published on <a href="https://generativeai.pub/">Generative AI</a>. Connect with us on <a href="https://www.linkedin.com/company/generative-ai-publication">LinkedIn</a> and follow <a href="https://www.zeniteq.com/">Zeniteq</a> to stay in the loop with the latest AI stories.</p><p>Subscribe to our <a href="https://www.generativeaipub.com/">newsletter</a> and <a href="https://www.youtube.com/@generativeaipub">YouTube</a> channel to stay updated with the latest news and updates on generative AI. Let’s shape the future of AI together!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*BLBgQeqnOWm2v3TU.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b90fe433f585" width="1" height="1" alt=""><hr><p><a href="https://generativeai.pub/the-evolution-of-ai-in-test-automation-from-locators-to-generative-ai-part-2-b90fe433f585">The Evolution of AI in Test Automation: From Locators to Generative AI ( part 2 )</a> was originally published in <a href="https://generativeai.pub/">Generative AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Publish a Python Library to PyPI: Robot Framework Library Example]]></title>
            <link>https://medium.com/pythoneers/how-to-publish-a-python-library-to-pypi-robot-framework-library-example-2d8aa766c9c7?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d8aa766c9c7</guid>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Mon, 02 Dec 2024 17:19:23 GMT</pubDate>
            <atom:updated>2024-12-02T19:51:20.208Z</atom:updated>
            <content:encoded><![CDATA[<h4>Everything you need to know to Publish you Python Library on PyPI Successfully</h4><p>In my early journey in software, I thought publishing a library on PyPI was complex (especially coming from a non-computer science background) and assumed it had to be done from scratch (Which is incorrect). So, I never gave it much thought — until curiosity got the better of me. To keep it simple and focus on the publishing process, I revisited an old repository and pulled out a few utility functions (just simple utilties for test automation). Once I understood the process of publishing a library, what started as an experiment turned into an eye-opening journey that ignited a new enthusiasm for Python’s practicality</p><figure><img alt="Screenshot of a Python library page on PyPI that shows file downloads and some version details" src="https://cdn-images-1.medium.com/max/1024/1*kJ-L6yNpw4u-H-ApJMqJFg.png" /><figcaption>A Screenshot From My First Experience Publishing a Python Library on PyP — Exploring the Basics</figcaption></figure><p>We will walk through steps of the process, from structuring your project to uploading it to PyPI.</p><h3>Why You Should Consider Publishing You Python Code As A Library?</h3><h4>1. Present Your Work to the Public</h4><p>Others may find your Python library useful in resolving related issues. Have you figured it out? Stop them from inventing the wheel again. Your library turns become a readily integrated dependency for other projects.</p><h4>2. Develop Your Portfolio and Display Your Skills</h4><p>Publishing a library is a fantastic way to demonstrate your creativity and problem-solving skills. In addition, show that you can develop well-structured, reusable code (if you publish a pain killer library, expect to be approached on LinkedIn).</p><blockquote>Requests, Numpy, and Pandas are among the most downloaded packages, with millions of downloads every week. For example, in a single week in 2024, requests received over 21 million downloads. [<a href="https://pypitrends.com/">PyPI Trends</a>]</blockquote><h4>3. Make Installing Your Code Simple</h4><p>With just one command, developers can install the library on PyPI (or another host):</p><pre>pip install your-library-name</pre><h4>4. Get Input from the Community</h4><p>That ‘s comparable to peer review in the realm of scientific research. You can expect feedback, report bugs, and even make improvements once you link your library to GitHub. That’s a great way to learn is through issues, reviews, and community feedback.</p><h3>Preparing Your Python Library</h3><p>Before publishing, we need to prepare the library to meet the standards of Python packaging.</p><h3>1. Structuring The Project (Robot Framework Example)</h3><p>There is some norms and structure that should be respected and properly executed to be ready to package and distributed easily. The following is a directory structure as a starting point, and it is an example for a library for Robot Framework, but it is kind of the same for a casual python library:</p><pre>root_folder/<br>├── library_name/<br>│   ├── __init__.py          <br>│   ├── keywords.py          # main functions (called keywords in RF)<br>│   ├── utils.py             # Utilities methods<br>├── tests/<br>│   ├── __init__.py          <br>│   ├── test_class1/method1.py     # Unit tests <br>├── setup.py                 # Metadata of the package<br>├── README.md                # How to install/ use/ usage samples etc ..<br>├── LICENSE                  # Licensing information (select from github)<br>├── requirements.txt         # All dependencies needed by the library</pre><h3>2. Writing Your Library Code</h3><p>Let’s look at a simple example of a library class for the Robot Framework:</p><h4>keywords.py: The Core of Your Library</h4><pre>class LibraryName:<br>    &quot;&quot;&quot;<br>    A library for doing X , Y and Z.<br>    &quot;&quot;&quot;<br>    <br>    def __init__(self):<br>        pass<br>    <br>    def do_something(self, arg1, arg2):<br>        &quot;&quot;&quot;<br>        Keyword to do X and Z.<br>        Args:<br>        arg1 : arg1 is ...<br>        arg2 : arg2 is ...<br>        Return<br>        result: result is a string/list/dictionary etc .. <br>        &quot;&quot;&quot;<br>        # Implementation goes here<br>        return result</pre><h4>__init__.py: Initialization</h4><pre>__all__ = [&#39;MyLibrary&#39;]</pre><h3>3. Adding Documentation</h3><p>Doing a well-documented library make it easier for users to understand its purpose and adopt it.</p><ul><li><strong>README.md</strong>: Good readme file ( I would say even SEO optimized description ) is a must. What the library does, how to install it, some usage examples etc..</li><li><strong>LICENSE</strong>: Clearly state the terms of use for your code. MIT and Apache 2.0 are popular open-source licenses.</li></ul><blockquote>Packages with comprehensive and clear documentation receive 40% more downloads. Including a well-structured README, usage examples, and detailed API descriptions is crucial. [<a href="https://packaging.python.org/">PyPI Developer Guide</a>]</blockquote><h3>Building and Packaging Your Library</h3><p>To make your library installable, you need to package it as a source distribution and a binary wheel.</p><h4>1. Install Setuptools</h4><p>Setuptools is essential for easily managing Python packages. It simplifies building, distributing, and installing Python projects, especially those with dependencies.</p><pre>pip install setuptools</pre><h4>2. What is setup.py?</h4><p>The setup.py file contains the metadata and configuration needed for packaging. Here&#39;s an example:</p><pre>setup(<br>    name=&#39;library_name&#39;,<br>    version=&#39;1.0.0&#39;,<br>    author=&#39;abdelkader&#39;,<br>    author_email=&#39;your-email@example.com&#39;,<br>    description=&#39;Python library fo doing X and Y &#39;,<br>    long_description=open(&#39;README.md&#39;).read(),<br>    long_description_content_type=&#39;text/markdown&#39;,<br>    url=&#39;https://github.com/username/lib&#39;,<br>    packages=[&#39;library_name&#39;],<br>    install_requires=[<br>        &#39;dependency1&gt;=1.0.0&#39;,<br>        &#39;dependency2&gt;=2.0.0&#39;,<br>    ]<br>    classifiers=[<br>        &#39;Programming Language :: Python :: 3&#39;,<br>        &#39;License :: OSI Approved :: MIT License&#39;,<br>        &#39;Operating System :: OS Independent&#39;,<br>    ],<br>    python_requires=&#39;&gt;=3.9&#39;,<br>)</pre><h4>3. Creating the Distribution Files</h4><p>Run the following command to build your source and binary distributions:</p><pre>python setup.py sdist bdist_wheel</pre><p>This will create a dist directory containing files like:</p><ul><li>library-1.0.0.tar.gz (source tarball)</li><li>library-1.0.0-py3-none-any.whl (binary wheel)</li></ul><blockquote>What’s the difference ? Source tarballs contain the raw source code, ideal for building or modifying packages ( I mean you as installer). Binary wheels are pre-compiled packages, limited to compatible systems ( Follow if you are a python nerd, I will be writing about it)</blockquote><h3>Publishing Your Library to PyPI</h3><p>Once the library is ready, follow these steps to publish it to PyPI.</p><blockquote><strong>593,935</strong> packages hosted on PyPi (22 november 2024) , with a continuous growth trend explained by the Python popularity.</blockquote><blockquote>1,500 new packages are published monthly (in average). [<a href="https://pypistats.org/">PyPIStats</a>]</blockquote><h4>1. Create a PyPI Account</h4><p>Create an account on both <a href="https://test.pypi.org/">TestPyPI</a> (for testing) and <a href="https://pypi.org/">PyPI</a> (for production).</p><h4>2. Install Twine</h4><p>Use Twine to securely upload your package:</p><pre>pip install twine</pre><h4>3. Upload to TestPyPI</h4><p>Test your package first by uploading it to TestPyPI:</p><pre>twine upload --repository-url https://test.pypi.org/legacy/ dist/*</pre><p>Visit <a href="https://test.pypi.org/">TestPyPI</a> to verify the package.</p><h4>4. Upload to PyPI</h4><p>Once satisfied, next step is to upload it to PyPI:</p><pre>twine upload dist/*</pre><h3>Tips for Maintaining Your Library</h3><h4>1. Handle Feedback, Bug Reports And Maintain</h4><p>Monitor GitHub issues or other feedback channels to improve your library continuously. Fix bugs, enhance your library with new features and release new versions.</p><blockquote>Packages which are updated frequently(monthly or biweekly) have 50–70% higher visibility and download rates. This explained by the fact that PyPI’s search ranking algorithms prioritize active maintenance [<a href="https://packaging.python.org/en/latest/guides/analyzing-pypi-package-downloads/">Google BigQuery Analysis</a>]</blockquote><h4>2. Keep Dependencies Updated</h4><p>Update the requirements.txt file and include the latest versions of dependencies.</p><h4>3. Release New Versions</h4><p>Use semantic versioning (e.g., 1.1.0, 2.0.0) to indicate updates, bug fixes, or major changes.</p><h3>Quick Notes</h3><h4>What are the differences between TestPyPI andPyPI?</h4><p>TestPyPI is an instance of PyPI intended for testing package uploads. Use it to verify that your package does what you expect before publishing to the main PyPI repository.</p><h4>What is the process for managing dependencies of multiple packages?</h4><p>Declare your dependencies in your setup install_requires parameter py file. This means your users will all have all the required libraries once they install your package.</p><h4>What are binary wheels and why do you want them?</h4><p>Binary wheels are built, precompiled versions of your library. They’re also platform specific, so you may want to publish both the binary wheels as well as source tarballs to cater to these distributions.</p><h4>How do I check my package if it is correct before uploading?</h4><p>To do that, in your CMD you will have to type dist/* and check the metadata of your package are rendering correctly in PyPI</p><h4>Is there a way to update the library post-publishing?</h4><p>Sure! Just update your code, bump the version number in setup. py, rebuilding the distributions, re-uploading articfacts to PyPI.</p><h3>More Resources</h3><ul><li><a href="https://packaging.python.org/">Python Packaging Guide</a><br><em>The official guide to Python packaging and distribution.</em></li><li><a href="https://setuptools.pypa.io/en/latest/">Setuptools Documentation</a><br><em>Understanding Setuptools.</em></li><li><a href="https://twine.readthedocs.io/en/stable/">Twine Documentation</a><br><em>Official documentation to Twine.</em></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d8aa766c9c7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pythoneers/how-to-publish-a-python-library-to-pypi-robot-framework-library-example-2d8aa766c9c7">How to Publish a Python Library to PyPI: Robot Framework Library Example</a> was originally published in <a href="https://medium.com/pythoneers">The Pythoneers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Save Your Test Automation Project: Add This AI Tool for Smart Element Locating Fallbacks]]></title>
            <link>https://generativeai.pub/self-fixing-locators-with-healenium-ecb1bd892992?source=rss-69deb3c2717a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecb1bd892992</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[machine-learning-tools]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[test-automation]]></category>
            <dc:creator><![CDATA[Abdelkader HASSINE]]></dc:creator>
            <pubDate>Wed, 20 Nov 2024 08:55:53 GMT</pubDate>
            <atom:updated>2025-02-10T08:31:20.076Z</atom:updated>
            <content:encoded><![CDATA[<h4>Healenium: An ML-Based Self-Healing Locators</h4><p>I’am sure that you have spent hours fixing broken UI tests after a minor change in the application’s interface. It’s frustrating, right ? <br>Imagine if your tests could heal themselves, adapting to changes without constant tweaks.</p><figure><img alt="Banner image with a teal background showcasing the title ‘ML-Based Self-Healing Locators in Real Time Execution’ with the Healium logo below. The image represents a blog post about machine learning-based self-healing locators in automation testing" src="https://cdn-images-1.medium.com/max/1024/1*4vSPebeFO5g5kXEzikaIWA.png" /><figcaption>Exploring ML-Based Self-Healing Locators for Reliable Automation with Healium</figcaption></figure><h3>Traditional Testing</h3><h4><em>Scenario: A Button ID Changes Without Healenium</em></h4><p>Imagine you have a test that clicks a login button identified by the ID &quot;loginBtn&quot;.</p><pre>driver.find_element(By.ID, &quot;loginBtn&quot;).click()</pre><p>One day, the developers change the button’s ID to &quot;signInBtn&quot;. Your test fails.</p><p><strong>What happens next?</strong></p><ul><li><strong>Test Failure</strong>: The test can’t find the element with ID &quot;loginBtn&quot;.</li><li><strong>Debugging</strong>: You spend time investigating why the test failed.</li><li><strong>Manual Fix</strong>: You update the locator in your test code to &quot;signInBtn&quot;</li><li><strong>Lost Time</strong>: This process repeats every time there’s a UI change.</li></ul><h3>Introducing Healenium</h3><p>Now, imagine if your tests could heal themselves, adapting to such changes without manual intervention. That’s where <strong>Healenium</strong> comes in.</p><p>Healenium is an open-source library that adds self-healing capabilities to your Selenium tests. It monitors your tests, detects when locators fail, and automatically updates them in real-time.</p><figure><img alt="Comparison meme of Drake disapproving traditional UI testing with manual locator fixes and approving self-healing testing with Healenium for automated locator adjustments. Shows frustration without Healenium and satisfaction after using it" src="https://cdn-images-1.medium.com/max/500/0*vOiAAGiFMGjH7W0i.jpg" /><figcaption>With Healenium vs. Without Healenium: How Self-Healing Tests Can Save Time and Reduce Maintenance</figcaption></figure><h3>How Healenium Works</h3><p>Healenium sits between your test code and the browser. When a locator fails, Healenium steps in.</p><p>Steps:</p><ol><li><strong>Monitoring</strong>: It watches your tests as they run.</li><li><strong>Detection</strong>: If a locator fails to find an element, Healenium detects it.</li><li><strong>Healing</strong>: It uses historical data and machine learning to find the element’s new location.</li><li><strong>Updating</strong>: Healenium updates the locator in memory, allowing the test to continue.</li></ol><figure><img alt="Diagram of Healnium architecture showing two modules: Healnium-Proxy and Healnium-Web. Healnium-Proxy supports multiple programming languages (Java, Python, C#, JavaScript) and integrates with Remote Selenium WebDriver and Selenoid using components like Hlm-proxy, Hlm-backend, Selector-imitator, and PostgreSQL. Healnium-Web supports Java and Docker, utilizing SelfHealingDriver for Selenium WebDriver with similar components. Both modules interact with PostgreSQL databases" src="https://cdn-images-1.medium.com/max/1024/0*o-MljdwXY7Ou3yCq.png" /><figcaption>Healnium’s Architecture: Proxy vs. Web Modules in Automated Testing</figcaption></figure><h3>Setting Up Healenium With Java</h3><p>1. Add Healenium to Your Project</p><p>First, include Healenium dependencies in your build file.</p><p>For Maven:</p><pre>&lt;dependencies&gt;<br>    &lt;!-- Healenium Web Driver --&gt;<br>    &lt;dependency&gt;<br>        &lt;groupId&gt;com.epam.healenium&lt;/groupId&gt;<br>        &lt;artifactId&gt;healenium-web&lt;/artifactId&gt;<br>        &lt;version&gt;3.1.0&lt;/version&gt;<br>    &lt;/dependency&gt;<br>&lt;/dependencies&gt;</pre><p>2. Start Healenium Backend</p><p>Healenium requires a backend service. You can run it using Docker.</p><pre>docker-compose -f docker-compose.yml up</pre><p>This starts the Healenium server, which stores and retrieves locator data.</p><p>3. Update Your WebDriver Initialization</p><p>Replace your regular WebDriver with Healenium&#39;s SelfHealingDriver.</p><pre>WebDriver originalDriver = new ChromeDriver();<br>WebDriver driver = SelfHealingDriver.create(originalDriver);</pre><p>Now, your tests use the self-healing capabilities.</p><h3>Setting Up Healenium in Python</h3><p>Let’s walk through how to integrate Healenium into your Python project.</p><p>1. Install Healenium Packages<br>First, install the necessary Healenium packages:</p><pre>pip install healenium-client</pre><p>2. Start Healenium Backend<br>Healenium requires a backend service. You can run it using Docker:</p><pre>docker-compose -f docker-compose.yml up</pre><p>This starts the Healenium server, which stores and retrieves locator data.</p><p>3. Update Your WebDriver Initialization<br>Replace your regular WebDriver with Healenium&#39;s SelfHealingDriver.</p><pre>from selenium import webdriver<br>from healenium import SelfHealingDriver<br><br># Original WebDriver<br>driver = webdriver.Chrome()<br># Wrap it with Healenium<br>driver = SelfHealingDriver(driver)</pre><h3>Helenium In Practical Scenario: A Button ID Changes</h3><p>Imagine you have a test that clicks a login button identified by the ID &quot;loginBtn&quot;.javaCopier le code</p><pre>driver.findElement(By.id(&quot;loginBtn&quot;)).click();</pre><p>One day, the developers change the button’s ID to &quot;signInBtn&quot;. Your test fails.</p><p>With Healenium:</p><ol><li>The test tries to find &quot;loginBtn&quot; but can&#39;t.</li><li>Healenium detects the failure.</li><li>It searches for an element similar to &quot;loginBtn&quot;.</li><li>Finds &quot;signInBtn&quot; based on similarities.</li><li>Updates the locator in memory.</li><li>Clicks the button, and the test passes.</li></ol><p>You get a report indicating that healing occurred, so you can update your code later.</p><h3>Benefits of Using Healenium</h3><ul><li><strong>Reduced Maintenance</strong>: Spend less time fixing broken tests.</li><li><strong>Increased Stability</strong>: Tests are more reliable, catching real issues and reduce automation bugs. Automation is made for detecting product bugs !</li><li><strong>Insightful Reports</strong>: detailed reports on healed locators are provided. it will be your iteration loop to improve your next locator.</li></ul><h3>Monitoring and Reports</h3><p>Healenium provides a dashboard where you can see:</p><ul><li>Which locators were healed.</li><li>Suggestions for updating your tests.</li><li>Statistics on test runs.</li></ul><p>This helps you keep track of changes and maintain your tests proactively.</p><figure><img alt="Screenshot of a Healium self-healing automation report interface. The report, dated May 14, 2023, displays the failure and healing of an element locator. The failed locator uses an XPath expression, while the healed locator utilizes a CSS selector. A score of 0.954 indicates the success of the healing process, with a visual confirmation of the corrected locator shown in a screenshot on the right" src="https://cdn-images-1.medium.com/max/1024/0*UMap0euJ0QnQUbEL.png" /><figcaption>A detailed view of a Healium self-healing automation report, showing a corrected locator in a real-time execution</figcaption></figure><h3>Best Practices</h3><ul><li><strong>Regularly Update Locators</strong>: Use Healenium’s reports to fix locators in your code.</li><li><strong>Use Stable Attributes</strong>: When possible, use attributes less likely to change.</li><li><strong>Combine with Self-Healing Framework</strong>: Healenium works well with other self-healing strategies. One most recover additional strategy that goes well with healenium is to implement a listener that request LLM API to find the element. wait for my a next article soon about it ( + robot framework package library as well ^^ )</li></ul><h3>Conclusion</h3><p>Healenium adds a layer of resilience to your UI tests. By automatically healing broken locators, you will spend less time chasing broken tests after every UI tweak. Let Healenium handle it.</p><p>More in the official documentation: <a href="https://healenium.io/docs/overview">https://healenium.io/docs/overview</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*CNNbwGdGcGMSvsvw.png" /></figure><p>This story is published on <a href="https://generativeai.pub/">Generative AI</a>. Connect with us on <a href="https://www.linkedin.com/company/generative-ai-publication">LinkedIn</a> and follow <a href="https://www.zeniteq.com/">Zeniteq</a> to stay in the loop with the latest AI stories.</p><p>Subscribe to our <a href="https://www.generativeaipub.com/">newsletter</a> and <a href="https://www.youtube.com/@generativeaipub">YouTube</a> channel to stay updated with the latest news and updates on generative AI. Let’s shape the future of AI together!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*tPU4xfn4gZ05gigw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecb1bd892992" width="1" height="1" alt=""><hr><p><a href="https://generativeai.pub/self-fixing-locators-with-healenium-ecb1bd892992">Save Your Test Automation Project: Add This AI Tool for Smart Element Locating Fallbacks</a> was originally published in <a href="https://generativeai.pub/">Generative AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>