Quality Engineering Demo

Intelligent Test Generation Agent

A test agent that plans cases from a diff, generates runnable tests, critic-checks stability, and records progress.

Runnable demo · Repo path: workshops/workshop2-test-generation

Structure Blueprint

Intelligent Test Generation Agent blueprint

Clickable pattern simulator

Interactive Browser Demo

This simulator does not replace the CLI run, but it makes each step, state, log, gate and final output visible in the browser.

Live pipeline

State inspector

Execution log

Current output

Step-by-step Design

01

Read change set

Separate touched code, current tests and coverage gaps.

Context Triage
02

Plan cases

Turn the diff into boundary, regression and negative cases.

Plan-and-Execute
03

Generate tests

Create pytest-style test bodies from the plan.

Tool Dispatch
04

Critic pass

Check determinism, assertions and fixture style.

Generator-Critic
05

Verify run

Repair once when tests fail for mechanical reasons.

Self-Heal Loop
06

Persist progress

Record generated cases to avoid duplicated work.

Progress Tracking

Screenshots

Terminal output: test plan, generated cases, critic pass and progress log.
Terminal output: test plan, generated cases, critic pass and progress log.

Pattern Mapping

PatternDesign role
Plan-and-ExecuteGeneration needs an explicit test plan before code emission.
Generator-CriticGenerated tests must be checked by a separate role.
Self-Heal LoopA bounded repair loop handles mechanical failures without hiding ambiguity.
Progress TrackingThe agent should remember generated coverage across PRs.

Design Insights

Runnable beats plausible

A test that looks good but cannot run is negative value.

Critic grounding matters

The best critic is grounded in deterministic checks: import, assertion, fixture, and test result.

Progress prevents churn

Without progress tracking, the same cases get regenerated again and again.

Run Path

cd workshops/workshop2-test-generation python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt python src/main.py open visual/index.html
READMEworkshops/workshop2-test-generation/README.md
Blueprintimages/training/visual/workshop2-test-generation-blueprint.png