Agentic Testing: Enhancing Resilience in Software Systems at Slack
In the fast-paced world of software development, continuous delivery poses unique challenges. One of the most pressing issues is the frequent failures of end-to-end (E2E) tests, often triggered not by genuine functional regressions, but by superficial changes in user interfaces or services. To navigate these challenges, Slack engineering has pioneered a novel approach known as agentic testing, which integrates AI agents into the testing paradigm to bolster resilience in large distributed systems.
The Evolving Landscape of End-to-End Testing
Traditional E2E tests are founded on the premise of fixed steps and stable selectors. This approach works well when systems are static, but in the modern landscape where applications are dynamic and frequently updated, these assumptions break down. As Slack engineers have observed, the repercussions of this shift include increased maintenance overhead for engineering teams who find themselves constantly adjusting tests to match the latest UI or API changes.
What is Agentic Testing?
Agentic testing represents a significant departure from conventional testing methods. Instead of relying on rigid, predefined sequences, this innovative approach allows for testing based on higher-level intent. In agentic testing, tests are articulated as objectives, which AI agents then interpret and execute against the application.
The agent evaluates the application state at each step of the workflow, dynamically selecting actions to continue execution even in the face of minor changes—be it a relocated UI element or modified structure. This adaptability aims to minimize test failures that arise from superficial changes, thus reducing the overall maintenance burden on engineering teams.
Workflow in Agentic Testing
The execution workflow in agentic testing begins with the test intent being communicated to the agent. This is a drastic shift from the traditional method, which typically involves:
Traditional Testing Flow:
click → click → type → assert
Instead, agentic testing employs a more fluid and adaptable model:
Agentic Testing Flow:
goal → agent adapts → verify result
The agent takes the initiative to plan and execute actions, observe results, and iterate until either the objective is reached or a stopping condition presents itself. Throughout this process, execution traces are recorded, capturing every decision and interaction made along the way.
Addressing Current Limitations
Despite its advantages, Slack engineers point out that agentic testing is currently best suited for targeted debugging and exploratory testing rather than for frequent use in continuous integration pipelines. This approach allows teams to leverage the flexibility of AI-driven agents specifically where traditional scripted tests may falter, particularly due to UI changes.
Constraints and Observability
To maintain a controlled testing environment, specific constraints govern the behavior of agents during execution. These include limitations on allowed actions and established boundaries for exploration, ensuring that the agents operate within predictable parameters. Observability is a critical component of agentic testing; structured execution logs enable teams to review and analyze each step taken by the agent, making it easier to replay tests and inspect failures when they occur.
Complementing Existing Testing Methodologies
Importantly, agentic testing is not intended to replace existing testing frameworks. Instead, it serves as a complementary capability within a more extensive testing strategy. Deterministic tests remain essential for verifying critical logic and maintaining contract correctness. Agentic testing shines in scenarios where workflows are susceptible to UI and structural changes, providing an additional layer of resilience.
Moreover, while scripted tests offer stable verification for predefined user journeys, agent-based execution thrives in complex scenarios requiring adaptability, such as debugging flaky workflows or reproducing elusive production issues. The integration of both approaches creates a robust testing framework capable of navigating the challenges of fast-changing software environments.
Visualizing the Testing Pyramid
Slack’s blog post visually encapsulates the testing hierarchy with a testing pyramid that delineates the various layers of testing methodologies, including Unit Tests, Integration Tests, E2E Testing, and, crucially, Agentic Testing. This hierarchy highlights how agentic testing occupies a strategic position at the end of the spectrum, focusing on workflows sensitive to UI changes while maintaining rigorous testing protocols established by traditional approaches.
In summary, Slack engineering’s innovative exploration of agentic testing exemplifies how AI-driven approaches can address the inherent flaws in conventional testing paradigms. By embracing a goal-oriented model, teams can reduce failures from superficial changes and streamline their testing efforts, ensuring that they maintain resilience in complex, dynamic software systems. As the landscape of software development continues to evolve, frameworks like agentic testing are likely to play a pivotal role in shaping how we ensure quality and reliability in our applications.
Inspired by: Source

