tidb-integrationtest-recorder

Records TiDB integration test results and keeps regenerated result diffs minimal.

40.5k|6.2k|Updated Sep 6, 2015
One-click install
npx skills add https://github.com/pingcap/tidb --skill tidb-integrationtest-recorder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidb-integrationtest-recorder
Source: https://github.com/pingcap/tidb/tree/main/.agents/skills/tidb-integrationtest-recorder
Command: npx skills add https://github.com/pingcap/tidb --skill tidb-integrationtest-recorder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Recording expected outputs for TiDB integration tests under tests/integrationtest is error-prone: using the wrong flags or recording too broadly produces noisy result diffs in tests/integrationtest/r that obscure real behavior changes. This Skill provides the correct recording workflow and guardrails for that suite.

Core Features & Use Cases

  • Correct Recording Workflow: Points to the canonical recording command in docs/agents/testing-flow.md and explicitly forbids using the -record flag for this suite.
  • Test Name Derivation: Shows how to derive the TestName from a path under tests/integrationtest/t/ by stripping the .test suffix (e.g., planner/core/binary_plan).
  • Minimal Diff Guardrails: Instructs targeted recording of only the affected suite and review of changed files under tests/integrationtest/r to avoid unrelated result churn.
  • Use Case: After modifying SQL planner behavior, a developer records only the affected integration test suite, then verifies the regenerated result files contain minimal, correct diffs before committing.

Quick Start

Ask the assistant to record the TiDB integration test for the suite you changed, for example by saying: record the integration test for planner/core/binary_plan and keep the result diff minimal.

Frequently Asked Questions about tidb-integrationtest-recorder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I record TiDB integration tests under tests/integrationtest?

Follow the recording command documented in docs/agents/testing-flow.md under the Integration tests section. Derive the TestName from the test file path under tests/integrationtest/t/ by removing the .test suffix, such as planner/core/binary_plan.

Can I use the -record flag for TiDB integration tests?

No, the -record flag must not be used for the tests/integrationtest suite. The canonical recording command is documented in docs/agents/testing-flow.md and should be used instead.

How do I keep TiDB integration test result diffs minimal?

Record only the affected test suite rather than the entire suite, then review all changed files under tests/integrationtest/r/**. If manual edits to result files are needed, keep them minimal and verify with another recording run.

When should I record TiDB integration test results?

Record when you change files under tests/integrationtest/t/** or when SQL behavior changes require integration coverage. Avoid recording when it would introduce unrelated result churn in tests/integrationtest/r/**.

Why does my TiDB integration test recording produce unrelated changes?

Unrelated churn usually comes from recording too broadly instead of targeting only the affected suite. Restrict recording to the specific TestName derived from your changed test file and re-review the diffs under tests/integrationtest/r/**.