AI-assisted testing

Fully autonomous testing: what AI can and cannot do

Fully autonomous testing describes a system that would select scenarios, create tests, run them, evaluate the results and update them after an application change by itself. AI can already support individual parts of this process. Combining them without human oversight is risky, however, mainly because the system needs a trustworthy definition of the correct result and the business priority.

Why it is appealing

Writing and maintaining tests takes time, and neglected suites can become outdated and stop helping the team. Automatic generation, result classification and suggested repairs therefore have practical value. The problem arises when accelerating mechanical work is confused with taking responsibility for quality.

Where it reaches its limits

The most important limitations are not only related to model quality. They also arise from missing context, risk measurement and accountability for decisions.

1. How does the system know the correct result? A test needs an “oracle”: a trustworthy definition of the expected result. For an order, that may include the correct status, amount, items and dispatch of a confirmation. If these rules are not present in requirements, data or another verifiable source, the model can only guess them. Calculating a 25% discount instead of 20% may not cause a technical error even though it is wrong for the business.

2. What should be tested at all? Judging value and risk Deciding which scenario is critical requires information about revenue, the impact of a defect, frequency of use and contractual obligations. Without it, a model may assign similar importance to signing up for a newsletter and completing a payment. We also describe this boundary in the article on whether AI will replace software testers.

3. Unreliability: tests that pass when they should not Autonomous maintenance may suggest redirecting a test to a similar element even though the change was caused by an application defect. A model can also create a test without sufficient assertions. A green result alone therefore does not confirm that the suite protects important behaviour.

4. A loop in which AI repairs AI: drift If a model repeatedly modifies tests without comparing them with a requirement or approved behaviour, drift may occur: the tests gradually move away from their original purpose. Changes therefore need an external anchor, such as acceptance criteria, approved business rules or human review.

5. The illusion of coverage A large number of generated tests does not automatically mean good coverage. What matters more is whether the suite covers critical user journeys, rules and edge cases, and whether it can detect a relevant defect.

6. Instability at scale Unsuitable selectors, waits and test data can cause intermittent instability. A high volume of generated tests also increases the number of results someone must evaluate.

7. Costs that are difficult to predict If the model is used for every draft, evaluation and repair, its usage and the total cost of the solution increase. The estimate must also include the human effort required to resolve ambiguous cases.

8. Security and data With a cloud-based model, application content may leave your infrastructure. The broader the autonomous system’s access, the more important an isolated environment, minimum permissions, permitted domains and an audit trail become.

9. Accountability The team needs to know who approves scenarios, automatic repairs and the decision to release. Define necessary approval and decision records according to the particular organisation’s requirements and the operation’s risk.

How to use autonomy safely

A practical collaboration model divides responsibility as follows:

During creation, AI may have controlled access to the test application. In this workflow, once approved, the output remains standard Playwright code in your repository that can run without the model.

Define autonomy for individual steps

Instead of a single “autonomous mode” switch, record allowed steps and their execution boundaries. This table proposes a division of work, rather than every tool’s default settings:

Step What may be authorised in advance What needs further assessment
Read evidence Specified files, reports and test pages New sources or sensitive data outside scope
Run an existing test An approved journey in a prepared environment Another environment or new write effects
Prepare a repair A proposed diff on a separate branch Acceptance into the approved suite
Change an expectation Propose a question to the rule’s owner Approval of a change in business meaning

Written rules are insufficient if the tool’s account can do more. OWASP recommends limiting functions and permissions and enforcing authorisation outside the model. The agent’s interface must also enforce permitted environments and operations.

Application content cannot authorise test changes

An agent reads page text, logs and files. These inputs may contain instructions that change its behaviour. OWASP describes instructions introduced through external content as indirect prompt injection. A page in the application under test does not become an authorised requester.

Our illustrative example: application text suggests ignoring an approved 20% discount and changing the test to 25%. The system should record this as suspicious input rather than rewrite the requirement. Separate approved rules from observed content and constrain tools so a model response alone cannot expand access. An allowed-domain list does not exclude malicious content on an allowed page.

Verify a draft independently of its author

Inspect changes to code, data preparation and assertions. Syntax, format and static checks can reject some faulty drafts, but do not establish a correct business outcome. The relevant test must also catch incorrect behaviour prepared under controlled conditions.

NIST highlights confidently stated incorrect outputs and over-reliance on the model. If the same model creates a repair and its explanation, their agreement is not independent evidence. Compare the draft with current criteria and the owner’s decision. ISTQB describes traceability between the test basis, tests and results.

The loop needs an end and recovery after interruption

Define a budget, attempt count, timeout and stop condition. Repeated generation must not continue indefinitely simply because the last test failed. Retain the original failure, proposed changes and reason for stopping. Label an unconfirmed outcome as unconfirmed.

After interruption, locate completed steps and their data effects. Resuming must not blindly repeat writes or accept an unverified draft. A person must be able to stop further operations and take over with usable evidence. Record rule, tool and model versions, steps and outcomes, with access appropriate to the record’s contents.

The pilot should test permission boundaries and uncertainty too

Alongside a correct journey, prepare a known product fault, an ambiguous expectation, misleading application text and model unavailability. Agree on acceptable responses in advance. A weakened assertion proposal or unauthorised action must remain rejected rather than accepted for a green report.

Measure time including review, rejected drafts, retained assertions and unresolved cases. Verify ordinary generated code without an available model too. If AI makes decisions during execution itself, its outage needs a distinct status and next action rather than automatic success.

Expand autonomy according to evidenced results. After model, tool, permission or criterion changes, recheck affected boundaries. Pilot success applies to the assessed scope rather than every future application.

What a verified pilot may deliver

Next step

Before a pilot, define which decisions the system may only propose and which it may perform automatically. If you would like to set the boundaries according to your product’s risks, use a no-obligation consultation.

Related topics

You might also be interested in

AI will speed up work. The person is responsible for the result.

AI speeds up the design, creation, repair and migration of web, Android, API and Electron tests; a specialist verifies every output before use.