Executes test suites across all test types (unit, integration, E2E) and generates comprehensive reports with coverage, performance metrics, and failure analysis.
Executes test suites across all types and generates comprehensive reports with coverage, performance metrics, and failure analysis.
/plugin marketplace add avovello/cc-plugins/plugin install qa@cc-pluginsExecutes test suites across all test types (unit, integration, E2E) and generates comprehensive reports with coverage, performance metrics, and failure analysis.
DOES:
DOES NOT:
test-writer)browser-tester)Check for configuration files:
# JavaScript/TypeScript
ls package.json jest.config.* vitest.config.* playwright.config.*
# Python
ls pytest.ini pyproject.toml setup.cfg conftest.py
# PHP
ls phpunit.xml phpunit.xml.dist
cat package.json | grep -A 20 '"scripts"'
Common script names:
test - Run all teststest:unit - Unit tests onlytest:integration - Integration tests onlytest:e2e - E2E tests onlytest:coverage - With coverage report# Run all tests
npm test
# Run with coverage
npm test -- --coverage
# Run specific file
npm test -- tests/unit/user.test.ts
# Run tests matching pattern
npm test -- --testPathPattern="user"
# Run in watch mode
npm test -- --watch
# Run only failed tests
npm test -- --onlyFailures
# Run with verbose output
npm test -- --verbose
# Run all tests
npm run test
# or
npx vitest run
# Run with coverage
npx vitest run --coverage
# Run specific file
npx vitest run tests/unit/user.test.ts
# Run in watch mode
npx vitest
# Run with UI
npx vitest --ui
# Run all E2E tests
npx playwright test
# Run specific test file
npx playwright test tests/e2e/auth.spec.ts
# Run in headed mode (visible browser)
npx playwright test --headed
# Run specific browser
npx playwright test --project=chromium
npx playwright test --project=firefox
npx playwright test --project=webkit
# Run with debug mode
npx playwright test --debug
# Run with UI mode
npx playwright test --ui
# Generate HTML report
npx playwright show-report
# Run specific test by title
npx playwright test -g "should login"
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific file
pytest tests/unit/test_user.py
# Run specific test
pytest tests/unit/test_user.py::test_create_user
# Run tests matching pattern
pytest -k "user"
# Run with verbose output
pytest -v
# Run failed tests only
pytest --lf
# Run with parallel execution
pytest -n auto
# Run all tests
./vendor/bin/phpunit
# Run with coverage
./vendor/bin/phpunit --coverage-html coverage/
# Run specific file
./vendor/bin/phpunit tests/Unit/UserTest.php
# Run specific test method
./vendor/bin/phpunit --filter testCreateUser
# Run test suite
./vendor/bin/phpunit --testsuite Unit
./vendor/bin/phpunit --testsuite Integration
Run tests in this order (fast to slow):
Unit Tests (~seconds)
Integration Tests (~minutes)
E2E Tests (~minutes)
When possible, run independent test suites in parallel:
# Jest parallel
npm test -- --maxWorkers=4
# pytest parallel
pytest -n 4
# Playwright parallel (default)
npx playwright test --workers=4
# Test Execution Report
## Summary
| Metric | Value |
|--------|-------|
| **Total Tests** | 156 |
| **Passed** | 152 (97.4%) |
| **Failed** | 3 (1.9%) |
| **Skipped** | 1 (0.6%) |
| **Duration** | 2m 34s |
## Status: FAILED
## Results by Type
### Unit Tests
- **Total**: 98
- **Passed**: 97
- **Failed**: 1
- **Duration**: 12s
- **Coverage**: 87.3%
### Integration Tests
- **Total**: 34
- **Passed**: 33
- **Failed**: 1
- **Duration**: 45s
### E2E Tests (Playwright)
- **Total**: 24
- **Passed**: 22
- **Failed**: 1
- **Skipped**: 1
- **Duration**: 1m 37s
## Failed Tests
### 1. Unit: UserService.createUser
**File**: `tests/unit/services/user.test.ts:45`
**Duration**: 0.5s
**Error**:
Expected: "user@example.com" Received: undefined
at Object.<anonymous> (tests/unit/services/user.test.ts:52:19)
**Possible Cause**: Email not being set on user object
---
### 2. Integration: POST /api/users validation
**File**: `tests/integration/api/users.test.ts:78`
**Duration**: 1.2s
**Error**:
expected 400 "Bad Request", got 500 "Internal Server Error"
**Possible Cause**: Server error instead of validation error
---
### 3. E2E: User Login › should redirect to dashboard
**File**: `tests/e2e/auth/login.spec.ts:23`
**Browser**: Chromium
**Duration**: 8.3s
**Error**:
Timeout 30000ms exceeded waiting for selector ".dashboard-header"
**Screenshot**: `test-results/login-chromium/test-failed-1.png`
**Video**: `test-results/login-chromium/video.webm`
**Possible Cause**: Dashboard not loading or selector changed
## Coverage Report
| Category | Statements | Branches | Functions | Lines |
|----------|------------|----------|-----------|-------|
| src/services | 92.1% | 85.3% | 88.9% | 91.5% |
| src/utils | 98.2% | 95.0% | 100% | 98.0% |
| src/controllers | 78.4% | 72.1% | 80.0% | 77.8% |
| **Total** | **87.3%** | **82.4%** | **88.2%** | **86.9%** |
## Performance Metrics
### Slowest Tests
1. E2E: Complete checkout flow (15.2s)
2. Integration: Batch user import (8.7s)
3. E2E: User registration with email (7.9s)
4. Integration: Report generation (6.3s)
5. Unit: Large dataset processing (2.1s)
### Test Distribution
- < 100ms: 78 tests (50%)
- 100ms - 1s: 52 tests (33%)
- 1s - 5s: 18 tests (12%)
- > 5s: 8 tests (5%)
## Recommendations
1. **Fix failing tests** before deployment
2. **Increase coverage** in controllers (78.4% → 85%+)
3. **Optimize slow tests** - checkout flow taking 15s
4. **Investigate flaky test** - login redirect timing
## Commands to Reproduce
```bash
# Re-run failed tests only
npm test -- --onlyFailures
# Run specific failed test
npx playwright test tests/e2e/auth/login.spec.ts:23 --headed
# Debug E2E failure
npx playwright test tests/e2e/auth/login.spec.ts --debug
## Watch Mode
For development, run tests in watch mode:
```bash
# Jest watch
npm test -- --watch
# Vitest watch (default)
npx vitest
# pytest watch (with pytest-watch)
ptw
# Playwright UI mode
npx playwright test --ui
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences