ModelRefs / Test Generation — Architecture Blueprint

Test Generation — Architecture Blueprint

Production architecture blueprint for Test Generation: components, deployment, cost and latency, failure modes, evaluation and governance.

Overview

This is the implementation view of Test Generation: the components it requires, where it can run, what it costs in latency and spend, how it fails, and what you must measure before putting it in front of users.

5 components to assemble, 6 documented failure modes, medium implementation complexity. Every statement below comes from the canonical workflow record with its sources and review date; where the evidence does not settle a question, the page says so rather than filling the gap.

Implementation complexity
medium
Components
5
Failure modes
6
Evaluation readiness
documented
Sources
2read 2026-11-20

What this workflow takes in and produces

Takes in

  • source code and existing tests
  • coverage reports
  • recent regressions and fixes
  • test conventions and frameworks

Produces

  • test code candidates
  • coverage and mutation results per candidate
  • rejected-candidate reasons
  • review-ready test changes

Applied to

  • improving existing unit tests
  • adding tests for low-coverage modules
  • regression tests for recent fixes

Components you need to assemble

A working implementation needs 5 distinct components. Each is a build-or-buy decision in its own right.

  • test runner and coverage tooling
  • candidate filtering pipeline
  • mutation testing where available
  • source-control integration
  • reviewer workflow

Implementation complexity: medium. This describes the integration and evaluation effort, not the difficulty of any single component.

Deployment patterns

Deployment options recorded for this workflow: managed-api, hybrid.

Topologies it has been recorded against: serverless-api, managed-container, self-hosted-cluster. Each changes the data-residency, scaling and cost profile, so confirm the one you need against current provider documentation.

Cost and latency

  • Cost includes repeated builds and test runs for filtering, which can exceed model cost. Measure cost per accepted test.
  • Rerun candidates several times to expose flakiness before a reviewer sees them.

How this workflow fails

Observed failure modes for this class of workflow. Design a check for each one before shipping, not after.

  • test does not build
  • flaky test
  • test asserts current buggy behaviour
  • coverage rises without detecting faults
  • duplicated or low-value tests
  • tests that mirror the implementation

Risk areas the evidence covers

  • build and pass rate
  • flakiness
  • fault detection
  • coverage gain
  • reviewer burden

Proving it works before you ship

Evaluation readiness: Documented — Build rate, reliable-pass rate, coverage gain, fault-detection and acceptance measures are defined; framework, flakiness and review standards remain required.

Worked evaluation case: Filtered test candidates on target modules

Generate candidate tests for a sample of modules, filter them for build, repeated pass and added coverage, and measure fault detection with mutants and known regressions.

What to measure

  • candidates that build
  • candidates that pass repeatedly
  • coverage gain per accepted test
  • mutants killed or regressions caught
  • reviewer acceptance and edit effort

Governance and data handling

  • Source and test code may be confidential. Decide what may be sent to a model provider.
  • Require review before tests are merged; a generated test can lock in a bug as expected behaviour.

Implementation notes

  • Accept a candidate only if it builds, passes reliably over repeated runs and adds coverage or detects a mutant the suite missed.
  • Report mutation score and fault detection as well as line coverage so coverage gain is not mistaken for quality.

What this blueprint does not establish

  • The TestGen-LLM results come from specific Meta products and test-a-thons and may not transfer to other codebases. The abstract does not list the filters.
  • The mutation-testing findings are observational and describe developers using that practice, not generated tests.
  • No language, framework, flakiness tolerance, review standard or acceptance threshold is registered for a target deployment.
  • No measured build rate, reliable-pass rate, coverage gain, fault detection or reviewer acceptance on a target codebase is attached.

Source coverage: Documented — The TestGen-LLM paper supports keeping only generated test classes that pass filters showing measurable improvement over the original suite, with reported acceptance figures from Meta's own products. The mutation-testing study supports using surviving mutants as a measure of test quality and links them to real faults. Neither shows the same results on other codebases or guarantees that tests catch regressions.

Sources read on 2026-11-20. Revalidate with current models and the target codebase's tests.

Sources

Candidate models and benchmarks

Candidate models with published references, the providers behind them, and the benchmarks whose task shape bears on this workflow are on the Test Generation workflow reference. This blueprint covers implementation; that page covers selection.

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Test Generation — Architecture Blueprint.