<?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"><channel><title><![CDATA[Finalrun]]></title><description><![CDATA[FinalRun’s blog shares our journey building smarter mobile test automation, solving flakiness, speed, and locator pain to help teams ship quality apps, faster.]]></description><link>https://blogs.finalrun.app</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 02:28:38 GMT</lastBuildDate><atom:link href="https://blogs.finalrun.app/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Why We Open Sourced Finalrun]]></title><description><![CDATA[https://github.com/final-run/finalrun-agent

We built Finalrun because every mobile test suite we'd worked on had the same lifecycle: someone writes it, it works for a sprint, and then a UI tweak brea]]></description><link>https://blogs.finalrun.app/why-we-open-sourced-finalrun</link><guid isPermaLink="true">https://blogs.finalrun.app/why-we-open-sourced-finalrun</guid><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Tue, 07 Apr 2026 23:47:15 GMT</pubDate><content:encoded><![CDATA[<p><a class="embed-card" href="https://github.com/final-run/finalrun-agent">https://github.com/final-run/finalrun-agent</a></p>

<p>We built Finalrun because every mobile test suite we'd worked on had the same lifecycle: someone writes it, it works for a sprint, and then a UI tweak breaks half the selectors. You spend more time babysitting the tests than writing features. We got tired of it and went looking for something fundamentally different — and what we found felt too useful to keep closed.</p>
<h2>The Idea That Actually Worked</h2>
<p>What if tests could just <em>look</em> at the screen the way a person does?</p>
<p>We started building a vision-based agent that uses screen understanding instead of brittle locators like XPath or accessibility IDs. You describe what you want in plain English — "tap the login button," "scroll to the pricing section," "verify the confirmation message" — and the agent figures out where things are visually.</p>
<p>That part worked surprisingly well. The agent could interpret intent, find elements on screen, and execute actions reliably across both Android and iOS. No element trees. No platform-specific selector syntax. Just natural language and a screenshot.</p>
<p>But the <em>real</em> problem wasn't execution. It was everything that happens before the test runs.</p>
<h2>Where Test Flows Actually Break Down</h2>
<p>The typical approach is to define test flows outside your codebase. Maybe a QA engineer writes them manually. Maybe they get generated from a PRD. Either way, they live in a separate world from your source code.</p>
<p>This works until it doesn't. The app changes. A screen gets renamed. A flow gets restructured. The tests don't know about any of it. Before long, you're maintaining two sources of truth that are drifting further apart every week.</p>
<p>We tried a second approach: generating tests directly from the codebase using MCP, pulling in component structure, navigation flows, and screen definitions to build test cases that actually reflect the current state of the app. This improved sync significantly — tests knew what the app looked like <em>right now</em> — but the tradeoffs were real. Token usage was high, and generation was slow.</p>
<h2>The Shift: Tests Should Live With the Code</h2>
<p>The breakthrough wasn't a technical trick. It was a framing change.</p>
<p>Test generation shouldn't be a one-off step that produces artifacts you then manage separately. Tests need to live alongside the codebase so they have continuous access to context and stay in sync as the app evolves. When a developer changes a screen, the tests should know about it — not because someone remembered to update a spec, but because the test definitions are rooted in the same repo.</p>
<p>So we kept the vision-based execution (no selectors, no fragile locators) and moved test generation closer to the repository. The result is a system where tests are generated from codebase context, defined as YAML-based flows, and executed visually.</p>
<h2>What This Looks Like in Practice</h2>
<p>The workflow breaks down into three pieces:</p>
<p><strong>Generate from context.</strong> Tests are produced from actual codebase structure — routes, components, screen definitions — not guesswork or stale documentation.</p>
<p><strong>Define as YAML.</strong> Test flows are expressed in a simple, readable YAML format. Easy to version, easy to review in a PR, easy to extend.</p>
<p><strong>Execute with vision.</strong> The agent runs tests by looking at the screen, not by querying an element tree. This works across Android and iOS without platform-specific test code.</p>
<p>The most interesting scenario is what we call the <em>post-development handoff</em>. An AI builds a feature inside an IDE. Immediately after, the agent generates a test from the updated codebase and executes it visually — verifying that the feature the AI just wrote actually works on a real device. No human in the loop for the testing step.</p>
<h2>Why Open Source</h2>
<p>We could have kept this closed and built a product around it. But the problem — flaky, out-of-sync mobile tests — is too widespread, and the approach is too early to develop in a vacuum. Vision-based testing needs to be stress-tested across real codebases, real devices, and real workflows. The fastest way to get there is to let others break it, fix it, and push it further.</p>
<p>The core pieces are all here:</p>
<ul>
<li><p><strong>Repo:</strong> <a href="https://github.com/final-run/finalrun-agent">github.com/final-run/finalrun-agent</a></p>
</li>
<li><p><strong>Demo:</strong> <a href="https://youtu.be/rJCw3p0PHr4">Watch the post-development handoff in action</a></p>
</li>
</ul>
<p>The demo walks through the full cycle — AI builds a feature, Finalrun generates a vision-based test, and the test runs on device. It's the workflow we wanted when we started down this path: tests that keep up with the code, execute like a human would, and don't fall apart the moment someone moves a button three pixels to the left.</p>
<hr />
<p><em>If you've been fighting flaky mobile test suites, we'd love to hear what you've tried. Open an issue on the repo or reach out — this is very much a work in progress.</em></p>
]]></content:encoded></item><item><title><![CDATA[🏆 FinalRun achieves the New #1 SOTA Mobile Agent Eclipsing Benchmarks at 97.4%]]></title><description><![CDATA[We are thrilled to announce FinalRun, a revolutionary Android UI agent that has officially secured the #1 spot on the leaderboard with an unprecedented 97.4% Success Rate. Not only does FinalRun achie]]></description><link>https://blogs.finalrun.app/finalrun-achieves-the-new-1-sota-mobile-agent-eclipsing-benchmarks-at-97-4</link><guid isPermaLink="true">https://blogs.finalrun.app/finalrun-achieves-the-new-1-sota-mobile-agent-eclipsing-benchmarks-at-97-4</guid><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Wed, 18 Mar 2026 04:00:56 GMT</pubDate><content:encoded><![CDATA[<p>We are thrilled to announce <a href="https://finalrun.app"><strong>FinalRun</strong></a>, a revolutionary Android UI agent that has officially secured the #1 spot on the leaderboard with an unprecedented <strong>97.4% Success Rate</strong>. Not only does FinalRun achieve the highest accuracy ever recorded, but it is fundamentally engineered to be <strong>faster and significantly cheaper</strong> than any other agent currently on the benchmark list.</p>
<p>By rethinking how AI agents perceive UI hierarchies, handle real-time states, and process errors, FinalRun sets a new gold standard for autonomous mobile execution.</p>
<hr />
<img src="https://cdn.hashnode.com/uploads/covers/687a10136bb0eb22986499e2/55d40c4f-fb3d-4006-a1f6-a74588cdf8a2.png" alt="" style="display:block;margin:0 auto" />

<h2>The Race for the Ultimate UI Agent</h2>
<p>Building an AI agent that can reliably navigate the dynamic, asynchronous environment of a mobile operating system is notoriously difficult. Traditional agents stumble on UI animations, hallucinate successful actions, and incur massive inference costs due to bloated observation spaces.</p>
<p>With <strong>FinalRun</strong>, we completely reimagined the perception-action loop. We focused not just on <em>reasoning capability</em>, but on <em>execution reliability</em> and <em>cost efficiency</em>. The result? A staggering 97.4% task completion rate that operates faster and cheaper than the previous state-of-the-art.</p>
<p>Here are the four core breakthroughs that power FinalRun:</p>
<h3>1. ⚡ Optimized Hierarchy</h3>
<p>The biggest bottleneck for mobile agents is the massive context window required to read Android UI trees (XML). FinalRun utilizes a highly <strong>Optimized UI Hierarchy</strong>, aggressively pruning irrelevant nodes.</p>
<ul>
<li><p><strong>Cheaper &amp; Smarter:</strong> By pairing this lightweight hierarchy with <strong>Gemini Flash</strong> and <strong>Flash Lite</strong>, we drastically reduced token consumption. The cost per task is a fraction of what competing agents require.</p>
</li>
<li><p><strong>Blazing Fast:</strong> Powered by Gemini Flash and Gemini Flash light</p>
</li>
<li><p><strong>Image Stabilization Check:</strong> Speed means nothing if the agent clicks while the screen is still loading. FinalRun introduces a deterministic stabilization check—requiring <strong>at least 3 consecutive stable image frames</strong>—before concluding the UI has settled. This entirely eliminates misclicks caused by mid-animation transitions.</p>
</li>
</ul>
<h3>2. 📝 Native Text Editing Mastery</h3>
<p>Manipulating text fields is a common failure point for MLLMs, which often try to backspace infinitely or struggle with cursor placement. FinalRun features a dedicated <strong>Text Editing Agent</strong> that interacts with the OS the same way a human power-user does. When specific text needs to be deleted, the agent executes a <strong>Long Press</strong> to trigger the Android system’s native context menu, utilizing default options to <strong>"Select All"</strong> and <strong>"Delete"</strong>. This native approach guarantees 100% precision in text manipulation, avoiding the erratic behavior seen in previous SOTA agents.</p>
<h3>3. 🔄 Closed-Loop Failure Feedback</h3>
<p>A major flaw in traditional UI agents is the "blind assumption of success"—the agent issues a click command and blindly assumes the task moved forward. FinalRun introduces a strict <strong>Failure Feedback Loop</strong>. If a grounding action (e.g., attempting to tap a coordinate or element) fails at the system level, this failure is immediately fed back into the agent's context. The agent knows exactly <em>why</em> the action failed, preventing it from hallucinating task completion and allowing it to instantly recalculate a new path to success.</p>
<h3>4. 📸 Just-In-Time (JIT) Grounding</h3>
<p>Mobile UIs are highly volatile; pop-ups, notifications, or network-delayed renders can change the screen state in milliseconds. Traditional agents evaluate a screenshot, spend seconds "thinking," and then execute a click on a screen that may have already changed. FinalRun solves this race condition by <strong>capturing a fresh screenshot immediately before performing any grounding action</strong>. This ensures that all coordinates and actions are executed against the <em>absolute latest</em> UI state. This Just-In-Time perception captures errors faster, prevents catastrophic misclicks, and ensures a truly real-time interaction loop.</p>
<hr />
<h2>The Future of Mobile Automation is Here</h2>
<p>Achieving 97.4% on complex mobile benchmarks proves that reliable, production-ready mobile AI is no longer a theoretical concept. By combining the raw speed of Gemini Flash, an optimized UI hierarchy, and robust, human-like execution safeguards, FinalRun is unequivocally the fastest, cheapest, and most capable Android agent in the world.</p>
<p><em>Welcome to the new SOTA.</em></p>
<p>We’re open-sourcing the agent soon</p>
<p><a href="https://docs.google.com/forms/d/1EwHjqK6t1pBQgsKWih1Z_hQqP837elhl7hVbUGLHqV0">Notify me when it's open source →</a></p>
]]></content:encoded></item><item><title><![CDATA[Spec-Driven Testing for Mobile apps (Preparing for Open Source Soon)]]></title><description><![CDATA[Finalrun introduces spec-driven, vision-based mobile testing to dramatically reduce flaky UI tests. Open source release coming soon.
TL;DR
Mobile UI tests are brittle. We built a spec-driven QA Agent ]]></description><link>https://blogs.finalrun.app/spec-driven-testing-for-mobile-apps-preparing-for-open-source-soon</link><guid isPermaLink="true">https://blogs.finalrun.app/spec-driven-testing-for-mobile-apps-preparing-for-open-source-soon</guid><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Mon, 16 Mar 2026 06:07:53 GMT</pubDate><content:encoded><![CDATA[<p>Finalrun introduces spec-driven, vision-based mobile testing to dramatically reduce flaky UI tests. Open source release coming soon.</p>
<p>TL;DR</p>
<p>Mobile UI tests are brittle. We built a spec-driven QA Agent that:</p>
<blockquote>
<p>runs plain-English test specs,</p>
<p>“sees” the app visually (like a human), and</p>
<p>uses code-aware AI skills to auto-generate and maintain robust specs as your code grows.</p>
</blockquote>
<p>We’re open-sourcing the agent soon</p>
<p><a href="https://docs.google.com/forms/d/1EwHjqK6t1pBQgsKWih1Z_hQqP837elhl7hVbUGLHqV0">Notify me when it's open source →</a></p>
<p>Quick overview of how this works right now.</p>
<p><a class="embed-card" href="https://youtu.be/SsVHRDWk_ss">https://youtu.be/SsVHRDWk_ss</a></p>

