Skip to content
Testing
Command

/aqe-generate

Generate comprehensive test suites using AI-powered analysis and sublinear optimization

From plugin
agentic-qe
534149 skills169 agents149 commands1 MCP
> /plugin marketplace add proffesor-for-testing/agentic-qe
> /plugin install agentic-qe-fleet@agentic-qe

Command definition

aqe-generate.md
name: aqe-generate
description: Generate comprehensive test suites using AI-powered analysis and sublinear optimization

AQE Generate Tests

Generate comprehensive test suites using AI-powered analysis and sublinear optimization algorithms.

Usage

aqe generate <target> [options]
# or
/aqe-generate <target> [options]

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | `target` | path | **required** | Source code path to generate tests for | | `--type` | enum | `unit` | Test type: unit, integration, e2e, performance, security | | `--framework` | string | `jest` | Testing framework: jest, mocha, cypress, playwright, vitest | | `--coverage` | number | `95` | Target coverage percentage (0-100) | | `--property-based` | boolean | `false` | Enable property-based testing | | `--mutation` | boolean | `false` | Enable mutation testing | | `--parallel` | boolean | `true` | Generate tests in parallel | | `--output` | path | `./tests` | Output directory for generated tests | | `--swagger` | path | - | OpenAPI/Swagger spec for API testing | | `--dry-run` | boolean | `false` | Preview without writing files |

Examples

Basic Unit Test Generation

aqe generate src/services/user-service.ts

Generates unit tests for a single service file using default settings (Jest, 95% coverage).

E2E Tests from API Spec

aqe generate src/api --type e2e --swagger api-spec.yaml --framework cypress

Generates end-to-end tests from OpenAPI specification using Cypress.

Property-Based Testing

aqe generate src/utils --type unit --property-based --coverage 98

Generates property-based tests for utility functions with high coverage target.

Security Test Suite

aqe generate src/ --type security --framework jest --mutation

Generates comprehensive security tests with mutation testing enabled.

Multi-Framework Generation

# Generate Jest unit tests
aqe generate src/services --type unit --framework jest

# Generate Cypress E2E tests
aqe generate src/features --type e2e --framework cypress

# Generate Playwright integration tests
aqe generate src/api --type integration --framework playwright

Integration with Claude Code

Spawning Test Generator Agent

// Use Claude Code's Task tool to spawn the test generator agent
Task("Generate comprehensive test suite", `
  Generate tests for the user authentication module:
  - Path: src/services/auth/
  - Framework: Jest
  - Coverage target: 95%
  - Include property-based tests
  - Generate boundary tests for edge cases

  Coordinate with coverage analyzer for gap analysis.
  Store results in memory under: aqe/test-generation/auth-module
`, "qe-test-generator")

Parallel Generation Workflow

// Spawn multiple test generators in parallel for different modules
[Single Message]:
  Task("Generate API tests", "Create tests for API endpoints", "qe-test-generator")
  Task("Generate Service tests", "Create tests for service layer", "qe-test-generator")
  Task("Generate Utils tests", "Create tests for utilities", "qe-test-generator")

  TodoWrite({ todos: [
    {content: "Generate API tests", status: "in_progress", activeForm: "Generating API tests"},
    {content: "Generate Service tests", status: "in_progress", activeForm: "Generating Service tests"},
    {content: "Generate Utils tests", status: "in_progress", activeForm: "Generating Utils tests"},
    {content: "Analyze coverage gaps", status: "pending", activeForm: "Analyzing coverage gaps"}
  ]})

Agent Coordination

Primary Agent

  • **qe-test-generator**: Main agent responsible for test generation

Supporting Agents

  • **qe-coverage-analyzer**: Analyzes existing coverage to identify gaps
  • **qe-quality-gate**: Validates generated test quality

Coordination Flow

1. Pre-Task Hook
   ├─> Retrieve existing coverage data
   ├─> Retrieve test patterns from neural learning
   └─> Analyze source code structure

2. Test Generation
   ├─> Parse source code and dependencies
   ├─> Generate test cases using AI
   ├─> Apply framework-specific patterns
   └─> Validate test syntax

3. Post-Task Hook
   ├─> Store generated tests in memory
   ├─> Update coverage projections
   ├─> Train neural patterns
   └─> Notify fleet of completion

Memory Operations

Input Memory Keys

# Retrieve existing coverage baseline
npx ruflo@3.76.0 memory retrieve --key "aqe/coverage-baseline"

# Retrieve learned test patterns
npx ruflo@3.76.0 memory retrieve --key "aqe/test-patterns"

# Retrieve source code analysis
npx ruflo@3.76.0 memory retrieve --key "aqe/source-code/${target}"

Output Memory Keys

# Store generation results
npx ruflo@3.76.0 memory store \
  --key "aqe/test-generation/results" \
  --value '{"tasksGenerated": 45, "projectedCoverage": 96}'

# Store generated test suite metadata
npx ruflo@3.76.0 memory store \
  --key "aqe/test-suite/${target}" \
  --value '{"framework": "jest", "testCount": 45, "timestamp": "2025-09-30T10:00:00Z"}'

# Store coverage projection
npx ruflo@3.76.0 memory store \
  --key "aqe/coverage-projection" \
  --value '{"before": 78, "after": 96, "improvement": 18}'

Hooks and Coordination

Pre-Task Hook

# One id per run; post-task below records the outcome against it
TASK_ID="aqe-generate-$(date +%s)"
npx ruflo@3.76.0 hooks pre-task \
  --task-id "${TASK_ID}" \
  --description "Generate tests for ${target}"

Post-Edit Hook (for each generated test file)

npx ruflo@3.76.0 hooks post-edit \
  --file "${TEST_FILE}" \
  --success "${TEST_FILE_WRITTEN:?set to true or false}"

Post-Task Hook

# Set TASK_SUCCEEDED to true or false from the actual result; results go to `memory store` above
npx ruflo@3.76.0 hooks post-task \
  --task-id "${TASK_ID:?run the pre-task block first, in the same shell}" \
  --success "${TASK_SUCCEEDED:?set to true or fals
Read more
@proffesor-for-testing
Ships withagentic-qe

Quality engineering tools for your coding agent. Generate tests, investigate coverage gaps, analyze flaky behavior and coordinate quality checks across the software lifecycle. Keep the findings close to the code and use them to make a better quality decision.

534119 skills169 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
534
Star history of proffesor-for-testing/agentic-qe on GitHub, a chart by star-history.com

Other commands on agentic-qe.

More commands from other plugins.

bkit

bkit

Command

bkit plugin help - Show all available bkit functions. Workaround for skills autocomplete issue. Use "/bkit" or just type "bkit…

bkit2d605
@popup-studio-ai@popup-studio-aiInstall Command
review

review

Command

Open the Canary session viewer and triage a recorded session.

canary4w500
@0xnyn@0xnynInstall Command