Home Software Testing

Turning testing into context for AI development

Test artifacts and execution evidence give AI the product context it needs to build toward expected behavior and reduce costly rework.

Software-testing-2_MM

AI can generate code in seconds, but speed does not mean the code is ready to ship. An AI agent can have access to product requirement documents (PRDs), Jira tickets, and design documents, and still miss the product-specific knowledge that tells it how existing functionality is supposed to behave.

Consider a healthcare organization adding a feature that allows patients to reschedule appointments online. An AI agent may have the necessary materials outlining what to build, but still miss an existing rule requiring longer time slots for certain appointment types. The agent completes the software in seconds, dramatically accelerating initial development. The developers then pass the code to a software tester, who runs the new function through the tests they deem relevant. This is when the process breaks down.

The testers find several bugs, most notably that the rescheduling feature does not automatically allocate longer time slots for certain appointment types – a function that worked before the AI development cycle began. Developers must then pause their existing tasks to rework and revalidate the AI-generated code. Even after correction, the software development team cannot know whether other overlooked edge cases will surface in production.

The hypothetical scenario demonstrates a reality that development professionals have become all too familiar with: AI-driven cycles of debugging and failed tests. These iterations limit the tool’s efficiency. In fact, around 80% of surveyed software engineers reported an average AI productivity acceleration of only 3%, and 30% even reported that team productivity fell while using AI.

What AI lacks is the product-specific context that shows how the software is expected to behave in production. Much of this context already exists in test artifacts and execution evidence, which capture business rules, edge cases, and historical behavior that may not appear in a new requirement or Jira ticket. However, that knowledge often doesn’t come into play until late in the software development lifecycle (SDLC). To make AI a more effective development tool, organizations should consider a testing-as-context approach that delivers necessary information before development begins.

Bring Testing into the Build

By providing AI and developers with the appropriate context from the start, AI can build toward the correct behavior rather than relying on static specifications alone. This process also supplies insight into business rules that help ensure existing functionality continues to work as AI develops.

To put this approach into practice, organizations should:

      1. Give AI the relevant test artifacts and execution evidence. QA teams should determine which test cases, test scripts, test results, failed runs, requirements, error messages, data logs, and defect references are appropriate for a specific build and make that context available to AI and developers.
      2. Perform test gap analysis. Organizations can leverage AI to compare current tests against requirements and code changes, enabling the technology to generate new tests or update existing ones to address coverage gaps.
      3. Keep test suites current. Development and QA teams must keep test suites and test cases up to date with execution results, product versions, and commits under test to help AI understand what caused a failed run.
      4. Connect workflows with human oversight. AI can use the previous steps as a foundation to connect testing workflows across the SDLC, automating certain processes while maintaining human review at consequential decision points.

By following a framework that brings testing information into development earlier, organizations can establish a behavioral context layer that informs AI of how the system behaves under real-world execution conditions. With that baseline, AI can build toward expected behavior from the early stages of the development process, leaving developers with less rework and debugging.

The Next Benchmark Is Trust

Consider the appointment scheduling example again. This time, the healthcare organization has adopted a tests as context approach. Now, AI receives relevant test artifacts and execution evidence before it begins development. The technology builds to the behavior these items outline, testing the new feature as it goes. It identifies missing coverage, creates new tests, and updates the test suites with results.

Since it has access to existing business rules, the rescheduling change accounts for established functionality. Human developers step in where needed and review the code before it ships. With this oversight, the rescheduling feature moves into production with greater developer confidence in the AI-generated behavior.

The hypothetical example reflects a broader shift in AI-augmented development. Software teams have overcome the obstacle of generating code quickly. They must now ensure that AI-assisted software can be trusted. Tests as context brings organizations closer to this goal by enabling them to produce auditable, traceable, and reliable AI-generated code.


Datacap - We Solve Payment Problems
Patrícia Duarte Mateus

Patricia Duarte Mateus brings over a decade of experience in quality assurance, collaborating on diverse projects across multiple teams and international cultures. She currently serves as Solution Architect and QA Advocate at TestRail/Sembi, where she drives innovative QA strategies and champions best practices in software testing. Known for her curiosity, analytical expertise, and goal-oriented approach, Patrícia combines deep technical knowledge with exceptional communication skills to inspire and lead teams in delivering high-quality solutions.

×