<h3>1. The Nightmare of Mobile Testing</h3>
<p>If you’ve ever worked on a mobile app, you know the pain of automated UI testing. You write a perfectly good test on Monday. On Tuesday, it fails. You check the app—everything works fine.</p>
<p>This is the dreaded <strong>"flaky test."</strong></p>
<p>It’s a test that fails not because your app is broken, but because the test itself is confused. Flaky tests destroy trust in your QA process, slow down releases, and turn automation into a massive headache.</p>
<h3>2. Why Are Tests So Brittle?</h3>
<p>The root of the problem lies in how traditional mobile tests are built.</p>
<p>Historically, we write tests that act like rigid robots blindly following a map. We tell the code, <em>"Wait exactly 3 seconds, then click the element with the exact hidden ID of 'button_xyz_123'."</em></p>
<p>But mobile apps are dynamic. What if the network is slow and the page takes 4 seconds to load? What if a developer slightly changes the layout, or renames that hidden ID? The app still works perfectly for a human user, but the "robot" test crashes immediately.</p>
<p>Because of this, <strong>test maintenance becomes a full-time job.</strong> Teams end up spending more time fixing broken tests than actually building new features.</p>
<h3>3. The Solution: Spec-Driven Testing with Finalrun</h3>
<p>What if we stopped writing rigid code and started writing tests the way humans actually talk?</p>
<p>Enter <strong>Spec-Driven Testing</strong> powered by the <strong>Finalrun QA Agent</strong>.</p>
<p>Instead of writing complex automation scripts, you write a "Specification" (or Spec) in plain, simple text. Your test file literally looks like this:</p>
<ul>
<li><p><em>Tap on "Settings"</em></p>
</li>
<li><p><em>Tap on "Language"</em></p>
</li>
<li><p><em>Search for "Spanish"</em></p>
</li>
<li><p><em>Verify that "Español" appears on the screen.</em></p>
</li>
</ul>
<p>The Finalrun QA Agent reads these plain-English instructions and interacts with the app visually, exactly like a human would. It doesn't care about hidden code IDs. If a button moves slightly to the left, the Agent still sees it and taps it. By shifting from rigid code to human-readable specs, the tests become incredibly stable and easy to read.</p>
<h3>4. The Human Bottleneck</h3>
<p>This sounds like the perfect solution, right? But there is a catch.</p>
<p>Even if writing tests is as easy as typing plain English, <strong>humans are still prone to error.</strong></p>
<p>If you ask a human to write out the specs for every possible user journey, they <em>will</em> miss things. We forget edge cases. We forget to write the crucial "cleanup" steps (like ensuring the app is logged out before a login test begins). Relying purely on humans to imagine and write every single test spec means your app is still vulnerable to bugs slipping through the cracks.</p>
<h3>5. AI "Skills" to the Rescue</h3>
<p>To completely solve this, we don't just need an AI that can <em>read</em> specs; we need an AI that can <em>write</em> them.</p>
<p>We achieve this by giving the Finalrun QA Agent specific <strong>"Skills."</strong> Think of a Skill as a superpower that allows the AI to understand your app from the inside out.</p>
<p>Instead of a QA engineer spending hours manually clicking through the app to write down test steps, the AI uses a basic skill to read your app's actual source code, figure out how the screens connect, and write the test specs for you.</p>
<h3>6. How the generate-test-spec Skill Works</h3>
<p>Let’s look at a practical example. We equip the agent with a skill called generate-test-spec.</p>
<p>You simply tell the AI: <em>"Create the critical flows for adding the Spanish language to the app."</em></p>
<p>Using its skill, the AI doesn't just guess. It dives into your codebase, analyzes the user interface components, and maps out the exact paths a user would take. It then automatically generates perfectly formatted, markdown-based Test Specs.</p>
<p>It handles the things humans forget. The AI will automatically write steps to:</p>
<ul>
<li><p><strong>Setup:</strong> Make sure the app is in the right state before starting.</p>
</li>
<li><p><strong>Execute:</strong> The step-by-step taps and text inputs.</p>
</li>
<li><p><strong>Verify:</strong> The final checks to ensure the action was successful.</p>
</li>
</ul>
<h3>7. Running the Magic</h3>
<p>Once the AI has used its skill to generate the plain-text specification file (for example, add_spanish_settings.md), executing it is brilliantly simple.</p>
<p>You don't need to compile complex automation suites. You just open your terminal and type:</p>
<blockquote>
<p>./mobile-cli run ./test/add_spanish_settings.md</p>
</blockquote>
<p><a class="embed-card" href="https://youtu.be/SsVHRDWk_ss">https://youtu.be/SsVHRDWk_ss</a></p>

