agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Intelligent test suite generator with framework detection, programmatic structure analysis, and comprehensive test creation
How it fires
How this command gets triggered: by you, by Claude, or both.
/test-genContext preview
What this command does when you run it.
Intelligent test suite generator with framework detection, programmatic structure analysis, and comprehensive test creation
allowed-tools: Task, Read, Write, Edit, MultiEdit, Bash(fd:*), Bash(rg:*), Bash(jq:*), Bash(bat:*), Bash(eza:*), Bash(gdate:*), Bash(wc:*), Bash(head:*), Bash(mvn:*), Bash(gradle:*), Bash(cargo:*), Bash(go:*), Bash(deno:*), Bash(npm:*) name: "Test Gen" description: "Intelligent test suite generator with framework detection, programmatic structure analysis, and comprehensive test creation" author: "wcygan" tags: ["test","generate"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
STEP 1: Initialize intelligent test generation session with comprehensive project analysis
# Initialize test generation session state
echo '{
"sessionId": "'$SESSION_ID'",
"target": "'$ARGUMENTS'",
"detectedLanguages": [],
"testingFrameworks": [],
"existingTestCount": 0,
"generatedTests": []
}' > /tmp/test-gen-session-$SESSION_ID.jsonSTEP 2: Multi-language framework detection with intelligent routing
**JavaScript/TypeScript Projects:**
# Detect testing framework from package.json
fd "package.json" . | xargs jq -r '.devDependencies // {} | keys[]' 2>/dev/null | rg "(jest|vitest|mocha|ava)"
# Deno projects
fd "deno.json" . | xargs jq -r '.tasks // {} | keys[]' 2>/dev/null | rg "test"
# Test file patterns
fd "(test|spec)\.(js|ts|jsx|tsx)$" . --max-depth 2**Rust Projects:**
# Cargo.toml analysis fd "Cargo.toml" . | xargs rg "\[dev-dependencies\]" -A 10 2>/dev/null || echo "No Cargo.toml found" fd "(lib|main)\.rs$" . | xargs rg "#\[cfg\(test\)\]" 2>/dev/null || echo "No Rust test modules found"
**Go Projects:**
# Test file detection fd "_test\.go$" . 2>/dev/null || echo "No Go test files found" go list ./... 2>/dev/null | rg "test" || echo "Go modules not available"
**Python Projects:**
# Testing framework detection fd "(requirements|pyproject)\.(txt|toml)" . | xargs rg "(pytest|unittest|nose)" 2>/dev/null || echo "No Python test frameworks detected" fd "test_.*\.py$|.*_test\.py$" . 2>/dev/null || echo "No Python test files found"
**Java Projects:**
# Maven/Gradle test detection fd "pom\.xml$" . | xargs rg "(junit|testng|mockito)" 2>/dev/null || echo "No Maven test dependencies" fd "build\.gradle$" . | xargs rg "(junit|testng|spock)" 2>/dev/null || echo "No Gradle test dependencies" fd ".*Test\.java$" . 2>/dev/null || echo "No Java test files found"
STEP 3: Parallel test analysis and generation with sub-agent coordination
TRY:
IF project_complexity == "multi-language" OR codebase_size > 50_files:
LAUNCH parallel sub-agents for comprehensive test generation:
ELSE:
EXECUTE streamlined single-agent test generation:
STEP 4: Language-specific test generation with programmatic structure analysis
**Analysis Phase with Dynamic Language Detection:**
# Extract function signatures and interfaces based on detected project type
PROJECT_LANG=$(fd "(package\.json|Cargo\.toml|go\.mod|pom\.xml)" . | head -1 | sed 's/.*\.//' || echo "unknown")
case $PROJECT_LANG in
"json")
echo "📦 JavaScript/TypeScript project detected"
# Parse TypeScript/JavaScript for functions and classes
rg "^(export\s+)?(function|class|const|let)\s+\w+" --type-add 'web:*.{js,ts,jsx,tsx}' --type web -A 3 2>/dev/null || echo "No JS/TS functions found"
;;
"toml")
echo "🦀 Rust project detected"
# Extract public functions and structs
rg "^pub\s+(fn|struct|enum|trait)" --type rust -A 2 2>/dev/null || echo "No public Rust items found"
;;
"mod")
echo "🐹 Go project detected"
# Extract public functions and types
rg "^func\s+[A-Z]\w*|^type\s+[A-Z]\w*" --type go -A 2 2>/dev/null || echo "No public Go items fouA lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Automate browser interactions for development testing using Puppeteer MCP
Prepare branches for merging across multiple worktrees and coordinate integration
Transform into accessibility expert for WCAG compliance and inclusive design
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Transform into backend specialist for scalable API and system design
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies