WindsurftestingTesting

Testing Windsurf Rules

Windsurf rules for testing: test-driven development, test organization, coverage, and CI testing strategy.

.windsurfrules
- Write tests before fixing bugs: a failing test proves the bug, passing proves the fix
- Organize tests to mirror the source directory structure
- Use snapshot testing for UI components; update snapshots intentionally
- Run tests in watch mode locally; full suite only in CI for speed
- Use coverage thresholds as a floor, not a target; 100% coverage can still hide bugs
- Apply contract testing (Pact) for microservice API compatibility
- Use chaos engineering tools (chaos-monkey, gremlin) for resilience testing
- Implement synthetic monitoring in production to catch regressions post-deploy

How to use with Windsurf

Create a `.windsurfrules` file in your project root. Windsurf's Cascade AI applies these rules automatically.

#testing#windsurf#tdd#coverage#coding-rules

Related Rules