Specification-Driven Agent for Intelligent
Unit Test Generation & Execution
Solves the Oracle Problem in AI-assisted testing by grounding test generation in formal specifications — not in potentially buggy source code.
Standard AI tools generate tests that mirror the code they read — even if that code contains logic errors. The result is a false positive: tests pass, but the bug is silently certified as correct.
public boolean approveLoan(
double deposit,
int creditScore) {
// ⚠ BUG: should be creditScore > 700
return deposit > 20000
&& creditScore < 700;
}
❌ AI follows the buggy code
Test cases mirror the wrong condition and all PASS — the bug is never caught.
## Loan Approval Requirements
APPROVE if and only if:
✓ deposit > 20,000
✓ credit score > 700
REJECT if either threshold is NOT met.
✓ IntelliTesting uses the spec
Conflict detected — test FAILS, exposing the real bug before it ships.
Requirements documents — not source code — serve as the absolute standard. The specification is the ground truth the Agent must obey.
A Generate → Verify → Refine workflow powered by LangChain gives the AI self-reflection — turning it from a simple coder into a true validator.
Tests run automatically in an isolated local environment after generation. Zero configuration, zero pollution — instant and safe validation.
Generate tests directly from source code analysis. Useful for exploring existing logic, regression testing, and quickly scaffolding a test suite.
Supports custom instructions — e.g., "Add boundary tests" or "Focus on null inputs".
Provide a specification. The Agent identifies conflicts between code intent and spec requirements, then generates tests that expose real business logic bugs.
If the spec says approve when score > 700, the Agent will detect the < 700 bug.
Watch IntelliTesting detect a real business logic bug using specification-driven verification, from test generation to red test report.
⚠ Buggy Code (what the developer wrote)
return balance > 20000
&& creditScore < 700;
// Wrong — approves loans for LOW credit scores
✓ Correct Specification (the real rule)
APPROVE if:
balance > 20,000
creditScore > 700
// High credit score = low risk = approved
A two-layer system: a VS Code extension handles user interaction, while a Python backend orchestrates the AI reasoning pipeline.
Iterates until tests correctly reflect the specification — not just the code.
Full documentation for the IntelliTesting capstone project
Literature review and research background — covering the Oracle Problem, existing AI testing tools, and the motivation behind a specification-driven approach.
Full system architecture — frontend extension design (Strategy Pattern, Abstract Factory), backend LangChain agent pipeline, and API contracts.
Functional and non-functional requirements — defining expected system behaviour, constraints, and acceptance criteria for the test generation agent.
Step-by-step installation, configuration, and usage instructions for the IntelliTesting VS Code extension.
The complete final year project report — covering research background, system design, implementation, testing, evaluation, and conclusions.
One-click install from the VS Code Marketplace. Bring your own Gemini API key — stored securely in VS Code's encrypted secret storage, never shared with anyone.
v2.0.1 · Java / JUnit · Gemini 2.5 Flash · VS Code ^1.83