The rise of Generative AI represents an exciting change in the tides – opening doors and unlocking possibilities that were previously out of reach. The challenge of achieving comprehensive automated test coverage at scale has long been hindered by issues such as test fragility, unreliable results, and the need for workarounds to approximate coverage in complex scenarios. Ultimately, many of these challenges arise from an inability to capture the intent of the tester and a lack of understanding of the “why” behind each action in a test.

Historically, automation could not capture these nuances, and intent remained decoupled from test implementation. With Generative AI, we can imagine a world where test automation understands the "why" behind each action. We’re at an inflection point where we’re starting to see how AI can infuse intent into test automation, moving beyond basic interactions to understand overarching goals and user stories.

The Limitations of Script-Based Automation

Traditional test automation relies on step-by-step instructions. This means testers must specify every click, text input, and assertion. As our applications continue to become more complex, we see that these tests break down with the dynamic nature of modern applications.

  • Brittle Tests: Minor UI changes can render entire test suites useless, requiring extensive maintenance.
  • Flaky Results: Environmental factors, timing issues, and other variables can lead to inconsistent and unreliable test results.
  • Lack of Context: Traditional test automation often lacks the context needed to understand the user’s journey.

Generative AI: A Paradigm Shift

Generative AI transforms the automation process by interpreting and comprehending intent. This allows interaction with the application using natural language, mirroring user behavior, and offering an alternative to traditional testing methods.

Here’s a common example of testing a Salesforce opportunity creation workflow. With traditional scripted automation, the following would happen:

  • The exact IDs or XPaths of Salesforce components would be used to find and interact with the corresponding elements.
  • Salesforce UI updates or customizations would frequently break these tests, requiring extensive maintenance.
  • Assertions would verify the presence and properties of specific components, such as "verify that element //input[@id='opptyName'] exists."

Let's imagine we begin with our intended outcome. Instead of concentrating on the page's underlying mechanics, we could start with our goal. For instance, suppose our test aims to validate the following workflow:

Verify the opportunity creation workflow

Requirements:

  1. Log in
  2. Navigate to the Opportunities tab
  3. Create new opportunity with existing account

With tools like mabl, we can use our intent, whether that’s in the form of a user story, requirements, or test case as a starting point.

image2-Mar-26-2025-07-00-08-9789-PM

With mabl’s GenAI test creation capabilities, we can generate an outline of our test with this intent in mind. Generative AI can decompose our intent into necessary actions needed to achieve our goal, leveraging reusable components to ensure those tests follow best practices. 

image3-Mar-26-2025-07-00-09-8081-PM

Unlike our traditional automation example, we can create and define assertions that align with the goals of our test case. Once we’ve logged into the application, what do we expect a user to see to indicate that this action has been successful? Rather than relying on DOM attributes such as the innerText of a specific element, we can holistically evaluate the experience to ensure it aligns with our intent using GenAI assertions

image1-Mar-26-2025-07-00-09-1686-PM

By using GenAI test creation, we can translate our intent—user stories, requirements, or test cases—directly into test outlines, leveraging best practices and reusable components. Then, with GenAI assertions, we can validate the holistic user experience, moving beyond DOM-specific checks to ensure our tests truly reflect our intended outcomes. This approach significantly streamlines test creation and enhances the reliability of our automation, allowing us to focus on delivering high-quality user experiences.

The Future of Intent-Driven Automation

The shift to intent-driven testing is transforming automation. Tools like mabl enable us to move beyond brittle scripts, helping to translate user stories into robust tests. This leads to reduced maintenance, increased coverage, and a focus on user experience.

Imagine automation that adapts, anticipates, and provides actionable insights. This future is becoming reality as AI matures and integrates more deeply into our workflows. We're moving from flaky results to intelligent, intent-aware testing, unlocking the full potential of automation to build better software, faster.

And this is just the beginning. The field of Generative AI in testing is rapidly evolving, with more exciting developments on the horizon, including a few on our own product portal.

Try mabl Free for 14 Days!

Our AI-powered testing platform can transform your software quality, integrating automated end-to-end testing into the entire development lifecycle.