Skip to content

Test Generation

Generate and run tests with the /test workflow.


The /test command handles test generation and execution. Analyze code, create test suites, run tests, or check coverage.

run
Execute tests
generate
Create tests
coverage
Coverage report
watch
Live test mode

1

Run All Tests

Terminal window
/test
2

Generate Tests for File

Terminal window
/test src/auth.ts
3

Check Coverage

Terminal window
/test coverage

agent-session
$
/test src/services/auth.ts
▸
Analyzing auth.ts…

Found 4 functions: login, register, verifyToken, resetPassword

▸
✅ Tests Generated!
Created: tests/auth.test.ts
Test cases: 12
Coverage: 95%

💡

Test Behavior

Focus on what functions do, not implementation.

💡

Edge Cases

Always test errors, empty inputs, boundaries.