running
What it does
This skill explains how to start Ginkgo tests from the command line and which options to use. It is for developers who run Go tests with the Ginkgo tool.
When to use it
- βWhen you need to run one or more Ginkgo test suites from the terminal.
- βWhen you want to preview which tests would run without running them.
- βWhen you want to run tests in random order or repeat them to find problems.
Skill link
https://github.com/onsi/ginkgo/blob/master/plugins/ginkgo/skills/running/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHow do I run all my Ginkgo tests in my Go project and see which ones would run first?β
5 new skills a week. 1 minute to read.
How it works
It lists the ginkgo commands and options, such as running a folder of tests, previewing them, or watching for file changes.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Running Ginkgo
How to drive the suite once it's wired up (ginkgo:setup). For a production CI configuration, see ginkgo:ci. Docs: https://onsi.github.io/ginkgo/#ginkgo-cli-overview.
The CLI surface
ginkgo is the recommended runner β you can run suites with go test, but only the CLI does parallelism and profile aggregation, and a few go test flags (e.g. -count=N, use --repeat=N) are unsupported. ginkgo is shorthand for ginkgo run; it passes through nearly all go test/go build flags.
ginkgo # run the suite in the current directory
ginkgo path/to/suite path/to/other # run several named suites
ginkgo -r # recurse the tree, run every suite found (== ginkgo ./...)
ginkgo -p # run in parallel (β ginkgo:parallelism)
ginkgo -v --dry-run # build the tree and print what WOULD run, without running
ginkgo <GINKGO-FLAGS> <PACKAGES> -- <PASS-THROUGHS> # the full grammar
Ginkgo flags must come before the package list; suite-bound args go after --. Subcommands:
| Command | Does |
|---|---|
ginkgo build path/... |
Precompile each suite to a package.test binary (accepts a subset of run flags β compile-time only) |
ginkgo watch -r -p |
Re-run suites when they or their dependencies change (-depth tunes dependency monitoring) |
ginkgo bootstrap / ginkgo generate <subject> |
Scaffold a suite / a spec file (β ginkgo:setup); both take --template/--template-data |
ginkgo outline <file> |
Static (AST-parsed) spec outline as csv/indent/json β no compile needed |
ginkgo unfocus |
Strip all programmatic F-focus from the tree (β ginkgo:filtering) |
ginkgo labels |
List the Labels used in a suite (naive parse) |
ginkgo version |
Print the CLI version |
Precompiled binaries run via ginkgo package.test or ./package.test β but to run a precompiled suite in parallel you must go back through the CLI: ginkgo -p ./package.test. Cross-compile with the usual GOOS/GOARCH.
Randomization
Ginkgo randomizes spec order to surface spec pollution. By default it only shuffles top-level containers (specs within a container keep file order, easing debugging).
--randomize-allβ shuffle every spec. Use it in CI (βginkgo:ci).--randomize-suitesβ shuffle the order suites run in (multi-suite runs).--seed=Nβ pin the seed (printed near the top of every run) to reproduce a failing order exactly. Specs that generate randomness should seed offGinkgoRandomSeed()so the seed fully determines the run.
Randomization is only sound because Ginkgo assumes specs are independent (β ginkgo:overview); when ordering is genuinely required, use an Ordered container (β ginkgo:ordering-and-flakes), never definition order.
Running multiple suites
With -r or multiple package args, Ginkgo compiles suites in parallel but always runs them sequentially.
--compilers=Nβ number of parallel compile workers (default: one per core).--skip-package=a,b,cβ comma-separated; skips any suite whose path contains a listed substring (not compiled, not run).--keep-goingβ run all suites even after one fails (default stops after the first failed suite), to collect every failure. (--fail-fastcontrols stopping within a suite.)
You can also run several suites within one process by calling RunSpecs more than once, resetting Ginkgo's global state between calls with extensions/globals.Reset() (a niche orchestration escape hatch β your package-level state is not reset, only Ginkgo's).
Previewing specs
ginkgo --dry-run -vcompiles, builds the tree, and walks it honoring filters and dynamically generated specs β the most complete preview.--dry-runcan't combine with-p/--procs; it runs in series. (ginkgo outlineis faster but static, so it misses dynamic specs and filter/order effects.)PreviewSpecsin place ofRunSpecsreturns a fullReport(run specs βSpecStatePassed, skipped βSpecStateSkipped) for programmatic inspection. Pass it the same description+decorators you'd giveRunSpecs:func TestMySuite(t *testing.T) { if config, _ := GinkgoConfiguration(); config.DryRun { report := PreviewSpecs("My Suite", Label("suite-label")) _ = report // e.g. reporters.GenerateJUnitReport(report, "./preview.xml") } else {
FAQ
Can I use go test instead?
You can, but the ginkgo command supports features such as parallel runs that go test does not.
How do I pass settings to my tests?
The skill explains that options placed after a double dash are sent to the test program itself.
What does watch mode do?
It reruns the tests automatically when files change.
Details
Original description by the author
Run Ginkgo suites with the ginkgo CLI β run, -r, -p, --dry-run, watch, build (precompiled .test binaries), generate, outline, unfocus, labels, version; spec randomization (--randomize-all/--randomize-suites/--seed); running multiple suites (--keep-going/--skip-package/--compilers); previewing (--dry-run, PreviewSpecs); and parameterizing a suite via env vars or init()-registered flags after -- plus GinkgoConfiguration() overrides. Use when running suites locally, precompiling, watching for changes, or parameterizing a run from the command line. For a CI configuration see ginkgo:ci.
repo: onsi/ginkgo
Popularity
- GitHub stars
- 9.1k
- Ranking position
- #12306
- License
- MIT
- Updated
- 10/9/2026
Comments
- β¦
More skills from this repository
ci
9.1kHelps your agent set up Ginkgo tests for continuous integration, with recommended flags that catch leftover focus or pending markers and flaky tests.
debugging-failures
9.1kHelps your agent find out why Ginkgo tests failed by reading the summary line and pulling the exact failing tests and messages from a JSON report.
decorators
9.1kHelps your agent use Ginkgo test decorators correctly, such as Serial, Ordered, Label, Focus and timeouts, by explaining what each one does.
filtering
9.1kHelps your agent run only some Ginkgo tests, using pending, skip, focus, labels, version constraints and file filters in the right order of precedence.
Similar skills
test-driven-development
311kTeaches your agent to write a failing test first, watch it fail, then write the smallest code that passes, before building any feature or fix.
verification-before-completion
311kTeaches your agent to run real checks and read their output before claiming that a task, fix, or build is complete or passing.
migrate-to-shoehorn
310kReplaces risky type casts in your test files with the shoehorn library, so tests can use partial data and still pass type checks.