Visdom
Testing

A multi-layered testing strategy for teams shipping AI-generated code. When AI writes the code and the tests, who tests the tests?

Part of Visdom · VirtusLab's AI-Native SDLC

The circular quality problem

AI generates both implementation and tests. Traditional metrics break down.

01 Circular Tests

Tests pass because they encode the same assumptions as the code.

02 Metric Inflation

90% line coverage, 0 computation bugs caught.

03 Architecture Erosion

AI takes the shortest path. Controllers call repositories directly.

04 API Regression

AI reaches for deprecated APIs from training data.

The evidence

Same agent, same CRUD task, 10 repetitions. The numbers speak for themselves.

ArchUnit experiment — 10 runs each

Without ArchUnit With ArchUnit
Layer bypass 10/10 violations 0/10 violations
Field injection 1/10 0/10
Generic exception 1/10 0/10
Compilation required? Yes (violations compile) Violations fail the build

Property-Based Testing vs Traditional — metric comparison

Metric Traditional Property-Based Combined
Line coverage 90% 80% 90%
Mutation score 73% 55% 73%
Bugs found 0/2 2/2 2/2
The critical insight: By every standard metric, the traditional suite looked better. Property-based testing found both computation bugs — early rounding of discount rate and wrong rounding mode on VAT — that 90% line coverage and 16 hand-written tests missed entirely.

Sound familiar?

Real patterns from enterprise teams adopting AI-assisted development.

Your Engineering ManagerKatja's problem

"Our test suite takes 45 minutes and 84% of the failures are flaky. Developers don't trust CI anymore."

Your QA LeadTomek's problem

"We hit 90% coverage then three pricing bugs shipped. The AI copied the implementation logic into the assertions."

Your Senior DeveloperPriya's problem

"Copilot bypassed the service layer, used RestTemplate instead of RestClient, and the tests mocked everything."

No single shape fits all

The right testing strategy depends on your architecture. Visdom Testing adapts to your stack.

FAQ

See all questions →
Part of Visdom

VirtusLab's AI-Native SDLC

Read the
full reference

Architecture, layer docs, metrics framework, and the evidence behind each technique.