Test Generation & Execution

Generate and run tests with the /test workflow.

Overview

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
Report
watch
Live mode

The Process

1

Run All Tests

/test
2

Generate Tests for File

/test src/auth.ts
3

Check Coverage

/test coverage

Example Session

User: /test src/services/auth.ts
Agent: Analyzing auth.ts...

Found 4 functions: login, register, verifyToken, resetPassword

Agent: ✅ Tests Generated!

Created: tests/auth.test.ts
Test cases: 12
Coverage: 95%

Pro Tips

Test Behavior

Focus on what functions do, not implementation.

Edge Cases

Always test errors, empty inputs, boundaries.

Next Steps

  • Run /test to execute your test suite
  • See Deployment which runs tests automatically