Skip to content
Development
Command

/f5-test

Master testing command with TDD support

From plugin
f5-framework
2469 skills104 agents69 commands
Install
$ npx -y skills add Fujigo-Software/f5-framework-claude --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/f5-test

Context preview

What this command does when you run it.

Master testing command with TDD support

Command definition

f5-test.md
name: f5-test
description: Master testing command with TDD support
argument-hint: <generate|run|coverage|report>
allowed-tools: Read, Write, Glob, Grep, Bash
user-invocable: true

/f5-test - Testing Command (Master Orchestrator)

> **Version:** 1.5.0 > **Category:** Testing > **Role:** Orchestrator - Delegates to specialized commands

Testing toàn diện với TDD support, coverage tracking, visual regression, và integration với G3 gate.

ARGUMENTS

The user's request is: $ARGUMENTS

---

COMMAND DELEGATION

`/f5-test` is the **master orchestrator**. It delegates to specialized commands:

| Task Type | Delegated To | MCP Tools | When to Use | |-----------|--------------|-----------|-------------| | Unit testing | `/f5-test-unit` | - | Isolated function/class testing | | Integration | `/f5-test-it` | Sequential | API, DB, service testing | | E2E testing | `/f5-test-e2e` | Playwright | User journey, browser testing | | Visual testing | `/f5-test-e2e visual` | Playwright | Screenshot diff, Figma comparison | | TDD workflow | `/f5-tdd` | - | Red-Green-Refactor cycle | | Full suite | (all above) | All | G3 gate preparation |

Delegation Flow

/f5-test all
    │
    ├── /f5-test-unit src/ --coverage
    │       └── Report: unit-results.json
    │
    ├── /f5-test-it --all
    │       └── Report: it-results.json
    │
    ├── /f5-test-e2e smoke
    │       └── Report: e2e-results.json
    │
    └── /f5-test-e2e visual --ci
            └── Report: visual-report.html

Final: Aggregate → G3 Report

---

SUBCOMMANDS

| Subcommand | Description | Delegation | |------------|-------------|------------| | `generate [path]` | Generate tests từ source code | Native | | `run [options]` | Run tests với options | → Specialized commands | | `tdd <feature>` | TDD workflow | → `/f5-tdd` | | `coverage` | Chi tiết coverage report | Native | | `report` | Generate G3 gate report | Native | | `watch` | Watch mode for development | Native |

---

SUBCOMMAND: generate

/f5-test generate [path]

Generate tests từ source code với:

  • Happy path tests
  • Error case tests
  • Edge case tests
  • Mocks for dependencies

Output

## 🧪 Test Generation: [PATH]

### Files Analyzed
| File | Functions | Tests Generated |
|------|-----------|-----------------|
| user.service.ts | 5 | 12 |

### Generated Test Files
- `src/user/__tests__/user.service.spec.ts` (12 tests)

### Next Steps
1. Review generated tests
2. Run: `/f5-test run --path src/user`

> **Stack-specific templates**: See `_test-shared.md` for stack detection matrix

---

SUBCOMMAND: run

/f5-test run [options]

Options

| Option | Description | Default | |--------|-------------|---------| | `--type <type>` | Test type: `unit\|integration\|e2e\|all` | unit | | `--path <path>` | Specific file/folder | . | | `--watch` | Watch mode | false | | `--coverage` | Show coverage | true | | `--verbose` | Verbose output | false | | `--ci` | CI mode (fail on threshold) | false | | `--bail` | Stop on first failure | false |

Delegation by Type

delegation:
  --type unit:        → /f5-test-unit [path] [flags]
  --type integration: → /f5-test-it --all
  --type e2e:         → /f5-test-e2e smoke
  --type all:         → Run all in sequence

Output

## 🧪 Test Results

**Type:** [Type]
**Duration:** [time]

### Summary
| Metric | Result |
|--------|--------|
| Test Suites | [X] passed, [Y] failed |
| Tests | [X] passed, [Y] failed |
| Coverage | [X]% |

### Status
[✅ PASSED | ❌ FAILED]

---

SUBCOMMAND: tdd

/f5-test tdd <subcommand> [options]

**Delegates entirely to `/f5-tdd`**

| Command | Delegates To | |---------|--------------| | `/f5-test tdd start <feature>` | `/f5-tdd start <feature>` | | `/f5-test tdd red` | `/f5-tdd red` | | `/f5-test tdd green` | `/f5-tdd green` | | `/f5-test tdd refactor` | `/f5-tdd refactor` | | `/f5-test tdd status` | `/f5-tdd status` | | `/f5-test tdd complete` | `/f5-tdd complete` |

> **Full TDD documentation**: See `/f5-tdd` for session management, cycle tracking, metrics

---

SUBCOMMAND: coverage

/f5-test coverage

Output

## 📊 Coverage Report

**Generated:** [DATE]

### Overall Coverage
| Metric | Target | Actual | Status |
|--------|--------|--------|--------|
| Statements | ≥80% | [X]% | [✅|❌] |
| Branches | ≥75% | [X]% | [✅|❌] |
| Functions | ≥80% | [X]% | [✅|❌] |
| Lines | ≥80% | [X]% | [✅|❌] |

### Coverage by Module
| Module | Stmts | Branch | Funcs | Lines | Status |
|--------|-------|--------|-------|-------|--------|
| src/user/ | 92.0% | 85.0% | 95.0% | 91.5% | ✅ |
| src/auth/ | 78.5% | 72.0% | 85.0% | 78.0% | ⚠️ |

### Recommendations
1. Add tests for error handling in [file]
2. Improve branch coverage in [module]

---

SUBCOMMAND: report

/f5-test report

Generate comprehensive report for G3 Gate.

Output

## 📋 Test Report for G3 Gate

**Project:** [PROJECT_NAME]
**Date:** [DATE]
**Version:** [VERSION]

### Executive Summary

| Metric | Target | Actual | Status |
|--------|--------|--------|--------|
| Unit Test Coverage | ≥80% | [X]% | [✅|❌] |
| Integration Tests | All Pass | [X]/[Y] | [✅|❌] |
| E2E Tests | All Pass | [X]/[Y] | [✅|❌] |
| Visual Tests | ≤5% diff | [X]% | [✅|❌] |

### G3 Gate Status: [✅ PASSED | ❌ FAILED]

### Test Artifacts
| Artifact | Location |
|----------|----------|
| Coverage Report | `coverage/lcov-report/index.html` |
| JUnit XML | `reports/junit.xml` |
| E2E Videos | `e2e/videos/` |
| Visual Diffs | `.f5/visual/diff/` |

---

G3 GATE INTEGRATION

> **Full G3 sequence**: See `_test-shared.md` for complete gate integration

When running `/f5-gate check G3`:

# Automatic test sequence
/f5-test run --type unit --ci
/f5-test coverage
/f5-test run --type integration --ci
/f5-test run --type e2e --ci
/f5-test-e2e visual --ci --threshold 5
/f5-test report

---

FLAGS

| Flag | Description | |------|--------

Read more
Ships withf5-framework

AI-Powered Development Framework for Claude Code

Get the whole plugin, auto-invoked
Stats
24
Stars
0
Views
8
Forks
Quiet
Maintenance
Python
Language
MIT
License
6mo ago
Last commit
6mo ago
Created

Repo: Fujigo-Software/f5-framework-claude