IntelliTesting

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.

LangChain Cognitive Loop Gemini 2.5 Flash LLM Local Sandbox Execution Zero Configuration

The Oracle Problem

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.

LoanApproval.java
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.

Specification Document (Source of Truth)
## 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.

Three Core Design Philosophies

📋
Pillar 1

Spec-Driven Generation

Requirements documents — not source code — serve as the absolute standard. The specification is the ground truth the Agent must obey.

🔄
Pillar 2

Cognitive Loop

A Generate → Verify → Refine workflow powered by LangChain gives the AI self-reflection — turning it from a simple coder into a true validator.

🔒
Pillar 3

Local Sandbox Execution

Tests run automatically in an isolated local environment after generation. Zero configuration, zero pollution — instant and safe validation.

MODE 1

Code Review

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".

MODE 2

Code Verification

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.

See It In Action

Watch IntelliTesting detect a real business logic bug using specification-driven verification, from test generation to red test report.

Demo Scenario — Loan Approval Bug

⚠ 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
1
Select Code
Highlight the function in VS Code, trigger IntelliTesting
2
Review Plan
Agent proposes test scenarios — approve or edit each one
3
Add Spec
Paste the requirements doc — Agent detects the conflict
4
Tests Fail ✓
Red report exposes the bug — spec wins over buggy code
2
Operating Modes
Java
Test Language
LangChain
AI Framework
Gemini
LLM Backend

System Architecture

A two-layer system: a VS Code extension handles user interaction, while a Python backend orchestrates the AI reasoning pipeline.

Frontend  ·  VS Code Extension (TypeScript)
🖥️
Webview UI
User interaction panel
Strategy Pattern
Switches between modes
🏭
Abstract Factory
Multi-language support
HTTP REST API
Backend  ·  Python FastAPI + LangChain Agent
⚙️
FastAPI
REST endpoints
🧠
LangChain Agent
Orchestration layer
Gemini 2.5 Flash
LLM reasoning
🧪
Local Sandbox
JUnit execution
Cognitive Loop — Self-Reflection Mechanism
📝  Generate
produce test cases
🔍  Verify
run & inspect results
✏️  Refine
fix & improve

Iterates until tests correctly reflect the specification — not just the code.

Project Documents

Full documentation for the IntelliTesting capstone project

Try IntelliTesting Today

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