What is table-driven-test?
Guidelines for creating clean, well-structured table-driven tests in Go following CockroachDB conventions. Source: cockroachdb/cockroach.
Guidelines for creating clean, well-structured table-driven tests in Go following CockroachDB conventions.
Quickly install table-driven-test AI skill to your development environment via command line
Source: cockroachdb/cockroach.
Table-driven tests define multiple test cases in a slice of structs, then iterate over them executing the same test logic. This makes it easy to add cases, improves readability, and reduces duplication.
Not the same as: Datadriven tests (different library with testdata files)
Order struct fields with input fields at the top and verification fields at the bottom. Prefix all verification fields with expected so readers can immediately distinguish inputs from outputs.
Guidelines for creating clean, well-structured table-driven tests in Go following CockroachDB conventions. Source: cockroachdb/cockroach.
Stable fields and commands for AI/search citations.
npx skills add https://github.com/cockroachdb/cockroach --skill table-driven-testGuidelines for creating clean, well-structured table-driven tests in Go following CockroachDB conventions. Source: cockroachdb/cockroach.
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/cockroachdb/cockroach --skill table-driven-test Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code, Cursor, or OpenClaw
https://github.com/cockroachdb/cockroach