tidb-test-guidelines

Installation
SKILL.md

TiDB Test Placement and Writing

Quick workflow

  1. Identify the target package and nearest existing coverage using rg --files -g '*_test.go' and rg --files -g '*.json'.
  2. Reuse the nearest existing suite, fixtures, and testdata before creating new files.
  3. Check package-specific references when available; for planner/core optimizer cases, use references/planner-guide.md.
  4. Keep directory test count aligned with BUILD.bazel shard_count (practical target: <= 50 tests per directory; benchmarks excluded).
  5. When moving tests or benchmarks, update BUILD.bazel and related wrappers such as Makefile bench-daily.

Basic writing rules

Installs
1
Repository
pingcap/tidb
GitHub Stars
40.1K
First Seen
May 16, 2026
tidb-test-guidelines — pingcap/tidb