Reference pattern
Test Automation Draft Generator
This reference pattern illustrates a small, human-gated way to start AI-assisted automation without building a larger platform first.
← Back to In PracticeProblem
Teams often want AI-assisted automation without first building a large multi-agent platform.
Conceptual architecture
Start with reviewed test expectations, discover the conventions of the existing repository, generate a review-ready draft, explicitly identify uncertainty, and require approval before writing to the repository. Verification and repository review then determine whether the automation joins the shared suite.
Explicit gaps, not confident guesses
- Selector unknown
- Test data needed
- Reusable component missing
- Clarification required
Transferable principles
- Discover the repository's conventions each time instead of assuming a house style.
- Reuse existing abstractions; never silently invent a selector or page object.
- Map each test step to an action and each expected result to a meaningful assertion.
- Prefer an explicit gap over a confident guess.
- Write nothing to the repository without approval from the responsible engineer or an authorized reviewer.
- Verify the approved draft in a suitable test environment — meaningful assertions, reliable runs — and give it the usual repository review before it joins the shared suite.
Reviewed Test Case
From the test-management system
Discover Repo Conventions
Re-read on every run
Generate Draft
Surface Explicit Gaps
Flag uncertainty instead of guessing
Human Review
An engineer approves before anything is written
Approved Automation Draft
Verified and reviewed before joining the suite
Connection to Hyper-Agile Quality Engineering
AI drafts and a responsible engineer approves, with uncertainty stated rather than hidden. Approval is not the finish line: verification in a test environment and normal repository review establish whether the automation is trustworthy enough for the shared suite. A team can adopt it incrementally, one reviewed test case at a time.
Framework pillars
- Enabled Ownership
- Informed Confidence
Supporting practices: Review-first AI, Human-gated automation, Incremental adoption
Hypothetical example
A team on a fictional subscription app automates the reviewed test case “Reset password with an expired link.”
- 1.The generator reads how the repository's existing tests are organized, finds a reusable login helper, and drafts the test from the reviewed expectations in the repository's style.
- 2.It flags “Selector unknown” for the expired-link message and “Test data needed” for an expired reset token.
- 3.An engineer resolves both gaps and checks that the draft's assertions meaningfully cover the reviewed expectations.
- 4.With the engineer's approval, the draft is written to the repository.
- 5.The test is run in a suitable test environment to confirm its assertions and reliability, then goes through the usual repository review before joining the shared suite.
This is a conceptual reference pattern. Examples are hypothetical, and any implementation should be adapted to each organization's tools, risks, and constraints.
The architecture is the visible part
Deciding what deserves deeper validation, which signals can be trusted, and who owns the decision is the operating model behind this pattern. An organizational engagement can start with one workflow like this one; workshops can help a team apply the approach. The operating model is developed in Hyper-Agile Testing.
Other reference patterns