tidb-test-guidelines
Installation
SKILL.md
TiDB Test Placement and Writing
Quick workflow
- Identify the target package and nearest existing coverage using
rg --files -g '*_test.go'andrg --files -g '*.json'. - Reuse the nearest existing suite, fixtures, and testdata before creating new files.
- Check package-specific references when available; for planner/core optimizer cases, use
references/planner-guide.md. - Keep directory test count aligned with
BUILD.bazelshard_count(practical target: <= 50 tests per directory; benchmarks excluded). - When moving tests or benchmarks, update
BUILD.bazeland related wrappers such asMakefilebench-daily.