<?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 Dheeraj Gambhir on Medium]]></title>
        <description><![CDATA[Stories by Dheeraj Gambhir on Medium]]></description>
        <link>https://medium.com/@dheerajgambhir?source=rss-b2ba36cc1604------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xO_z8P4ynHSVaj3lvqGOow.png</url>
            <title>Stories by Dheeraj Gambhir on Medium</title>
            <link>https://medium.com/@dheerajgambhir?source=rss-b2ba36cc1604------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 19:44:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dheerajgambhir/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[Breaking the Mobile Visual Testing Paradox with App Percy’s AI]]></title>
            <link>https://dheerajgambhir.medium.com/breaking-the-mobile-visual-testing-paradox-with-app-percys-ai-d4c38d810581?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4c38d810581</guid>
            <category><![CDATA[browserstack]]></category>
            <category><![CDATA[percy]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Wed, 24 Dec 2025 10:05:44 GMT</pubDate>
            <atom:updated>2025-12-24T10:05:44.660Z</atom:updated>
            <content:encoded><![CDATA[<p>Mobile teams are stuck in a paradox: the more visual coverage you add, the slower your releases become. Visual regression suites on dozens of devices sound great in theory — until they drown you in noise, false positives, and baseline maintenance.</p><p>App Percy’s AI-powered visual engine is built to flip that equation: more coverage with less noise and maintenance, especially on real devices at scale.​</p><p><strong>The Math Behind the Pain:</strong></p><p>Let’s quantify why traditional visual testing breaks down in mobile:</p><ul><li>15 devices × 3 orientations × 5 screen densities = 225 screenshot combinations per run</li><li>Every UI change = 225 new comparisons</li><li>Up to 85% false positives from non-deterministic changes</li><li>4–6 hours of manual review per release</li></ul><p>At this point, visual testing is not just “slow” — it is architecturally misaligned with modern mobile delivery.</p><p><strong>Why Mobile Visual Testing Feels “Un-Automatable”</strong></p><p>Most visual tools still think in pixels, not in context. That’s the root problem.</p><ul><li>Temporal noise: timestamps, battery levels, network indicators, live feeds</li><li>Platform variance: different font rendering, safe areas, notches, navigation chrome</li><li>User-specific content: avatars, names, localized content, personalized recommendations</li></ul><p>On mobile, context changes constantly. A naive pixel diff can’t distinguish “normal variation” from “real regression,” so it flags everything.</p><p>The core challenge:<br> How do you automate visual testing when the app’s UI is designed to change all the time?</p><p><strong>App Percy’s Shift: From Pixels to User Experience</strong></p><p>App Percy’s AI does not start with “Did the pixels change?” — it starts with “Did the experience change in a meaningful way?”​</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*kDsJCY_-Gkr1ZDKm9q95nw.png" /></figure><p>This semantic layer is what turns visual testing from a noisy alarm system into an intelligence layer for mobile quality.</p><p><strong>A Smarter Workflow: Intelligence-First Visual Testing</strong></p><p><strong>Phase 1: Smart onboarding, not brute-force setup</strong></p><p>App Percy and BrowserStack’s SDK help you plug visual tests into existing automation with minimal changes, then let AI handle the heavy lifting.​​</p><ul><li>Auto-detects framework and configuration</li><li>Suggests where to insert snapshots in critical journeys</li><li>Creates baselines that expect certain dynamic variations</li><li>Runs on thousands of real iOS and Android devices in the cloud​</li></ul><p><strong>Phase 2: Adaptive learning over time</strong></p><p>As your team approves or rejects changes, App Percy learns what “normal” looks like for your app.</p><ul><li>Learns your design system patterns</li><li>Reduces recurring false positives across releases</li><li>Adapts to evolving layouts, themes, and components</li></ul><p>Over time, the system becomes app-specific — not just “AI in general.”</p><p><strong>Phase 3: Autonomous orchestration in CI/CD</strong></p><p>Once integrated into your pipeline, App Percy’s AI behaves like an autonomous quality agent.​</p><ul><li>Self-heals baselines after approved UI changes</li><li>Prioritizes critical screens and risky changes in each run</li><li>Optimizes device usage based on change scope and risk</li></ul><p>Visual tests stop being a blocking stage and become a risk-aware gate.</p><p><strong>From Reactive Testing to Predictive Quality</strong></p><p>Traditional visual testing tells you what broke after you push a change. With AI on top of real-device coverage, App Percy starts enabling predictive behavior.​</p><ul><li>Flags patterns that historically led to user-reported issues</li><li>Highlights cross-platform inconsistencies early</li><li>Surfaces accessibility and readability risks as part of visual review</li></ul><p>This fits directly into an agentic QA mindset: AI not just running checks but making informed decisions on where humans should focus.</p><p><strong>The Payoff: Velocity Without Visual Compromise</strong></p><p>For engineering leadership, the impact shows up in three places:</p><ul><li>Release velocity: More frequent releases without drowning QA in visual triage</li><li>Developer experience: Fewer flaky visual checks, less time debugging screenshots</li><li>Brand and UX consistency: Confident, consistent UI across devices and platforms, backed by 20,000+ real devices and OS combinations​</li></ul><p>Visual testing stops being the bottleneck at the end of the pipeline and becomes an always-on guardrail.</p><p><strong>Why This Matters in an Agentic QA World:</strong></p><p>BrowserStack is leaning into AI Agents across visual, accessibility, and integration workflows. App Percy is a concrete example of how an AI Agent solves an “un-automatable” problem:​</p><ul><li>It doesn’t just run more checks; it decides which changes matter.</li><li>It doesn’t just record screenshots; it understands UI semantics.</li><li>It doesn’t just reduce human effort; it restructures the entire visual quality workflow.</li></ul><p>For teams adopting Agentic QA, this is the pattern to emulate:<br>move from scripts that execute steps to agents that understand context, learn from feedback, and optimize quality autonomously.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4c38d810581" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking the Power of Model Context Protocol (MCP) in Testing]]></title>
            <link>https://dheerajgambhir.medium.com/unlocking-the-power-of-model-context-protocol-mcp-in-testing-b9fd806bc087?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9fd806bc087</guid>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 10:41:03 GMT</pubDate>
            <atom:updated>2025-07-28T10:41:03.109Z</atom:updated>
            <content:encoded><![CDATA[<p>As GenAI continues to shape the future of software development, one powerful concept is making waves in the QA world: <strong>Model Context Protocol (MCP)</strong>. While it may sound technical at first, MCP is essentially the protocol that allows AI to maintain context and interact with external tools like JIRA, Slack, or Playwright during multi-step tasks. For testers, this means building intelligent assistants that can act like real QA team members.</p><p>In this blog, we’ll break down what MCP is, how it works, and how it can be used in software testing — with examples, advantages, and a few challenges to watch out for.</p><h3><strong>What is Model Context Protocol (MCP)?</strong></h3><p>Think of <strong>MCP</strong> as the <strong>orchestrator</strong> behind intelligent conversations between a GenAI model and external systems. It’s a structured way to maintain:</p><ul><li>Who said what (User vs AI)</li><li>What AI is supposed to do (System instructions)</li><li>Which tools can it use (Tool calls)</li><li>What results were received (Tool responses)</li></ul><p>Just like how a tester refers to previous requirements, emails, or bug history to make informed decisions — MCP gives AI the ability to <strong>keep track of context</strong> across multiple steps.</p><h3><strong>Real-World Analogy for Testers</strong></h3><p>Imagine you’re a QA Engineer:</p><ul><li>You read a JIRA ticket (requirement)</li><li>You ping the developer on Slack for clarifications</li><li>You log bugs, update stories, and trigger automated tests</li></ul><p>If you had an AI teammate, it would need to:</p><ul><li>Understand the context of the task</li><li>Talk to tools like JIRA, Slack, and Playwright</li><li>Maintain a memory of what’s already done and what’s next</li></ul><p><strong>MCP enables exactly that.</strong></p><h3><strong>MCPs for Testing Tools: Examples</strong></h3><p>Let’s explore how MCP works with popular testing tools:</p><p><strong>✉️ JIRA MCP</strong></p><ul><li><strong>What it does</strong>: Allows the AI to read, create, or update JIRA tickets</li><li><strong>Example</strong>: “Create a bug with screenshot for failed test case in login module”</li><li><strong>MCP in action</strong>: AI writes the bug with summary, attaches logs, and adds labels based on past context</li></ul><p><strong>💬 Slack MCP</strong></p><ul><li><strong>What it does</strong>: Allows the AI to send messages, summarize threads, or notify team members</li><li><strong>Example</strong>: “Notify Dev team that test run failed and link the JIRA bug”</li><li><strong>MCP in action</strong>: AI links the ticket and summarizes the cause of failure.</li></ul><p><strong>🔢 Playwright MCP</strong></p><ul><li><strong>What it does</strong>: Lets AI trigger Playwright scripts, monitor execution, and parse test results</li><li><strong>Example</strong>: “Run regression suite and tell me which login scenarios failed”</li><li><strong>MCP in action</strong>: AI triggers test, waits for results, and shows the failed scenarios only</li></ul><h3><strong>Advantages of Using MCP in Testing</strong></h3><ol><li><strong>Context Awareness:</strong></li></ol><ul><li>The AI remembers test steps, past conversations, and tool results</li></ul><p><strong>2. Tool Integration</strong>:</p><ul><li>Seamless bridge between AI and your testing ecosystem (JIRA, Jenkins, GitHub, etc.)</li></ul><p><strong>3. Faster QA Operations</strong>:</p><ul><li>Log bugs, run tests, send reports — all within the same GenAI conversation</li></ul><p><strong>4. Collaboration Amplified</strong>:</p><ul><li>AI can communicate on Slack, raise questions, or share status updates</li></ul><p><strong>5. Consistency and Traceability</strong>:</p><ul><li>Actions taken via MCP are structured and can be audited or replayed</li></ul><h3><strong>Challenges and Considerations</strong></h3><ol><li><strong>Security and Access Control</strong>:</li></ol><ul><li>AI using MCP needs proper authentication to access tools like JIRA or GitHub</li></ul><p><strong>2. Tool-Specific Limits</strong>:</p><ul><li>MCP must be customized per tool — one size doesn’t fit all</li></ul><p><strong>3. Error Handling</strong>:</p><ul><li>AI must know how to handle tool failures (e.g., JIRA API down)</li></ul><p><strong>4. Latency</strong>:</p><ul><li>Waiting for external tool results can slow down real-time conversation</li></ul><p><strong>5. Learning Curve for Testers</strong>:</p><ul><li>Understanding MCP’s structure and flow can take some time</li></ul><h3><strong>The Future of MCP in Testing</strong></h3><p>As test automation becomes more AI-driven, MCP will become a central pillar for intelligent testing assistants. From BDD story analysis to auto-triaging test failures, GenAI agents will rely on MCPs to:</p><ul><li>Parse requirements and auto-generate tests</li><li>Update progress in test management tools</li><li>Communicate with devs and PMs</li><li>Self-heal or retry failed automation cases</li></ul><p>Testers won’t be replaced but <strong>augmented</strong> with MCP-powered AI copilots.</p><h3><strong>Final Thoughts</strong></h3><p>Model Context Protocol isn’t just a technical standard — it’s the foundation that enables <strong>true collaboration between testers and GenAI systems</strong>. By connecting your favorite tools like JIRA, Slack, and Playwright to AI, you unlock intelligent workflows that were once only possible manually.</p><p>If you’re building or exploring GenAI in QA, start experimenting with MCP-enabled tools and see how your productivity transforms.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9fd806bc087" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Passion Project Turned Into Something Cool: AI-Powered STLC Tool!]]></title>
            <link>https://dheerajgambhir.medium.com/passion-project-turned-into-something-cool-ai-powered-stlc-tool-d97bb5d9fa9d?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/d97bb5d9fa9d</guid>
            <category><![CDATA[stlc]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Tue, 22 Apr 2025 14:41:10 GMT</pubDate>
            <atom:updated>2025-04-22T14:41:42.237Z</atom:updated>
            <content:encoded><![CDATA[<p>This brings a bit of magic to every phase of software testing!</p><p>🌟 <strong>What It Does</strong></p><p>✅ Streamlined Test Case Creation: Effortlessly create new test cases by providing requirements in the of text/image and eliminate the need for test case creation manually.</p><p>✅ Optimize Test Cases: Review and refine your test cases for maximum effectiveness.</p><p>✅ Q&amp;A: Ask questions related to uploaded test cases and get instant answer(s).</p><p>✅ Generate API Test Cases (Swagger/OpenAPI): Create test cases based on Swagger/OpenAPI specification URL.</p><p>✅ Automate Manual Test Cases: Convert manual test cases into boilerplate code for automation.</p><p>✅ Visual Validation: Compare expected and actual images with ease.</p><p>🛠 <strong>Tech Stack</strong></p><p>📦 LangChain + LLMs</p><p>📦 Streamlit for the UI</p><p>📦 Python for the backend</p><p>Still a work-in-progress, but already proving to be a fun and useful tool.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FsCKZeJzk56w%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DsCKZeJzk56w&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FsCKZeJzk56w%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bea31272b10c98f4a3319253612d1342/href">https://medium.com/media/bea31272b10c98f4a3319253612d1342/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d97bb5d9fa9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bruno vs Postman: Which API Client Should You Choose?]]></title>
            <link>https://dheerajgambhir.medium.com/bruno-vs-postman-which-api-client-should-you-choose-5f78ae92b3d4?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f78ae92b3d4</guid>
            <category><![CDATA[postman]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[bruno]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Tue, 22 Apr 2025 06:34:08 GMT</pubDate>
            <atom:updated>2025-04-22T06:34:08.460Z</atom:updated>
            <content:encoded><![CDATA[<p>As API testing becomes more central to modern software development, the tools we use to test, automate, and debug APIs can make a big difference. For years, Postman has been the go-to API client for developers and testers alike. But now, Bruno, a relatively new open-source API client, is making waves in the community.</p><p>Let’s break down how Bruno compares to Postman and why you might consider switching or using both depending on your use case.</p><p>✨ What is Bruno?</p><p>Bruno is an open-source, Git-friendly API client built for developers and testers who prefer simplicity, speed, and local-first development. It stores your API collections as plain text in your repo, making it easy to version, review, and collaborate on API definitions.</p><p>🌟 What is Postman?</p><p>Postman is a full-fledged API platform that offers everything from API testing, documentation, and automation to mock servers and monitoring. It comes with a polished UI, robust integration, and support for collaboration across teams.</p><p>🧵 Key Differences</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TLozgnD4YL5wtgiKZVBAhA.png" /></figure><p>🔍 Use Case Scenarios</p><ul><li>Use Bruno if:</li><li>You prefer Git-based workflows.</li><li>You want to keep API test cases under version control.</li><li>You work offline or locally most of the time.</li><li>You prioritize speed and minimalism.</li><li>Use Postman if:</li><li>You need advanced API management features (mocking, monitoring).</li><li>You work in a team and need built-in cloud collaboration.</li><li>You want a full API lifecycle platform with UI-rich interactions.</li></ul><p>🧪 From a QA Perspective</p><p>For testers who:</p><ul><li>Use Git for source control and automation,</li><li>Need to integrate API tests into CI/CD,</li><li>Prefer lightweight tools,</li></ul><p>Bruno is a strong, developer-friendly alternative.</p><p>However, for larger QA teams relying on:</p><ul><li>Built-in environments,</li><li>Global variables,</li><li>Mock servers and monitors,</li></ul><p>Postman still offers more features out of the box.</p><p>🧠 Final Thoughts</p><p>Bruno isn’t here to kill Postman — it’s here to offer freedom and control. In fact, many testers may find a hybrid approach useful: use Postman for collaboration-heavy work and Bruno for Git-based workflows and automation.</p><p>If you’re tired of syncing Postman collections manually or just want a snappy alternative, give Bruno a spin.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f78ae92b3d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Self-Healing Selenium Automation with Java — A Smarter Way to Handle Broken Locators]]></title>
            <link>https://dheerajgambhir.medium.com/self-healing-selenium-automation-with-java-a-smarter-way-to-handle-broken-locators-ec45c3b874e6?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec45c3b874e6</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[software-testing-journal]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Tue, 08 Apr 2025 09:31:13 GMT</pubDate>
            <atom:updated>2025-04-08T09:31:13.740Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>🔧 Self-Healing Selenium Automation with Java — A Smarter Way to Handle Broken Locators</strong></h3><p><strong>How to build smarter, more resilient automated tests?</strong></p><p>We’ve all been there — our Selenium test cases start failing because of minor UI changes like updated element IDs, renamed classes, or even reordered elements.</p><p>It’s frustrating, time-consuming, and often the most dreaded part of maintaining automated tests.</p><p>But what if your automation could heal itself?</p><p><strong>💡 What is Self-Healing Automation?</strong></p><p><strong>Self-healing automation</strong> refers to the capability of a test automation framework to recover from minor UI changes by automatically trying alternative locators when the primary one fails.</p><p>It’s like giving your test scripts a survival instinct.</p><p><strong>🔨 🛠️ Implementation in Java + Selenium: Step by Step</strong></p><p><strong>Step 1: Create a Self-Healing Wrapper</strong></p><p>We start by creating a custom class called SelfHealingDriver. This class wraps the standard WebDriver and handles locator failures gracefully.</p><blockquote><strong>public</strong> <strong>class</strong> SelfHealingDriver {</blockquote><blockquote><strong>private</strong> WebDriver driver;</blockquote><blockquote><strong>public</strong> SelfHealingDriver(WebDriver driver) {</blockquote><blockquote><strong>this</strong>.driver = driver;</blockquote><blockquote>}</blockquote><blockquote><strong>public</strong> WebElement findElement(By primaryLocator, List&lt;By&gt; alternativeLocators) {</blockquote><blockquote><strong>try</strong> {</blockquote><blockquote><strong>return</strong> driver.findElement(primaryLocator);</blockquote><blockquote>} <strong>catch</strong> (NoSuchElementException e) {</blockquote><blockquote>System.<strong><em>out</em></strong>.println(“Primary locator failed. Trying alternatives…”);</blockquote><blockquote><strong>for</strong> (By altLocator : alternativeLocators) {</blockquote><blockquote><strong>try</strong> {</blockquote><blockquote>WebElement altElement = driver.findElement(altLocator);</blockquote><blockquote>System.<strong><em>out</em></strong>.println(“Found element using alternative: “ + altLocator.toString());</blockquote><blockquote><strong>return</strong> altElement;</blockquote><blockquote>} <strong>catch</strong> (NoSuchElementException ignored) {}</blockquote><blockquote>}</blockquote><blockquote><strong>throw</strong> <strong>new</strong> NoSuchElementException(“Element not found with any locator”);</blockquote><blockquote>}</blockquote><blockquote>}</blockquote><blockquote>}</blockquote><p><strong>Step 2: Use It in Your Test</strong></p><p>Here’s how you’d use this wrapper in a real test:</p><blockquote><strong>public</strong> <strong>class</strong> TestSelfHealing {</blockquote><blockquote><strong>public</strong> <strong>static</strong> <strong>void</strong> main(String[] args) <strong>throws</strong> InterruptedException {</blockquote><blockquote>WebDriver driver = <strong>new</strong> ChromeDriver();</blockquote><blockquote>SelfHealingDriver healingDriver = <strong>new</strong> SelfHealingDriver(driver);</blockquote><blockquote>driver.get(“https://opensource-demo.orangehrmlive.com/web/index.php/auth/login&quot;);</blockquote><blockquote>driver.manage().window().maximize();</blockquote><blockquote>driver.manage().deleteAllCookies();</blockquote><blockquote>driver.manage().timeouts().implicitlyWait(10, TimeUnit.<strong><em>SECONDS</em></strong>);</blockquote><blockquote>By primary = By.<em>id</em>(“username”);</blockquote><blockquote>List&lt;By&gt; alternatives = Arrays.<em>asList</em>(</blockquote><blockquote>By.<em>name</em>(“username”),</blockquote><blockquote>By.<em>cssSelector</em>(“input[name=’username’]”),</blockquote><blockquote>By.<em>xpath</em>(“//input[contains(@placeholder, ‘User’)]”)</blockquote><blockquote>);</blockquote><blockquote>healingDriver.findElement(primary, alternatives).sendKeys(“Admin”);</blockquote><blockquote>Thread.<em>sleep</em>(2000);</blockquote><blockquote>driver.quit();</blockquote><blockquote>}</blockquote><blockquote>}</blockquote><p>Even if the id=”username” changes or disappears, your test can still pass as long as one of the alternative locators works.</p><p><strong>📈 Benefits</strong></p><p>✅ Reduces test flakiness due to minor UI changes<br> ✅ Saves time spent debugging failing tests<br> ✅ Boosts confidence in automation during CI/CD runs<br> ✅ Can be integrated into existing Selenium frameworks</p><p><strong>🧠 Bonus: Room for Innovation</strong></p><p>You can further improve this by:</p><ul><li>Logging fallback events for analysis</li><li>Capturing screenshots when healing kicks in</li><li>Integrating AI to generate and validate alternative locators</li><li>Using libraries like <a href="https://github.com/healenium/healenium-web">Healenium</a> for production-grade self-healing</li></ul><p><strong>🎯 Final Thoughts</strong></p><p>Test automation should be smart, resilient, and self-aware. By introducing a basic self-healing mechanism in your Java Selenium framework, you take a big step toward making your tests more reliable and less brittle.</p><p>Let your tests evolve — not break.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec45c3b874e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Overengineering: Why Test IDs Beat AI-Powered Locator Intelligence for UI Automation]]></title>
            <link>https://dheerajgambhir.medium.com/stop-overengineering-why-test-ids-beat-ai-powered-locator-intelligence-for-ui-automation-eebcbd0d5c38?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/eebcbd0d5c38</guid>
            <category><![CDATA[testid]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[locators-in-selenium]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Tue, 08 Apr 2025 09:28:22 GMT</pubDate>
            <atom:updated>2025-04-08T09:28:22.975Z</atom:updated>
            <content:encoded><![CDATA[<p>We have all read the blogs. We have all seen the charts showing how Generative AI can “revolutionize” test automation by magically resolving locators, self-healing broken selectors, and interpreting UI changes on the fly. There are many articles that paints a compelling picture of a future where tests maintain themselves.</p><p>Cool story. But let’s take a step back.</p><p>Why are we bending over backward to make tests <em>smart</em> enough to deal with ever-changing DOMs when there’s a simpler, far more sustainable answer staring us in the face?</p><ul><li>Just use <strong>Test IDs</strong>.</li></ul><p>That’s it. That’s the post. But since blogs are supposed to be more than one sentence, let’s unpack this a bit.</p><p>1. Test IDs Never Lie (or Change)</p><p>Good automation is about reliability and stability. Test IDs — like data-testid=”submit-button” — are predictable. They don’t break when a developer changes the CSS class, updates the layout, or renames an element. You know what you’re looking for, and it’s always there.</p><p>2. Why Teach AI What You Already Know?</p><p>Generative AI for testing is impressive, sure. It can “guess” the right element even if the locator changes. But why make the AI guess when you could just tell the DOM exactly what to look for from the start? AI should augment your testing strategy, not clean up a mess that could’ve been avoided with proper conventions.</p><p>3. Efficiency Beats Elegance in Testing</p><p>We’re not building art. We’re validating functionality. Test IDs are low-friction, high-impact tools. They cut through the noise. No need for complex AI models to resolve fuzzy locators or map intent to UI. A test ID is a direct line to what you care about. And it’s faster — both in test runtime and in human time.</p><p>4. Over-Engineering Doesn’t Scale</p><p>The Medium article talks about AI fixing flaky tests and adapting to UI changes. But let’s be real: this adds another layer of complexity. More moving parts. More things that can go wrong. More infrastructure to maintain. If your AI model fails, now your tests are broken, <em>and</em> you’ve got an AI debugging session on your hands. Why not prevent the flakiness in the first place with a simple, durable solution?</p><p>5. Developers Can (and Should) Help</p><p>Adding data-testid attributes is a tiny investment with massive payoff. It’s part of building testable software. Just like accessibility tags or semantic HTML, it’s about building UIs that <em>cooperate</em> with the tools that rely on them.</p><p>Note* You can keep chasing the AI-powered dream of resilient, self-healing test automation. Or you can just use test IDs and build a system that’s reliable from day one.</p><p>AI is great — but not when it’s solving a problem that shouldn’t exist in the first place.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eebcbd0d5c38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ScenarioContext.Current vs Context Injection in Specflow]]></title>
            <link>https://dheerajgambhir.medium.com/scenariocontext-current-vs-context-injection-in-specflow-9a5199b28cae?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a5199b28cae</guid>
            <category><![CDATA[specflow]]></category>
            <category><![CDATA[bdd]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Wed, 03 Jan 2024 10:06:37 GMT</pubDate>
            <atom:updated>2024-01-03T10:06:37.762Z</atom:updated>
            <content:encoded><![CDATA[<p>Within ScenarioContext in SpecFlow, there are two distinct ways to share data between steps in a scenario: context injection and current injection. Both approaches accomplish the same goal, but they are implemented differently.</p><p><strong>ScenarioContext.Current:</strong></p><p>A static attribute of the ScenarioContext class in SpecFlow is called ScenarioContext.Current. It offers a method for storing and retrieving data from various steps in the same scenario.</p><p>By putting values in the scenario context during one step and retrieving them in another, you can use ScenarioContext.Current to communicate data between steps.</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*IrMNkaNnGpaPeKcFhHqkfg.png" /></figure><p>While ScenarioContext.Current is convenient, it has some drawbacks, such as being static and potentially leading to difficulties with running scenarios in parallel. Therefore, with SpecFlow 3.0, ScenarioContext.Current is marked obsolete.</p><p><strong>Context Injection:</strong></p><p>Context injection allows you to use the step class’s constructor to directly inject the scenario context. The dependency injection method in SpecFlow is used to do this. These objects’ lifespan is restricted to the duration of a scenario.</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*XPxMXvcB9Tmg6BjBmZ-y5g.png" /></figure><p>Context injection is generally considered a more modern and flexible approach, especially for larger and more maintainable test suites.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a5199b28cae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to handle multiple environments in the Node.js framework?]]></title>
            <link>https://dheerajgambhir.medium.com/how-to-handle-multiple-environments-in-the-node-js-framework-bb125bc510ef?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb125bc510ef</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[dotenv]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Thu, 21 Dec 2023 05:55:34 GMT</pubDate>
            <atom:updated>2023-12-21T05:55:34.563Z</atom:updated>
            <content:encoded><![CDATA[<p>There are multiple ways to achieve it but one of the simplest ways is to use the <strong>Dotenv </strong>module.</p><p><strong>Dotenv </strong>is a lightweight and zero-dependency module that automatically loads environment variables from a .env file into the process.env object. Handling multiple environments using dotenv involves creating separate .env files for each environment (e.g., dev, testing, staging, production) and dynamically loading the appropriate file based on the current environment.</p><p>Here’s a step-by-step guide to follow:</p><p><strong>Step 1</strong>: Install <em>dotenv</em> Package (recommended- locally):<br><em>npm install dotenv –save</em></p><p><strong>Step 2</strong>: Create separate .env files for each environment. For example:<br><em>.env.dev for development<br>.env.test for testing<br>.env.stage for staging<br>.env.prod for production</em></p><p>Each file should contain environment-specific configuration variables. For instance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/0*wes0FOA-hYTKMBBj.png" /></figure><p><strong>Step 3</strong>: Configure your application to read environment-specific variables:</p><p>Here’s an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*1Pc8cxEzEjZ7-a3M.png" /></figure><p><strong>Step 4</strong>: How to access the environment variables?<br>Accessing your variables is very easy. They are attached to the process.env object, so you can access them using <em>process.env.KEY</em>. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*Sl3QQjaBS1dqxtRk.png" /></figure><p><strong>Step 5</strong>: Set the active environment:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/0*z1rRiB2YUrTTmEcl.png" /></figure><p>Notes:</p><ol><li>Ensure that the .env file is in the root directory of your project.</li><li>Employ proper error handling to catch cases where required variables are not defined.</li><li>Exclude .env files from version control (e.g., add them to .gitignore) to avoid exposing sensitive data like authentication keys and passwords.</li></ol><p>Read more here: <a href="https://www.npmjs.com/package/dotenv">https://www.npmjs.com/package/dotenv</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb125bc510ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sensitive Data in Azure Pipelines — Azure Variable Groups (Benefits and Real-World Examples)]]></title>
            <link>https://dheerajgambhir.medium.com/sensitive-data-in-azure-pipelines-azure-variable-groups-benefits-and-real-world-examples-1c3d2038e95e?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c3d2038e95e</guid>
            <category><![CDATA[azure-variables]]></category>
            <category><![CDATA[azure-devops]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Tue, 27 Jun 2023 08:07:09 GMT</pubDate>
            <atom:updated>2023-06-27T08:15:26.872Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Sensitive Data in Azure Pipelines — Azure Variable Groups (Benefits and </strong>Real-World Examples)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*3_zaLWWTS0EnwlUFadfhvA.png" /></figure><p>Secret variables are variables that are encrypted and can be used in pipelines without having their value revealed. You can use secret variables to store confidential information like passwords, identification numbers, and other identifying information that you wouldn’t want to be exposed in a pipeline. Secret variables are accessible to tasks and scripts on the agent and are encrypted at rest with a 2048-bit RSA key.</p><p>Secret variables specified in a pipeline’s pipeline settings UI are only applicable to that pipeline. To share confidential variables between pipelines, utilize variable groups.</p><p><strong>What are Azure Variable Groups?</strong></p><p>Key-value pairs, or variables, can be used in many pipelines and stages of an Azure DevOps project and are managed centrally by Azure Variable Groups. These variables can be used to store configuration values that may change depending on the environment (such as development, staging, or production), as well as private data like connection strings or API keys. Through the deployment pipeline, Variable Groups make it easier to manage these variables consistently.</p><p><strong>How to Create a Variable Group?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*rTP3Xoxk3H88nlIgpyT5Lg.png" /></figure><p><strong>How to add a variable with encrypted value to a Variable Group?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*X0q74wZ2lkUKnEIrOhGnWQ.png" /></figure><p><strong>How to link a variable from a Variable Group to a pipeline and define its scope?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*LmedvmwIOsdjMBaV3Gj_PA.png" /></figure><p><strong>Managing Secrets in Azure Variable Groups:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*-MWRu5dftCc6UhjOLp-2MQ.png" /></figure><p><strong>Benefits of Azure Variable Groups:</strong></p><p>1. <em>Reusability</em>: Variable Groups let you declare variables once and use them again across several pipelines, encouraging uniformity and lowering the possibility of human entry errors.</p><p>2. <em>Centralised Management</em>: By managing variables in a single area with Variable Groups, you may update values and transmit changes more quickly throughout your pipelines.</p><p>3. <em>Security</em>: To protect sensitive data, Azure Variable Groups support secret variables, which are encrypted and can only be viewed during pipeline execution.</p><p>4. <em>Versioning: </em>It is supported through variable groups, enabling you to follow changes over time. When debugging or auditing deployments, this functionality is helpful.</p><p>5. <em>Integration with CI/CD Pipelines</em>: Azure Variable Groups and other CI/CD technologies are smoothly integrated with Azure Pipelines. It is simple to retrieve and use variables during the build and release processes since they are simply referred to within pipeline specifications.</p><p><strong>Real-World Examples:</strong></p><p>1. <em>API Keys and Secrets</em>: It’s typical to have API keys or secrets for each environment when working with third-party APIs. You can construct variables like “API_KEY_DEV,” “API_KEY_STAGING,” and “API_KEY_PROD” and safely store the appropriate keys or secrets using Azure Variable Groups. This makes it possible for you to migrate between environments without having to manually change your pipelines or reveal sensitive data.</p><p>2. <em>Database Connection Strings</em>: Assume that one of your applications connects to a database and that the connection string differs depending on the environment. You can construct environment-specific variables like “DB_CONNECTION_STRING_DEV,” “DB_CONNECTION_STRING_STAGING,” and “DB_CONNECTION_STRING_PROD” by building a Variable Group for connection strings. Your deployment pipeline can then make use of these variables to make sure the appropriate connection string is utilized based on the destination environment.</p><p>3. <em>Feature flags and configuration settings</em>: Environments frequently have different feature flags and configuration settings. By using Variable Groups, you can quickly manage the behavior and settings of your application during deployment by defining environment-specific variables like “FEATURE_FLAG_DEV” or “CONFIG_SETTING_STAGING”.</p><p><strong>Summary:</strong></p><p>Azure Variable Groups offer centralized configuration management, reuse, improved security, versioning, and connection with<strong> </strong>CI/CD pipelines. By utilizing these advantages, you may increase consistency, accelerate the deployment of your applications, and manage variables and configurations in Azure DevOps more easily.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c3d2038e95e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to pass a variable value between Azure Pipeline jobs (within the same stage)?]]></title>
            <link>https://dheerajgambhir.medium.com/how-to-pass-a-variable-value-between-azure-pipeline-jobs-within-the-same-stage-2dd2a57a8765?source=rss-b2ba36cc1604------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dd2a57a8765</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-devops]]></category>
            <dc:creator><![CDATA[Dheeraj Gambhir]]></dc:creator>
            <pubDate>Wed, 24 May 2023 08:47:05 GMT</pubDate>
            <atom:updated>2023-05-24T08:47:05.887Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*-BVTOkqmoEJiJVg8rni3gA.png" /></figure><p>Since the jobs operate in different namespaces, passing variable values between them is unlike passing a variable value from one function to another.</p><p>In the example below, $app_Token is the variable name that needs to be sent from one job to another job but within the same stage.</p><p>This issue can be resolved by dynamically storing the variable in the variable library and retrieving its value from there. The task.setvariable command, which is illustrated below, is required to store variables using PowerShell in the Azure Pipeline library.</p><pre># Maven<br># Build your Java project and run tests with Apache Maven.<br># Add steps that analyze code, save build artifacts, deploy, and more:<br># https://docs.microsoft.com/azure/devops/pipelines/languages/java<br><br>trigger:<br>- master<br><br>stages:<br>  - stage: VariableUpdateAutomation<br>    jobs:<br>    - job: Set_AppTokenValue<br>      pool:<br>        vmImage: ubuntu-latest<br>      steps:<br>      - task: PowerShell@2<br>        name: Set_AppTokenValue<br>        inputs:<br>          targetType: &#39;inline&#39;<br>          script: |          <br>            $app_Token =  &#39;$(APPTOKEN)&#39; #Reading APPTOKEN variable value<br>            Write-Output &quot;The app token value till now is: $app_Token&quot;<br>            $app_Token = &quot;ABCDE12345&quot;<br>            echo &quot;##vso[task.setvariable variable=AppToken;isOutput=true]$app_Token&quot; <br>            #Updating app_Token value from ABCDE12345 with the value that we have in variables<br>    <br>    - job: Get_AppTokenValue<br>      dependsOn: Set_AppTokenValue<br>      variables:<br>      - name: BSAppToken<br>        value: $[ dependencies.Set_AppTokenValue.outputs[&#39;Set_AppTokenValue.AppToken&#39;] ]<br>      pool:<br>        vmImage: ubuntu-latest<br>      steps:<br>      - task: PowerShell@2<br>        inputs:<br>          targetType: &#39;inline&#39;<br>          script: |<br>            echo &quot;Value of AppToken in this Job is = $(BSAppToken)&quot;</pre><p><strong>Note</strong>: This task variable only pertains to that stage. In the new stage, you can’t use the task variable value directly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dd2a57a8765" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>