<p>Instantly, the Finalrun agent takes over your mobile simulator. It reads the AI-generated English instructions and physically executes the test on the screen, navigating menus and verifying text just like a real person.</p>
<p>No flaky locators. No endless maintenance. Just clean, readable, AI-driven QA.</p>
<h3>🚀 Be the First to Try It: We Are Going Open Source!</h3>
<p>We believe that accessible, spec-driven AI is the future of mobile app testing, and we want to share it with the community.</p>
<p><strong>We will be open-sourcing the Finalrun QA Agent very soon.</strong></p>
<p>Want to be the first to know when the repo drops? and join the revolution against flaky tests!<br /><a href="https://docs.google.com/forms/d/1EwHjqK6t1pBQgsKWih1Z_hQqP837elhl7hVbUGLHqV0">Notify me when it's open source →</a></p>
]]></content:encoded></item><item><title><![CDATA[Why Mobile End-to-End Testing Fails: It's Not the Team's Fault. Its the tools]]></title><description><![CDATA[You've been there. A new version of your mobile app is ready to ship. The features are built, but a nagging uncertainty remains: "Did we break something?"
End-to-end (E2E) testing should provide this confidence, but it rarely does. More often, it's a...]]></description><link>https://blogs.finalrun.app/why-mobile-end-to-end-testing-fails-its-not-the-teams-fault-its-the-tools</link><guid isPermaLink="true">https://blogs.finalrun.app/why-mobile-end-to-end-testing-fails-its-not-the-teams-fault-its-the-tools</guid><category><![CDATA[end to end testing]]></category><category><![CDATA[mobiletesting]]></category><category><![CDATA[QA]]></category><category><![CDATA[aitools]]></category><category><![CDATA[Finalrun]]></category><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Mon, 18 Aug 2025 13:38:14 GMT</pubDate><content:encoded><![CDATA[<p>You've been there. A new version of your mobile app is ready to ship. The features are built, but a nagging uncertainty remains: "Did we break something?"</p>
<p>End-to-end (E2E) testing should provide this confidence, but it rarely does. More often, it's a source of frustration. Tests are flaky, slow, and live in a separate world owned by a handful of specialists. The result? Teams either ship with anxiety or delay releases, caught in a cycle of manual regression testing.</p>
<p>The problem isn't the team's desire for quality. It's that traditional E2E testing is fundamentally broken. Here are the real reasons it fails, and how we're working to change that.</p>
<hr />
<h3 id="heading-1-the-time-amp-deadline-trap"><strong>1. The Time &amp; Deadline Trap</strong></h3>
<p>This is the number one killer of quality. Stakeholders want to "ship fast," and robust E2E testing is perceived as the slowest part of the process.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755523857821/5f354bed-d5b7-44a3-800f-f8a7b6e17f4e.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p><strong>The Perception:</strong> E2E tests are brittle scripts that take a long time to write and even longer to run. Faced with a tight deadline, the team makes a difficult choice: cut down the test suite or risk delaying the launch.</p>
</li>
<li><p><strong>The Reality:</strong> This isn't laziness; it's a system failure. The immediate pressure of the release schedule will always win against a testing process that delivers its verdict hours—or even days—later. The feedback loop is simply too long to be practical.</p>
</li>
</ul>
<h3 id="heading-2-the-friction-of-mobile-testing"><strong>2. The Friction of Mobile Testing</strong></h3>
<p>Even with time and resources, the sheer complexity of mobile E2E testing creates a massive barrier.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755523981504/1b531a99-71cb-4c57-93a1-7217c2eb2465.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p><strong>The Setup Cost:</strong> Meaningful mobile testing requires managing device farms, simulators/emulators, different OS versions, and complex app states. This is specialized knowledge, and the effort required is so high that most developers are locked out of the process entirely.</p>
</li>
<li><p><strong>Brittle Scripts, Not Real Flows:</strong> Traditional E2E tests are often imperative scripts that break with the smallest UI change. They test implementation details, not the actual user journey. This means they require constant, painful maintenance.</p>
</li>
</ul>
<h3 id="heading-3-the-quality-gatekeeper-silo"><strong>3. The "Quality Gatekeeper" Silo</strong></h3>
<p>Many organizations isolate E2E testing within a dedicated QA team. While well-intentioned, this creates a dangerous disconnect.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1755524065207/673ad00a-bbf2-40e5-97a0-d8ed397e2615.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p><strong>Delegated Responsibility:</strong> When testing is "someone else's job," developers and product managers become disconnected from the user experience. Quality becomes a gate they must pass through, not a shared objective. The QA team becomes a bottleneck, manually testing flows and reporting bugs back to developers, slowing everything down.</p>
</li>
<li><p><strong>Lack of Visibility:</strong> The outcome of tests often lives in a separate dashboard, away from where the rest of the team works. PMs can't easily see if a critical user flow is working, and developers don't get immediate, actionable feedback in their workflow.</p>
</li>
</ul>
<hr />
<h3 id="heading-how-finalrun-realigns-the-team-on-quality"><strong>How Finalrun Realigns the Team on Quality</strong></h3>
<p>The problem isn't the people; it's the process and the tools. Finalrun was built to make end-to-end mobile testing a fast, collaborative, and integrated part of the development lifecycle, empowering the entire team.</p>
<p>We solve the core issues head-on:</p>
<p><strong>1. Making End-to-End Mobile Testing Effortless:</strong> Finalrun removes the technical complexity. Instead of writing brittle code, your team can <strong>describe any user flow</strong> in a simple, intuitive way. Our platform handles the rest—running these flows on real devices and providing clear results. By integrating seamlessly into your <strong>CI/CD pipeline</strong>, testing becomes an automated, reliable part of every single build.</p>
<p><strong>2. Creating a Faster Feedback Loop for Everyone:</strong> Finalrun doesn't just run tests; it delivers insights, fast. When a test fails, it's not just a red checkmark in a forgotten dashboard. Your team gets detailed reports, videos, and logs directly in their existing workflow. This allows developers to see exactly what went wrong and fix it immediately, transforming the feedback loop from days to minutes.</p>
<p><strong>3. A Shared Platform for Developers, QA, PMs, and Managers:</strong> Quality is a team sport. Finalrun is the platform where everyone can collaborate.</p>
<ul>
<li><p><strong>For Developers:</strong> Get immediate, reliable feedback on your code's impact on critical user flows without ever leaving your workflow.</p>
</li>
<li><p><strong>For QAs:</strong> Move from manual execution to quality strategy. Define, manage, and monitor all critical user journeys in one place, freeing you up to focus on exploratory testing and edge cases.</p>
</li>
<li><p><strong>For PMs &amp; Engineering Managers:</strong> Gain unprecedented visibility. Confidently know the status of every core feature and user flow before a release. Make data-driven decisions and ensure the product you planned is the product you ship.</p>
</li>
</ul>
<p>Let's stop accepting that mobile E2E testing has to be slow and painful. It's time for a tool that makes shipping with confidence the fastest and easiest way to work.</p>
<h2 id="heading-related-reading"><strong>Related Reading</strong></h2>
<p>If you want to know how we are achieving 99% accuracy UI automation with <a target="_blank" href="https://finalrun.app">Finalrun</a>. Read the following articles:</p>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong>How We Set Out to Solve the XPath Problem in Mobile UI Test Autom</strong></a><a target="_blank" href="https://hashnode.com/post/cmd8m76mq000802ie8dh0g08d"><strong>ation</strong></a></p>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong>The future of UI Element Targetting:</strong></a> <a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong>Finalrun Identifiers beats Xpath</strong></a></p>
<p><a target="_blank" href="https://hashnode.com/post/cmd8tlhm9001b02jp4g664kxu"><strong>Why LLMs Like ChatGPT, Gemini, and Claude Understand FinalRun Identifiers Better Than XPath</strong></a></p>
<blockquote>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong><em>📅</em></strong></a> <a target="_blank" href="https://calendly.com/arnold-finalrun/30min">Book a Demo</a><br />See how FinalRun fits into your existing workflow with a live Demo</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Mobile End-to-End Testing Tools in 2025]]></title><description><![CDATA[In the complex world of mobile development, a passing unit test provides a sigh of relief, but it doesn't guarantee a flawless user experience. Modern applications are intricate ecosystems of UI elements, backend services, third-party integrations, a...]]></description><link>https://blogs.finalrun.app/mobile-end-to-end-testing-tools-in-2025</link><guid isPermaLink="true">https://blogs.finalrun.app/mobile-end-to-end-testing-tools-in-2025</guid><category><![CDATA[toolsin2025]]></category><category><![CDATA[end to end testing]]></category><category><![CDATA[AI Testing Tools]]></category><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Mon, 18 Aug 2025 13:04:11 GMT</pubDate><content:encoded><![CDATA[<p>In the complex world of mobile development, a passing unit test provides a sigh of relief, but it doesn't guarantee a flawless user experience. Modern applications are intricate ecosystems of UI elements, backend services, third-party integrations, and platform-specific behaviors. End-to-end (E2E) testing is the only methodology that validates the entire user journey, from login to logout, ensuring every component works in concert.</p>
<p>However, "doing E2E testing" is not as simple as picking a popular tool. The choice of framework is a critical decision that impacts your team's workflow, your application's architecture, and your long-term automation strategy. This guide provides a detailed technical breakdown of the leading mobile E2E testing frameworks, exploring their core architecture, strengths, trade-offs, and ideal use cases.</p>
<h3 id="heading-the-foundational-choice-gray-box-vs-black-box-testing">The Foundational Choice: Gray-Box vs. Black-Box Testing</h3>
<p>Mobile testing frameworks fundamentally fall into two architectural categories: gray-box and black-box. Understanding this distinction is the first step to choosing the right tool.</p>
<ul>
<li><p><strong>Gray-Box Frameworks (Espresso, XCUITest, Detox):</strong> These tools operate from <em>within</em> the application. The test code is bundled with the app in a special build, allowing the test and the app to share the same memory and threads. This intimate connection gives the framework programmatic access to the app's internal state. It can directly check if a background process is running or if a UI element has finished rendering without just guessing from the visual output. This "in-process" nature is their greatest strength, leading to incredibly fast and reliable tests because they can synchronize with the app's UI thread, eliminating the flakiness that plagues mobile automation. The trade-off is a lack of worldview; they are confined to their own app and cannot easily interact with other apps or system-level dialogs.</p>
</li>
<li><p><strong>Black-Box Frameworks (Appium, Maestro):</strong> These tools operate from <em>outside</em> the application, interacting with it just as a user would: by tapping, swiping, and reading what's on the screen. They have no access to the application's internal code or state. Their strength lies in their ability to test true, real-world user workflows that may involve system-level interactions (like push notifications and permissions) or even traversing across multiple applications. The challenge with this approach is a higher potential for flakiness; the tests rely on timing and visual cues, which can be inconsistent across different devices and network conditions.</p>
</li>
</ul>
<h3 id="heading-the-ai-powered-approach-finalrun">The AI-Powered Approach: FinalRun</h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754381213315/1214d151-ee80-4be9-9ec0-6c8d05ddb65d.png" alt class="image--center mx-auto" /></p>
<p>FinalRun is a modern test automation platform that is revolutionizing the E2E space by leveraging AI to understand plain English. It is designed to solve the two biggest challenges in test automation: the high technical skill required to write tests and the constant maintenance of brittle test scripts.</p>
<ul>
<li><p><strong>How it Works:</strong> FinalRun allows you to create complex test cases without writing a single line of code. Testers can simply write commands in plain English, such as <em>"Login with phone number 9088989878"</em>, and FinalRun's AI interprets these commands and executes the corresponding actions on the device. Alternatively, users can interact directly with a mirrored version of their app on their screen—tapping buttons and entering text as a user would—and FinalRun will automatically translate these interactions into durable test steps.</p>
</li>
<li><p><strong>Strengths:</strong></p>
<ul>
<li><p><strong>Unmatched Simplicity:</strong> The ability to use plain English democratizes test creation. Manual testers, business analysts, and even product managers can create and run E2E tests, freeing up developer resources.</p>
</li>
<li><p><strong>Solving the XPath Problem:</strong> Traditional automation relies on fragile selectors like XPaths or element IDs. When a developer changes an element's ID, the test breaks. FinalRun's AI operates on intent. It understands that "Click on Continue" means finding the element that logically represents "Continue," whether it's a button with that text or an icon. This makes tests far more resilient to UI changes.</p>
</li>
<li><p><strong>Extreme Speed of Creation:</strong> Writing a sentence or simply using the app is significantly faster than writing, debugging, and maintaining complex code. This drastically accelerates the testing cycle.</p>
</li>
</ul>
</li>
<li><p><strong>Trade-offs:</strong></p>
<ul>
<li>As a platform that relies on AI and a cloud interface, it may not be suitable for teams that require their test code to be stored and versioned in a specific, self-managed repository in the same way as traditional code-based frameworks.</li>
</ul>
</li>
<li><p><strong>Best For:</strong> Teams of all sizes that want to drastically speed up their testing process, reduce the burden of test maintenance, and empower their entire quality team—not just engineers—to contribute to automation. It is particularly powerful for organizations looking to move away from the fragility of traditional, code-heavy test automation.</p>
</li>
</ul>
<blockquote>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong><em>📅</em></strong></a> <a target="_blank" href="https://calendly.com/arnold-finalrun/30min">Book a Demo</a><br />See how FinalRun fits into your existing workflow with a live Demo</p>
</blockquote>
<h3 id="heading-the-cross-platform-champions">The Cross-Platform Champions</h3>
<p>For teams supporting both Android and iOS, a cross-platform framework is essential for efficiency.</p>
<h4 id="heading-appium-the-veteran-with-unmatched-flexibility">Appium: The Veteran with Unmatched Flexibility</h4>
<p>Appium is the open-source standard for mobile automation. It operates on a client-server architecture, wrapping native automation frameworks like Espresso and XCUITest into a single, consistent API based on the W3C WebDriver protocol.</p>
<ul>
<li><p><strong>How it Works:</strong> Your test script (written in virtually any language like Java, Python, or JavaScript) acts as a client, sending JSON commands to the Appium server. The server translates these commands and executes them on the connected device or emulator using the underlying native framework.</p>
</li>
<li><p><strong>Strengths:</strong></p>
<ul>
<li><p><strong>True Cross-Platform:</strong> It supports native, hybrid, and mobile web apps across Android and iOS with a single codebase.</p>
</li>
<li><p><strong>Language Agnostic:</strong> Your team can write tests in the language they are most comfortable with.</p>
</li>
<li><p><strong>Massive Ecosystem:</strong> It boasts a huge community and a vast library of plugins for almost any integration imaginable.</p>
</li>
</ul>
</li>
<li><p><strong>Trade-offs:</strong></p>
<ul>
<li><p><strong>Complexity and Overhead:</strong> The client-server architecture introduces latency, making tests slower than their gray-box counterparts. Setup can also be complex.</p>
</li>
<li><p><strong>Fragility:</strong> As a black-box tool, it can be prone to timing issues, requiring careful implementation of "waits" to ensure stability.</p>
</li>
</ul>
</li>
<li><p><strong>Best For:</strong> Teams that need to test across both iOS and Android, especially for hybrid apps or complex flows that interact with the system UI. Its flexibility makes it a solid choice for large-scale, enterprise-level test automation.</p>
</li>
</ul>
<h4 id="heading-maestro-the-challenger-with-a-low-code-revolution">Maestro: The Challenger with a Low-Code Revolution</h4>
<p>Born in 2022, Maestro is a modern, lightweight framework that tackles mobile automation from a different angle.</p>
<ul>
<li><p><strong>How it Works:</strong> Maestro uses a simple, declarative YAML syntax to define tests. Instead of writing procedural code, you describe the state you want to achieve.</p>
<pre><code class="lang-yaml">  <span class="hljs-comment"># A simple Maestro test</span>
  <span class="hljs-attr">appId:</span> <span class="hljs-string">com.my.app</span>
  <span class="hljs-string">---</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">launchApp</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">tapOn:</span> <span class="hljs-string">"Login"</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">inputText:</span> <span class="hljs-string">"user@example.com"</span>
    <span class="hljs-attr">into:</span>
      <span class="hljs-attr">id:</span> <span class="hljs-string">"email_field"</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">inputText:</span> <span class="hljs-string">"password123"</span>
    <span class="hljs-attr">into:</span>
      <span class="hljs-attr">id:</span> <span class="hljs-string">"password_field"</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">tapOn:</span> <span class="hljs-string">"Submit"</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">assertVisible:</span> <span class="hljs-string">"Welcome, User!"</span>
</code></pre>
</li>
<li><p><strong>Strengths:</strong></p>
<ul>
<li><p><strong>Simplicity and Speed:</strong> The YAML syntax is incredibly easy to learn, lowering the barrier to entry for the entire team, including manual QAs and product managers.</p>
</li>
<li><p><strong>Resilience:</strong> Maestro has built-in intelligence to handle common flakiness issues, automatically waiting for elements and dealing with unexpected pop-ups.</p>
</li>
<li><p><strong>Maestro Studio:</strong> A feature that allows you to click through your app and have the YAML test script generated automatically, drastically speeding up test creation.</p>
</li>
</ul>
</li>
<li><p><strong>Trade-offs:</strong></p>
<ul>
<li><p><strong>Less Flexibility:</strong> The declarative nature means you have less granular control for highly complex or unconventional test logic compared to a full programming language.</p>
</li>
<li><p><strong>Younger Ecosystem:</strong> As a newer tool, its community and integration options are still growing compared to a giant like Appium.</p>
</li>
</ul>
</li>
<li><p><strong>Best For:</strong> Teams that want to get up and running with E2E testing quickly without a steep learning curve. It's ideal for startups and teams that prioritize speed of development and ease of maintenance.</p>
</li>
</ul>
<h3 id="heading-the-native-powerhouses-speed-and-stability">The Native Powerhouses: Speed and Stability</h3>
<p>When your focus is on a single platform and performance is paramount, native frameworks are unrivaled.</p>
<h4 id="heading-espresso-android-amp-xcuitest-ios">Espresso (Android) &amp; XCUITest (iOS)</h4>
<p>These are the official, first-party UI testing frameworks from Google and Apple, respectively.</p>
<ul>
<li><p><strong>How it Works:</strong> As gray-box tools, they run in the same process as the application. Their key feature is the ability to automatically synchronize with the UI thread. This means they will intrinsically wait for the UI to become idle before performing the next action, which all but eliminates timing-related test failures.</p>
</li>
<li><p><strong>Strengths:</strong></p>
<ul>
<li><p><strong>Speed and Reliability:</strong> In-process execution makes them the fastest and most stable option for UI testing.</p>
</li>
<li><p><strong>Deep Integration:</strong> They have access to all of the application's UI elements and internal state, allowing for powerful and precise tests. They are the standard for App Store and Play Store compliance testing.</p>
</li>
</ul>
</li>
<li><p><strong>Trade-offs:</strong></p>
<ul>
<li><p><strong>Platform Lock-in:</strong> Tests written for Espresso cannot be run on iOS, and vice-versa.</p>
</li>
<li><p><strong>Steep Learning Curve:</strong> They require native development knowledge (Kotlin/Java for Espresso, Swift for XCUITest) and familiarity with Android Studio or Xcode.</p>
</li>
</ul>
</li>
<li><p><strong>Best For:</strong> Development teams that are responsible for their own testing. If you have dedicated Android and iOS developers, empowering them to use the native tools will yield the most robust in-app test suites.</p>
</li>
</ul>
<h3 id="heading-the-specialist-tools">The Specialist Tools</h3>
<p>Some frameworks are purpose-built for specific development ecosystems.</p>
<h4 id="heading-detox-the-go-to-for-react-native">Detox: The Go-To for React Native</h4>
<p>Detox is a gray-box framework designed from the ground up for React Native applications.</p>
<ul>
<li><p><strong>How it Works:</strong> Detox's "secret sauce" is its synchronization mechanism. It monitors React Native's asynchronous operations (like network requests and animations) and waits for them to complete before proceeding, leading to highly stable tests.</p>
</li>
<li><p><strong>Strengths:</strong></p>
<ul>
<li><strong>Built for React Native:</strong> It understands the React Native architecture, making it faster and more reliable than black-box alternatives for this environment.</li>
</ul>
</li>
<li><p><strong>Trade-offs:</strong></p>
<ul>
<li><p><strong>Niche Focus:</strong> It is not intended for use outside of the React Native ecosystem.</p>
</li>
<li><p><strong>Configuration:</strong> Can be complex to set up, often requiring native build hooks.</p>
</li>
</ul>
</li>
<li><p><strong>Best For:</strong> Teams that are fully committed to the React Native stack.</p>
</li>
</ul>
<h3 id="heading-making-the-right-decision-a-summary">Making the Right Decision: A Summary</h3>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Framework</td><td>Testing Paradigm</td><td>Key Strength</td><td>Main Trade-off</td><td>Best For</td></tr>
</thead>
<tbody>
<tr>
<td><strong>FinalRun</strong></td><td>Black-Box (AI)</td><td>Plain English test creation, resilient to UI changes</td><td>Platform-based, less suited for self-managed code</td><td>Teams wanting to accelerate testing and empower non-engineers.</td></tr>
<tr>
<td><strong>Appium</strong></td><td>Black-Box</td><td>Ultimate flexibility (cross-platform, language-agnostic)</td><td>Slower execution, potential for flakiness</td><td>Large teams needing to test hybrid/native apps on both platforms.</td></tr>
<tr>
<td><strong>Maestro</strong></td><td>Black-Box</td><td>Simplicity and speed of test creation</td><td>Less flexible for complex logic</td><td>Teams wanting a low-code, easy-to-maintain solution.</td></tr>
<tr>
<td><strong>Espresso</strong></td><td>Gray-Box</td><td>Highest speed and reliability on Android</td><td>Android-only, requires Kotlin/Java skills</td><td>Dedicated Android development teams.</td></tr>
<tr>
<td><strong>XCUITest</strong></td><td>Gray-Box</td><td>Highest speed and reliability on iOS</td><td>iOS-only, requires Swift skills</td><td>Dedicated iOS development teams.</td></tr>
<tr>
<td><strong>Detox</strong></td><td>Gray-Box</td><td>Fast and stable tests for React Native</td><td>Niche focus, complex setup</td><td>Teams building exclusively with React Native.</td></tr>
</tbody>
</table>
</div><p>Choosing your E2E testing tool is a long-term commitment. By understanding the fundamental differences in their architecture and aligning their strengths with your team's skills and your app's technology stack, you can build a robust automation strategy that ensures a seamless experience for every user, every time.</p>
<h2 id="heading-related-reading"><strong>Related Reading</strong></h2>
<p>If you want to know how we are achieving 99% accuracy UI automation with <a target="_blank" href="https://finalrun.app">Finalrun</a>. Read the following articles:</p>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong>How We Set Out to Solve the XPath Problem in Mobile UI Test Autom</strong></a><a target="_blank" href="https://hashnode.com/post/cmd8m76mq000802ie8dh0g08d"><strong>ation</strong></a></p>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong>The future of UI Element Targetting:</strong></a> <a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong>Finalrun Identifiers beats Xpath</strong></a></p>
<p><a target="_blank" href="https://hashnode.com/post/cmd8tlhm9001b02jp4g664kxu"><strong>Why LLMs Like ChatGPT, Gemini, and Claude Understand FinalRun Identifiers Better Than XPath</strong></a></p>
<blockquote>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong><em>📅</em></strong></a> <a target="_blank" href="https://calendly.com/arnold-finalrun/30min">Book a Demo</a><br />See how FinalRun fits into your existing workflow with a live Demo</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[End-to-End Testing for Mobile: Beginners Guide]]></title><description><![CDATA[End-to-end (E2E) testing is a software testing methodology that involves testing an application's workflow from beginning to end. It simulates real user scenarios to validate the system and its components for integration and data integrity. This guid...]]></description><link>https://blogs.finalrun.app/end-to-end-testing-for-mobile-beginners-guide</link><guid isPermaLink="true">https://blogs.finalrun.app/end-to-end-testing-for-mobile-beginners-guide</guid><category><![CDATA[end to end testing]]></category><category><![CDATA[mobile app testing]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Tue, 05 Aug 2025 07:27:31 GMT</pubDate><content:encoded><![CDATA[<p>End-to-end (E2E) testing is a software testing methodology that involves testing an application's workflow from beginning to end. It simulates real user scenarios to validate the system and its components for integration and data integrity. This guide will delve into the specifics of E2E testing for mobile applications, exploring a user flow from login to checkout, multi-app testing, and data validation using APIs and databases. We'll also touch upon the role of CI/CD in accelerating the testing and development lifecycle.</p>
<h3 id="heading-a-user-flow-in-the-app-from-login-to-checkout">A User Flow in the App: From Login to Checkout</h3>
<p>Imagine a retail mobile application. A typical user journey, or user flow, could be:</p>
<ol>
<li><p><strong>Login:</strong> The user launches the app and logs in with their credentials. The E2E test would verify that the app successfully authenticates the user and grants access to their account.</p>
</li>
<li><p><strong>Search and Select:</strong> The user searches for a product, applies filters, and selects an item. The test would ensure that the search and filter functionalities work correctly and that the product details are displayed accurately.</p>
</li>
<li><p><strong>Add to Cart:</strong> The user adds the selected item to their shopping cart. Here, the test validates that the cart is updated with the correct product and quantity.</p>
</li>
<li><p><strong>Checkout:</strong> The user proceeds to checkout, enters their shipping and payment information, and confirms the order. The test would verify that the order is placed successfully and that the user receives a confirmation.</p>
</li>
</ol>
<p>Throughout this flow, the E2E test simulates user interactions like tapping buttons, entering text, and swiping through screens to ensure a seamless experience.</p>
<h3 id="heading-multiple-app-testing-in-the-same-flow">Multiple App Testing in the Same Flow</h3>
<p>In many modern service ecosystems, a single user transaction can span across multiple applications. For instance, consider a food delivery service which might involve a <strong>consumer app</strong>, a <strong>Point of Sale (POS) app</strong> at the restaurant, and a <strong>delivery app</strong>.</p>
<p>An E2E test for such a scenario would look like this:</p>
<ol>
<li><p>A user places an order on the <strong>consumer app</strong>.</p>
</li>
<li><p>The E2E test would then need to verify that the order is received and displayed correctly on the restaurant's <strong>POS app</strong>.</p>
</li>
<li><p>Once the restaurant accepts the order, the test would check if a notification is sent to the <strong>delivery app</strong>, assigning a driver for the delivery.</p>
</li>
<li><p>The test can further track the order status on the consumer app as it changes from "Order Placed" to "In Transit" and finally "Delivered".</p>
</li>
</ol>
<p>This type of testing is crucial to ensure that the entire ecosystem of apps works in harmony to deliver a smooth customer experience.</p>
<h3 id="heading-app-with-api-or-database-to-validate-data">App with API or Database to Validate Data</h3>
<p>To ensure data integrity across systems, E2E tests can be augmented with API and database validations. After a user completes a checkout on the consumer app, an automated test can make an API call to the backend server to verify that the order details (e.g., product ID, quantity, price, shipping address) are correctly stored in the database.</p>
<p>This approach combines the "black-box" testing of the UI with "white-box" testing of the backend, providing a more comprehensive validation of the system. It helps in identifying issues that might not be visible on the user interface, such as incorrect data storage or processing errors.</p>
<h3 id="heading-cicd-for-faster-iteration">CI/CD for Faster Iteration</h3>
<p>Continuous Integration and Continuous Deployment (CI/CD) is a practice that automates the software development and release process. Integrating E2E tests into the CI/CD pipeline offers significant advantages:</p>
<ul>
<li><p><strong>Early Bug Detection:</strong> E2E tests can be configured to run automatically every time new code is committed. This helps in catching bugs early in the development cycle, reducing the cost and effort required for fixing them.</p>
</li>
<li><p><strong>Faster Feedback Loop:</strong> Developers get quick feedback on their changes, allowing them to iterate faster and improve the quality of the code.</p>
</li>
<li><p><strong>Increased Confidence in Releases:</strong> With a robust suite of automated E2E tests, the development team can have higher confidence in the stability and quality of the application, leading to smoother and more frequent releases.</p>
</li>
</ul>
<p>By automating the entire process from code commit to testing and deployment, CI/CD empowers teams to deliver high-quality mobile applications at a faster pace.</p>
<p>In conclusion, a well-defined E2E testing strategy is indispensable for developing high-quality mobile applications. By simulating real user scenarios, testing across multiple apps, validating data through APIs and databases, and integrating tests into a CI/CD pipeline, development teams can ensure a seamless user experience, maintain data integrity, and accelerate their release cycles.</p>
]]></content:encoded></item><item><title><![CDATA[The Random Popup Problem: Why Your Mobile Tests Are Flaky]]></title><description><![CDATA[You've been there. You kick off your mobile test suite, confident that your carefully crafted steps will glide through the app. Then, a test fails. You dig into the logs, scroll through screenshots, and finally, there it is: a completely random popup...]]></description><link>https://blogs.finalrun.app/the-random-popup-problem-why-your-mobile-tests-are-flaky</link><guid isPermaLink="true">https://blogs.finalrun.app/the-random-popup-problem-why-your-mobile-tests-are-flaky</guid><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Tue, 29 Jul 2025 05:05:21 GMT</pubDate><content:encoded><![CDATA[<p>You've been there. You kick off your mobile test suite, confident that your carefully crafted steps will glide through the app. Then, a test fails. You dig into the logs, scroll through screenshots, and finally, there it is: a completely random popup – a location permission request, an app update notification, or maybe even a "rate us" prompt – that appeared out of nowhere and completely derailed your test.</p>
<p>Frustrating, right? It's like bringing a perfectly tuned race car to the track, only for a tumbleweed to roll across and stop the race. These "random popups" are the silent saboteurs of mobile test automation, causing flaky tests, wasted debugging hours, and eroding trust in your automation efforts.</p>
<h3 id="heading-the-problem-when-your-script-cant-see-the-unexpected">The Problem: When Your Script Can't See the Unexpected</h3>
<p>Traditional mobile test automation tools rely heavily on pre-defined scripts. You tell them, "Tap this button," "Enter text here," "Verify that element." This works great when the app behaves exactly as expected.</p>
<p>But mobile apps are dynamic. Developers want to ask for permissions, inform users about new features, or nudge them for reviews. These intentions often translate into popups that:</p>
<ul>
<li><p><strong>Block critical UI elements:</strong> Your test is trying to tap "Login," but a "Allow Location Access?" dialog is directly on top of it.</p>
</li>
<li><p><strong>Change the screen state:</strong> The script expects a certain screen, but a popup appears, changing the element IDs or preventing interaction.</p>
</li>
<li><p><strong>Are unpredictable:</strong> They might appear on the first run, but not the tenth, making tests frustratingly flaky.</p>
</li>
</ul>
<p>Imagine trying to follow a recipe, but every few minutes someone throws a random ingredient at you and you have to pause, pick it up, and figure out if it belongs. That's what traditional automation tools feel like in the face of random popups.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753764448629/8ca38cb2-5d85-4b65-babb-3b4174731bc9.jpeg" alt class="image--center mx-auto" /></p>
<p><em>Your traditional test automation tool trying to focus on the login button while a location popup demands attention.</em></p>
<p>The result? Tests fail not because of a bug in your app, but because your automation couldn't adapt to an unexpected, yet often legitimate, interruption. This leads to:</p>
<ul>
<li><p><strong>Increased debugging time:</strong> You spend hours trying to understand <em>why</em> a test failed, only to find it was a dismissible popup.</p>
</li>
<li><p><strong>Flaky test suites:</strong> Tests pass some times and fail others, making your CI/CD pipeline unreliable.</p>
</li>
<li><p><strong>Reduced confidence:</strong> Teams start losing faith in the automation, leading to more manual testing.</p>
</li>
</ul>
<h3 id="heading-the-finalrun-solution-ai-powered-context-awareness">The FinalRun Solution: AI-Powered Context Awareness</h3>
<p>At <a target="_blank" href="https://finalrun.app">FinalRun</a>, we believe mobile tests should just <em>work</em>. They should be resilient, intelligent, and understand the context of the application, not just blindly follow a script. This is where our core AI capability comes into play.</p>
<p>Unlike traditional tools that simply follow a rigid script, FinalRun's AI is <strong>context-aware</strong>. When you define a test step – let's say, "Log in with phone number 9088989878" – the AI doesn't just look for the immediate login fields. It has a deeper understanding of the app's state and its ultimate goal.</p>
<p><strong>Watch our quick demo of FinalRun's AI intelligently handling a location permission popup to ensure the test continues smoothly:</strong></p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/TETpYTd3A6E">https://youtu.be/TETpYTd3A6E</a></div>
<p> </p>
<p><strong>Here's how it works at its core:</strong></p>
<ol>
<li><p><strong>Intent-Driven Automation:</strong> You tell FinalRun <em>what</em> you want to achieve (e.g., "login," "add to cart," "checkout").</p>
</li>
<li><p><strong>Continuous Observation:</strong> As the test runs, FinalRun's AI continuously observes the mobile device's screen.</p>
</li>
<li><p><strong>Intelligent Blocker Detection:</strong> If the AI detects that the screen is not in the state expected for the <em>current test step</em>, and an element is blocking the intended interaction (like a popup), it doesn't just give up. It intelligently identifies these blockers.</p>
</li>
<li><p><strong>Proactive Dismissal:</strong> The AI then determines the best way to dismiss this blocker. This could involve:</p>
<ul>
<li><p>Tapping "Don't Allow" or "Deny" for permission requests.</p>
</li>
<li><p>Tapping "Skip," "Later," or "X" for update notifications or "Rate Us" prompts.</p>
</li>
<li><p>Even navigating through onboarding screens if they unexpectedly reappear.</p>
</li>
</ul>
</li>
</ol>
<p><strong>The key is this:</strong> <strong>FinalRun's AI will persist in dismissing any identified blockers until your original, intended test step can be successfully executed.</strong> It's like having a smart co-pilot that clears the path for your main mission, no matter what detours pop up.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1753764247163/f543d87d-1721-48f9-b94c-ccc67b4a6790.jpeg" alt class="image--center mx-auto" /></p>
<h3 id="heading-what-does-this-mean-for-you">What Does This Mean For You?</h3>
<p>This intelligent handling of dynamic UI elements translates into significant benefits for your testing process:</p>
<ul>
<li><p><strong>Unprecedented Test Stability:</strong> Say goodbye to flaky tests caused by popups. Your tests become more reliable and consistent, giving you accurate feedback on your app's true quality.</p>
</li>
<li><p><strong>Massive Time Savings:</strong> No more wasted hours debugging trivial popup issues. Your QA and development teams can focus on finding real bugs and building great features.</p>
</li>
<li><p><strong>Faster Release Cycles:</strong> With more stable tests and less debugging, your CI/CD pipeline runs smoother, accelerating your time to market.</p>
</li>
<li><p><strong>Comprehensive Test Coverage:</strong> You can automate more scenarios with confidence, knowing that unexpected UI elements won't block your progress.</p>
</li>
<li><p><strong>Empowered Teams:</strong> Developers and QA engineers spend less time fighting with automation and more time innovating.</p>
</li>
</ul>
<h3 id="heading-get-started-with-truly-resilient-mobile-automation">Get Started with Truly Resilient Mobile Automation</h3>
<p>Stop letting random popups dictate the reliability of your mobile tests. FinalRun's AI is designed to understand, adapt, and intelligently clear the path for your automation, ensuring your tests just <em>work</em>.</p>
<p>Ready to experience the future of intelligent mobile testing?</p>
<p><a target="_blank" href="https://finalrun.app">Learn more</a> about FinalRun's AI-powered automation and <a target="_blank" href="https://calendly.com/arnold-finalrun/30min">try it for free</a>!</p>
<h2 id="heading-related-reading"><strong>Related Reading</strong></h2>
<p>If you want to know how we are achieving 99% accuracy UI automation with <a target="_blank" href="https://finalrun.app">Finalrun</a>. Read the following articles:</p>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong>How We Set Out to Solve the XPath Problem in Mobile UI Test Autom</strong></a><a target="_blank" href="https://hashnode.com/post/cmd8m76mq000802ie8dh0g08d"><strong>ation</strong></a></p>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong>The future of UI Element Targetting:</strong></a> <a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong>Finalrun Identifiers beats Xpath</strong></a></p>
<p><a target="_blank" href="https://hashnode.com/post/cmd8tlhm9001b02jp4g664kxu"><strong>Why LLMs Like ChatGPT, Gemini, and Claude Understand FinalRun Identifiers Better Than XPath</strong></a></p>
<blockquote>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath"><strong><em>📅</em></strong></a> <a target="_blank" href="https://calendly.com/arnold-finalrun/30min"><strong><em>Book a Demo</em></strong></a><br />See how FinalRun fits into your existing workflow with a live Demo.</p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Why LLMs Like ChatGPT, Gemini, and Claude Understand FinalRun Identifiers Better Than XPath]]></title><description><![CDATA[The software world is buzzing with the rise of Large Language Models (LLMs) like ChatGPT, Gemini, and Claude. These tools promise to generate code, automate complex workflows, and even write full-fledged test scripts, all from simple natural language...]]></description><link>https://blogs.finalrun.app/why-llms-like-chatgpt-gemini-and-claude-understand-finalrun-identifiers-better-than-xpath</link><guid isPermaLink="true">https://blogs.finalrun.app/why-llms-like-chatgpt-gemini-and-claude-understand-finalrun-identifiers-better-than-xpath</guid><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Fri, 18 Jul 2025 12:53:41 GMT</pubDate><content:encoded><![CDATA[<p>The software world is buzzing with the rise of Large Language Models (LLMs) like <strong>ChatGPT</strong>, <strong>Gemini</strong>, and <strong>Claude</strong>. These tools promise to generate code, automate complex workflows, and even write full-fledged test scripts, all from simple natural language instructions.</p>
<p>One of the most exciting frontiers for this technology is <strong>mobile test automation</strong>: telling an AI, <em>“Tap the login button,”</em> and letting it handle the rest.</p>
<p>But there's a problem, a very old one. It's called <strong>XPath</strong>.</p>
<p>While LLMs are capable of generating Appium test code, they often stumble when it comes to building reliable, accurate XPath locators. It’s not a flaw in the models, it's a mismatch between how humans communicate and how XPath works.</p>
<p>That’s where <a target="_blank" href="https://www.finalrun.app"><strong>FinalRun</strong></a> comes in. With a structured, human-readable format for identifying UI elements, FinalRun bridges the gap between intent and automation, unlocking a level of AI accuracy and resilience that XPath was never built to support.</p>
<hr />
<h2 id="heading-the-core-problem-why-llms-struggle-with-xpath">The Core Problem: Why LLMs Struggle With XPath</h2>
<p>To understand why FinalRun changes the game, let’s first look at what’s broken with XPath.</p>
<h3 id="heading-1-brittleness-and-strict-hierarchies">1. <strong>Brittleness and Strict Hierarchies</strong></h3>
<p>Even when LLMs are given screenshots, XPath still relies on rigid UI structure, not what’s visually rendered. A small layout change, like wrapping a button in a new container, can break the XPath even though nothing looks different on screen. LLMs can understand what the user wants, but XPath forces them to guess how the UI is built behind the scenes, which often leads to fragile and unreliable locators.</p>
<h3 id="heading-2-no-spatial-or-relational-awareness">2. <strong>No Spatial or Relational Awareness</strong></h3>
<p>Consider this instruction:</p>
<blockquote>
<p><em>“Click the trash icon to the right of ‘My Document.’”</em></p>
</blockquote>
<p>XPath has no built-in way to understand <em>"right of"</em>. The best it can offer is something like <code>following-sibling::</code>, which only checks if one node follows another in code, not on the screen. In responsive or dynamic UIs, that’s a dangerous assumption.</p>
<h3 id="heading-3-cryptic-and-unintuitive-syntax">3. <strong>Cryptic and Unintuitive Syntax</strong></h3>
<p>XPath is a dense query language that even seasoned engineers struggle to write correctly. Now imagine asking an LLM to produce this:</p>
<pre><code class="lang-json"><span class="hljs-comment">//android.widget.LinearLayout[.//android.widget.TextView[@text='Submit'] and .//android.widget.Button]</span>
</code></pre>
<p>One syntax error, one wrong assumption about the UI, and the test fails. XPath is fragile, hard to maintain, and deeply unfriendly to generative AI.</p>
<hr />
<h2 id="heading-finalrun-identifiers-built-for-humans-and-ai">FinalRun Identifiers: Built for Humans and AI</h2>
<p>FinalRun replaces XPath with <strong>declarative, structured identifiers</strong> written in JSON. Instead of guessing a path through the DOM, you describe the element by what it <strong>is</strong> and how it <strong>relates</strong> to other elements.</p>
<p>Here’s a simple example:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"text"</span>: <span class="hljs-string">"Submit"</span>,
  <span class="hljs-attr">"insideOf"</span>: { <span class="hljs-attr">"id"</span>: <span class="hljs-string">"footer"</span> }
}
</code></pre>
<p>It’s readable. Logical. And perfectly aligned with how LLMs think.</p>
<p>But FinalRun goes even further—with support for <strong>relational</strong> and <strong>spatial</strong> logic.</p>
<h3 id="heading-supported-properties">Supported properties:</h3>
<ul>
<li><code>text</code>, <code>id</code>, <code>type</code>, <code>accText</code> (accessibility label)</li>
</ul>
<h3 id="heading-supported-relationships">Supported relationships:</h3>
<ul>
<li><code>insideOf</code>, <code>containsDescendants</code></li>
</ul>
<h3 id="heading-supported-spatial-logic">Supported spatial logic:</h3>
<ul>
<li><code>rightOf</code>, <code>leftOf</code>, <code>topOf</code>, <code>bottomOf</code></li>
</ul>
<p>This vocabulary allows an LLM to translate natural instructions directly into automation-ready identifiers—with no guesswork, and no brittle hierarchy dependencies.</p>
<blockquote>
<p><a target="_blank" href="https://finalrun.gitbook.io/finalrun/advanced/element-identifier">Checkout the documentation on element identifiers</a></p>
</blockquote>
<hr />
<blockquote>
<p><strong><em>📅</em></strong> <a target="_blank" href="https://calendly.com/arnold-finalrun/30min"><strong><em>Book a Demo</em></strong><br />See how Fi</a><strong><em>nalRun fits into your existing workflow with a live Demo.</em></strong></p>
</blockquote>
<h2 id="heading-real-world-scenarios-finalrun-vs-xpath-in-llm-generation">Real-World Scenarios: FinalRun vs XPath in LLM Generation</h2>
<h3 id="heading-scenario-1-spatial-relationship">🔍 <strong>Scenario 1: Spatial Relationship</strong></h3>
<p><strong>Prompt</strong>: <em>“Find the settings icon that is to the right of the ‘Profile’ label.”</em></p>
<h4 id="heading-xpath">❌ XPath:</h4>
<pre><code class="lang-json"><span class="hljs-comment">//android.widget.TextView[@text='Profile']/following-sibling::android.widget.ImageView</span>
</code></pre>
<ul>
<li><p>Only works if both elements are siblings in the XML structure.</p>
</li>
<li><p>Breaks easily if layout changes.</p>
</li>
<li><p>Doesn’t guarantee <em>visual</em> “right of.”</p>
</li>
</ul>
<h4 id="heading-finalrun">✅ FinalRun:</h4>
<pre><code class="lang-json">{
  <span class="hljs-attr">"type"</span>: <span class="hljs-string">"icon"</span>,
  <span class="hljs-attr">"rightOf"</span>: { <span class="hljs-attr">"text"</span>: <span class="hljs-string">"Profile"</span> }
}
</code></pre>
<ul>
<li><p>Mirrors user intent exactly.</p>
</li>
<li><p>Leverages actual screen coordinates, not code structure.</p>
</li>
<li><p>Simple and reliable for both humans and LLMs.</p>
</li>
</ul>
<hr />
<h3 id="heading-scenario-2-containment-logic">📦 <strong>Scenario 2: Containment Logic</strong></h3>
<p><strong>Prompt</strong>: <em>“Target the product card that contains both the text ‘Organic Bananas’ and a button with the text ‘Add to Cart.’”</em></p>
<h4 id="heading-xpath-1">❌ XPath:</h4>
<pre><code class="lang-json"><span class="hljs-comment">//android.view.ViewGroup[.//android.widget.TextView[@text='Organic Bananas'] and .//android.widget.Button[@text='Add to Cart']]</span>
</code></pre>
<ul>
<li><p>Dense and unreadable.</p>
</li>
<li><p>Highly fragile—small DOM changes can break it.</p>
</li>
<li><p>Hard for LLMs to generate consistently.</p>
</li>
</ul>
<h4 id="heading-finalrun-1">✅ FinalRun:</h4>
<pre><code class="lang-json">{
  <span class="hljs-attr">"containsDescendants"</span>: [
    { <span class="hljs-attr">"text"</span>: <span class="hljs-string">"Organic Bananas"</span> },
    { <span class="hljs-attr">"text"</span>: <span class="hljs-string">"Add to Cart"</span> }
  ]
}
</code></pre>
<ul>
<li><p>Clean, expressive, and self-documenting.</p>
</li>
<li><p>Perfect 1:1 mapping with the user’s natural instruction.</p>
</li>
<li><p>LLMs excel at generating structured data like this.</p>
</li>
</ul>
<hr />
<h2 id="heading-why-finalrun-works-so-well-with-llms">Why FinalRun Works So Well with LLMs</h2>
<h3 id="heading-semantic-and-not-structural"><strong>Semantic and Not Structural</strong></h3>
<p>LLMs work by understanding <strong>meaning</strong>, not memorizing code patterns. FinalRun identifiers describe <em>what</em> something is and <em>how</em> it relates to other things—not <em>where</em> it lives in a brittle hierarchy.</p>
<h3 id="heading-uses-json-llms-native-language"><strong>Uses JSON LLMs' Native Language</strong></h3>
<p>LLMs are trained extensively on JSON, API specs, config files, and structured logs. JSON is predictable, easy to generate, and easy to validate.</p>
<h3 id="heading-aligns-with-human-thought"><strong>Aligns With Human Thought</strong></h3>
<p>Users think in terms of relationships and meaning:</p>
<blockquote>
<p><em>“The red button in the header,”</em> not <em>“/html/body/div[1]/button[3]”</em>.</p>
</blockquote>
<p>FinalRun gives LLMs a vocabulary to express this intent directly.</p>
<h3 id="heading-enables-smart-self-healing-automation"><strong>Enables Smart, Self-Healing Automation</strong></h3>
<p>Because FinalRun identifiers are expressive and spatially aware, LLMs (or test engines) can use alternate paths when one fails—making automation more resilient and adaptive.</p>
<hr />
<h2 id="heading-conclusion-a-new-foundation-for-ai-driven-testing">Conclusion: A New Foundation for AI-Driven Testing</h2>
<p>The reason LLMs perform better with FinalRun isn’t about better AI—it’s about better <strong>design</strong>.</p>
<p>FinalRun identifiers are structured, expressive, and resilient. They speak the same language LLMs were trained on. XPath, in contrast, is a relic of a time before AI—built for rigid DOM traversal, not natural understanding.</p>
<p>If you’re building the future of test automation—where tests are written in English and powered by AI—then <strong>FinalRun identifiers are the bridge between intent and execution</strong>.</p>
<h2 id="heading-related-reading"><strong>Related Reading</strong></h2>
<p>Read our story behind why we took this new approach to element identification:</p>
<p><a target="_blank" href="https://hashnode.com/post/cmd8m76mq000802ie8dh0g08d">How We Set Out to Solve the XPath Problem in Mobile UI Test Automation</a></p>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath">The future of UI Element Targetting: Finalrun Identifiers beats Xpath</a></p>
<blockquote>
<p><strong><em>📅</em></strong> <a target="_blank" href="https://calendly.com/arnold-finalrun/30min"><strong><em>Book a Demo</em></strong><br />See how Fi</a><strong><em>nalRun fits into your existing workflow with a live Demo.</em></strong></p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[The Future of UI Element Targeting: Why FinalRun Beats XPath]]></title><description><![CDATA[Overview
Robust, maintainable UI automation begins with precise element identification. This documentation introduces FinalRun’s JSON-based identifier framework and explores its advantages compared to traditional XPath-based selectors commonly used w...]]></description><link>https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath</link><guid isPermaLink="true">https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath</guid><category><![CDATA[Future of software testing]]></category><category><![CDATA[Mobile automation testing tool]]></category><category><![CDATA[Mobile Automation]]></category><category><![CDATA[appium]]></category><category><![CDATA[Xpath]]></category><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Fri, 18 Jul 2025 09:32:16 GMT</pubDate><content:encoded><![CDATA[<h2 id="heading-overview"><strong>Overview</strong></h2>
<p>Robust, maintainable UI automation begins with precise element identification. This documentation introduces FinalRun’s JSON-based identifier framework and explores its advantages compared to traditional XPath-based selectors commonly used with Appium. Emphasizing relational identifiers, it guides automation engineers to build resilient, clear, and scalable tests for dynamic interfaces.</p>
<h2 id="heading-1-introduction-to-element-identification"><strong>1. Introduction to Element Identification</strong></h2>
<p>In automated testing, the method used to find elements determines the reliability and maintainability of test suites. Two dominant approaches are:</p>
<ul>
<li><p><strong>XPath Selectors</strong> (Appium): String-based queries that traverse the UI hierarchy.</p>
</li>
<li><p><strong>FinalRun Identifiers</strong>: Declarative, JSON-based objects combining attributes and relationships.</p>
</li>
</ul>
<h2 id="heading-2-xpath-with-appium-structure-based-selection"><strong>2. XPath with Appium: Structure-Based Selection</strong></h2>
<p>XPath is a query language for targeting nodes in an XML document, mapped to UI element structures in Appium.</p>
<h3 id="heading-strengths"><strong>Strengths</strong></h3>
<ul>
<li><p>Universal; works across many platforms.</p>
</li>
<li><p>Can express complex UI hierarchies.</p>
</li>
</ul>
<h3 id="heading-limitations"><strong>Limitations</strong></h3>
<ul>
<li><p>Fragile: Breaks with minor UI changes.</p>
</li>
<li><p>Difficult Maintenance: Often requires updates after UI refactoring.</p>
</li>
<li><p>Cryptic Syntax: Not intuitive; error-prone string manipulation.</p>
</li>
<li><p>Performance: Deep or complex queries can slow tests.</p>
</li>
</ul>
<h2 id="heading-3-finalrun-identifiers-attribute-and-relationship-based-targeting"><strong>3. FinalRun Identifiers: Attribute and Relationship-Based Targeting</strong></h2>
<p>FinalRun introduces a modern, JSON-driven approach, focusing on both the properties and relationships of UI elements.</p>
<h3 id="heading-properties"><strong>Properties</strong></h3>
<ul>
<li><p><code>id</code>: Unique resource name.</p>
</li>
<li><p><code>text</code>: Displayed text.</p>
</li>
<li><p><code>type</code>: Element type (e.g., image).</p>
</li>
<li><p><code>accText</code>: Accessibility label.</p>
</li>
</ul>
<h3 id="heading-relationships-relational-identifiers-the-game-changer"><strong>Relationships (Relational Identifiers) — The Game Changer</strong></h3>
<ul>
<li><p><code>insideOf</code>: Specifies a parent container.</p>
</li>
<li><p><code>containsDescendants</code>: Element must have specified children.</p>
</li>
<li><p><code>rightOf</code>, <code>leftOf</code>, <code>topOf</code>, <code>bottomOf</code>: Spatial positioning. Not possible with Xpath</p>
</li>
<li><p><code>index</code>: 1-based (selects the nth match within context).</p>
</li>
</ul>
<p><em>Example Identifier:</em></p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"text"</span>: <span class="hljs-string">"Submit"</span>,
  <span class="hljs-attr">"insideOf"</span>: { <span class="hljs-attr">"id"</span>: <span class="hljs-string">"footer"</span> }
}
</code></pre>
<ul>
<li>Clearly identifies the element with <strong>Submit</strong> text inside the <strong>footer</strong> container. Works regardless of UI changes as long as the <strong>Submit</strong> text is inside the <strong>footer</strong> container.</li>
</ul>
<p>Checkout the detailed documentation — <a target="_blank" href="https://finalrun.gitbook.io/finalrun/advanced/element-identifier">https://finalrun.gitbook.io/finalrun/advanced/element-identifier</a></p>
<h2 id="heading-what-makes-relational-identifiers-special"><strong>What Makes Relational Identifiers Special?</strong></h2>
<ul>
<li><p><strong>Contextual Targeting</strong>: Define elements by their relation to others, not just absolute position in the hierarchy.</p>
</li>
<li><p><strong>Resiliency</strong>: Less impacted by UI layout changes.</p>
</li>
<li><p><strong>Clarity</strong>: Self-documenting JSON; easily readable/reusable across teams.</p>
</li>
<li><p><strong>Disambiguation</strong>: Combine relationships to uniquely identify elements in complex views.</p>
</li>
</ul>
<blockquote>
<p><strong>📅</strong> <a target="_blank" href="https://calendly.com/arnold-finalrun/30min">Book a Demo</a><br /><em>See how FinalRun fits into your existing workflow with a live Demo.</em></p>
</blockquote>
<h2 id="heading-5-practical-scenarios"><strong>5. Practical Scenarios</strong></h2>
<h3 id="heading-scenario-1-spatial-relationship-icon-right-of-settings-text"><strong>Scenario 1: Spatial Relationship (Icon Right of “Settings” Text)</strong></h3>
<p>UI layout often positions elements side-by-side. For example, an icon may appear <strong>visually to the right of</strong> a “Settings” label. This spatial relationship is critical but not captured by hierarchy alone.</p>
<p>XPath: (Not possible)</p>
<pre><code class="lang-css">//<span class="hljs-selector-tag">android</span><span class="hljs-selector-class">.widget</span><span class="hljs-selector-class">.TextView</span><span class="hljs-selector-attr">[@text=<span class="hljs-string">'Settings'</span>]</span>/<span class="hljs-selector-tag">following-sibling</span><span class="hljs-selector-pseudo">::android.widget.ImageView</span>
</code></pre>
<p><img src="https://miro.medium.com/v2/resize:fit:500/1*VBQjuBXUsPPg5PkY7_knYA.jpeg" alt class="image--center mx-auto" /></p>
<p><strong>Limitation with Xpath:</strong> This only selects the image that comes <em>after</em> “Settings” in the view hierarchy — not necessarily to its right on screen.</p>
<p>FinalRun:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"type"</span>: <span class="hljs-string">"icon"</span>,
  <span class="hljs-attr">"rightOf"</span>: { <span class="hljs-attr">"text"</span>: <span class="hljs-string">"Settings"</span> }
}
</code></pre>
<p>FinalRun uses actual screen coordinates to resolve spatial relationships, ensuring the icon is genuinely to the right of the “Settings” label — regardless of their order in the XML layout. XPath cannot guarantee this and often fails when layout shifts or rendering engines change order independently of the DOM.</p>
<h3 id="heading-scenario-2-parent-element-containing-specific-children"><strong>Scenario 2: Parent Element Containing Specific Children</strong></h3>
<p>Let’s say you want to identify a <strong>section</strong> that contains both a <strong>“Title”</strong> text and a <strong>“Continue”</strong> button.</p>
<p>XPath:</p>
<pre><code class="lang-css">//<span class="hljs-selector-tag">android</span><span class="hljs-selector-class">.view</span><span class="hljs-selector-class">.ViewGroup</span><span class="hljs-selector-attr">[.//android.widget.TextView[@text=<span class="hljs-string">'Title'</span>]</span> <span class="hljs-selector-tag">and</span> .//<span class="hljs-selector-tag">android</span><span class="hljs-selector-class">.widget</span><span class="hljs-selector-class">.Button</span><span class="hljs-selector-attr">[@text=<span class="hljs-string">'Continue'</span>]</span>]
</code></pre>
<p>FinalRun:</p>
<pre><code class="lang-json">{
  <span class="hljs-attr">"containsDescendants"</span>: [
    { <span class="hljs-attr">"text"</span>: <span class="hljs-string">"Title"</span> },
    { <span class="hljs-attr">"text"</span>: <span class="hljs-string">"Continue"</span> }
  ]
}
</code></pre>
<p>FinalRun expresses the same logic in a much clearer, structured form — greatly improving readability and making the intent explicit. XPath handles this by nesting logical conditions in a dense string expression that is harder to maintain.</p>
<h2 id="heading-6-best-practices-with-finalrun-identifiers"><strong>6. Best Practices with FinalRun Identifiers</strong></h2>
<ul>
<li><p>Prioritize unique attributes (<code>id</code>, <code>text</code>, <code>accText</code>, <code>type</code>).</p>
</li>
<li><p>Add relational context (<code>insideOf</code>,<code>leftOf</code>, <code>topOf</code>, <code>bottomOf</code> <code>rightOf</code>) to eliminate ambiguity.</p>
</li>
<li><p>Use indexing judiciously — only when necessary</p>
</li>
</ul>
<h2 id="heading-7-conclusion"><strong>7. Conclusion</strong></h2>
<p>FinalRun’s relational, spatial and property-driven identifiers significantly advance UI automation capabilities beyond XPath’s positional approach. By blending clear structure, human readability, and robust context-awareness, FinalRun maximizes both test reliability and developer productivity for today’s fast-moving interfaces.</p>
<p>Embrace relational identifiers to unlock a modern, resilient, and scalable automation strategy.</p>
<h2 id="heading-related-reading"><strong>Related Reading</strong></h2>
<p>Read our story behind why we took this new approach to element identification:</p>
<p><a target="_blank" href="https://hashnode.com/post/cmd8m76mq000802ie8dh0g08d">How We Set Out to Solve the XPath Problem in Mobile UI Test Automation</a></p>
<p><a target="_blank" href="https://hashnode.com/post/cmd8tlhm9001b02jp4g664kxu">Why LLMs Like ChatGPT, Gemini, and Claude Understand FinalRun Identifiers Better Than XPath</a></p>
<blockquote>
<p><strong>📅</strong> <a target="_blank" href="https://calendly.com/arnold-finalrun/30min">Book a Demo</a><br /><em>See how FinalRun fits into your existing workflow with a live Demo.</em></p>
</blockquote>
]]></content:encoded></item><item><title><![CDATA[Quest to solve the XPath Problem in Mobile Test Automation]]></title><description><![CDATA[I’m a mobile developer with over 10 years of experience. I’ve led engineering teams at Appunfold, which was acquired by UserIQ, and later at Jiny, which was acquired by Whatfix. In both journeys, I saw firsthand how much pressure teams face to ship h...]]></description><link>https://blogs.finalrun.app/quest-to-solve-the-xpath-problem-in-mobile-test-automation</link><guid isPermaLink="true">https://blogs.finalrun.app/quest-to-solve-the-xpath-problem-in-mobile-test-automation</guid><dc:creator><![CDATA[Finalrun]]></dc:creator><pubDate>Fri, 18 Jul 2025 09:26:36 GMT</pubDate><content:encoded><![CDATA[<p>I’m a mobile developer with over 10 years of experience. I’ve led engineering teams at Appunfold, which was acquired by <a target="_blank" href="https://useriq.com">UserIQ</a>, and later at Jiny, which was acquired by <a target="_blank" href="https://whatfix.com/">Whatfix</a>. In both journeys, I saw firsthand how much pressure teams face to ship high-quality mobile apps across multiple platforms — Native Android, iOS, React Native, Xamarin, Ionic — you name it.</p>
<p>My co-founder Ashish brings a unique perspective to this problem. Back in 2017, he was working at <a target="_blank" href="https://heywoohoo.com/">SmartBeings</a> a startup building voice-first smart devices, much like Amazon Alexa. Building futuristic consumer tech at that scale exposed him early to the complexities of UI interaction and the brittleness of automation workflows across hardware and software boundaries.</p>
<p>Together, we saw the same pattern repeat: <strong>Testing</strong> slowed down development.</p>
<p>We invested in Appium, set up test frameworks, and wrote automation scripts to validate features across all these platforms. But even with all that effort, <strong>every small UI change</strong> meant hours of rewriting and debugging brittle XPath selectors. Every release introduced breakages. Every redesign threw test stability out the window.</p>
<p>Our automation became a burden rather than an asset. We knew this wasn’t scalable. And worse, skipping those fixes meant shipping bugs to production. That’s when we asked ourselves: Is this just our problem, or does the industry feel the same?</p>
<p>We decided to reach out and speak to 50+ people in the mobile testing and QA space. What we learned shaped everything that followed.</p>
<p>This blog is not about criticizing XPath as a technology. It’s about understanding why XPath, in the way it’s used today in mobile testing, causes instability, pain, and technical debt. More importantly, it’s about how these deep-rooted problems shaped the origin of <a target="_blank" href="https://www.finalrun.app"><strong>Finalrun</strong></a>.</p>
<h2 id="heading-1-brittle-and-unstable-xpaths-death-by-ui-change"><strong>1. Brittle and Unstable XPaths: Death by UI Change</strong></h2>
<p><img src="https://miro.medium.com/v2/resize:fit:700/1*ub7gTohhFTc0c22BR3GwqA.png" alt /></p>
<p>This was the most common pain point we heard. Every UI update — big or small — has the potential to break a test. That’s because XPath selectors are tightly coupled to the app’s structure, not its intent.</p>
<blockquote>
<p><em>“DOM structure changes, XPath changes” — Jyothi Yadav, QA Lead at Thomson Reuters</em></p>
<p><em>“Flaky Tests. XPath and locator issues. Test maintenance.” — Piyush Sharma, LeadSDET at Gojek</em></p>
<p><em>“Locator changes due to UI restructuring frequently break existing tests.” — Anurag Sinha, QA Manager at Hotstar</em></p>
</blockquote>
<p>When tests fail after every sprint, confidence in automation drops. Teams stop trusting their pipelines. Manual QA fills the gap. And automation becomes something people stop investing in.</p>
<h2 id="heading-2-dynamic-uis-break-xpath"><strong>2. Dynamic UIs Break XPath</strong></h2>
<p>Modern mobile apps are highly dynamic — elements appear or shift based on scroll position, data state, and user interaction. XPath expressions, which rely on static structure, don’t survive in this environment.</p>
<blockquote>
<p><em>“Duplicate XPaths: Multiple elements with similar identifiers cause random clicks.” — Sharathchandra Singireddy, SDET at MPL</em></p>
<p><em>“Scroll handling and element identification on long, dynamic screens are major pain points.” — Avanti, QA Manager at LeapFinance</em></p>
<p><em>“Struggle with locator stability, especially for icon-only buttons or SVG elements.” — Punit, QA Lead at Flobiz</em></p>
</blockquote>
<p>Testers described scenarios where XPath pointed to the wrong icon after layout changes, or missed interactable elements because they hadn’t yet been rendered or scrolled into view.</p>
<h2 id="heading-3-no-good-locators-xpath-becomes-the-default-crutch"><strong>3. No Good Locators? XPath Becomes the Default Crutch</strong></h2>
<p>We discovered that teams don’t choose XPath out of preference, it’s often the fallback when developers don’t expose testable attributes like IDs or content descriptions.</p>
<blockquote>
<p><em>“No ID in web-based UI element — will be difficult to test.” — Ramesh Hosamani, QA Principle Lead, Akamai Technologies</em></p>
</blockquote>
<p>In other words, XPath isn’t the root problem, it’s a <strong>symptom</strong> of a deeper collaboration gap between dev and QA. Without clean, unique locators, testers are forced to reverse-engineer brittle paths through the UI.</p>
<p>These aren’t just minor inconveniences, they’re structural problems. When locators break, trust in automation breaks. When automation becomes hard to debug, it gets deprioritized. And when test maintenance takes longer than writing the feature, teams stop scaling.</p>
<p>This is why we started <a target="_blank" href="https://www.finalrun.app"><strong>Finalrun</strong></a><strong>,</strong> not to patch over these issues, but to build a fundamentally better foundation for UI automation. One that makes tests:</p>
<ul>
<li><p>Predictable across app updates</p>
</li>
<li><p>Easy to write and debug</p>
</li>
<li><p>Consistent across iOS and Android</p>
</li>
</ul>
<p>We believe that automation should mirror how users actually see and interact with the UI — not how the view hierarchy happens to be structured at runtime.</p>
<h2 id="heading-related-articles">Related articles</h2>
<p>If you want to know how we are achieving 99% accuracy UI automation with Finalrun. Read the following articles:</p>
<p><a target="_blank" href="https://blogs.finalrun.app/the-future-of-ui-element-targeting-why-finalrun-beats-xpath">The future of UI Element Targetting: Finalrun Identifiers beats Xpath</a></p>
<p><a target="_blank" href="https://hashnode.com/post/cmd8tlhm9001b02jp4g664kxu">Why LLMs Like ChatGPT, Gemini, and Claude Understand FinalRun Identifiers Better Than XPath</a></p>
<blockquote>
<p><strong>📅</strong> <a target="_blank" href="https://calendly.com/arnold-finalrun/30min">Book a Demo</a><br /><em>See how FinalRun fits into your existing workflow with a live Demo.</em></p>
</blockquote>
]]></content:encoded></item></channel></rss>