Back to Registry
View Author Profile
Official Verified
Test Runner
Skill by cmanfre7
skill-install — Terminal
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cmanfre7/test-runnerOr
test-runner
Write and run tests across languages and frameworks.
Framework Selection
| Language | Unit Tests | Integration | E2E |
|---|---|---|---|
| TypeScript/JS | Vitest (preferred), Jest | Supertest | Playwright |
| Python | pytest | pytest + httpx | Playwright |
| Swift | XCTest | XCTest | XCUITest |
Quick Start by Framework
Vitest (TypeScript / JavaScript)
npm install -D vitest @testing-library/react @testing-library/jest-dom
// vitest.config.ts
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: './tests/setup.ts',
},
})
npx vitest # Watch mode
npx vitest run # Single run
npx vitest --coverage # With coverage
Jest
npm install -D jest @types/jest ts-jest
npx jest # Run all
npx jest --watch # Watch mode
npx jest --coverage # With coverage
npx jest path/to/test # Single file
pytest (Python)
uv pip install pytest pytest-cov pytest-asyncio httpx
pytest # Run all
pytest -v # Verbose
pytest -x # Stop on first failure
pytest --cov=app # With coverage
pytest tests/test_api.py -k "test_login" # Specific test
pytest --tb=short # Short tracebacks
XCTest (Swift)
swift test # Run all tests
swift test --filter MyTests # Specific test suite
swift test --parallel # Parallel execution
Playwright (E2E)
npm install -D @playwright/test
npx playwright install
npx playwright test # Run all
npx playwright test --headed # With browser visible
npx playwright test --debug # Debug mode
npx playwright test --project=chromium # Specific browser
npx playwright show-report # View HTML report
TDD Workflow
- Red — Write a failing test that describes the desired behavior.
- Green — Write the minimum code to make the test pass.
- Refactor — Clean up the code while keeping tests green.
┌─────────┐ ┌─────────┐ ┌──────────┐
│ Write │────▶│ Write │────▶│ Refactor │──┐
│ Test │ │ Code │ │ Code │ │
│ (Red) │ │ (Green) │ │ │ │
└─────────┘ └─────────┘ └──────────┘ │
▲ │
└──────────────────────────────────────────┘
Test Patterns
Arrange-Act-Assert
test('calculates total with tax', () => {
// Arrange
const cart = new Cart([{ price: 100, qty: 2 }]);
// Act
const total = cart.totalWithTax(0.08);
// Assert
expect(total).toBe(216);
});
Metadata
AI Skill Finder
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skill Add to Configuration
Paste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cmanfre7-test-runner": {
"enabled": true,
"auto_update": true
}
}
}Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.