running
하는 일
이 스킬은 명령줄에서 Ginkgo 테스트를 시작하는 방법과 어떤 옵션을 쓸지 설명합니다. Ginkgo 도구로 Go 테스트를 실행하는 개발자를 위한 것입니다.
사용하는 경우
- ✓터미널에서 하나 이상의 Ginkgo 테스트 묶음을 실행해야 할 때.
- ✓실행하지 않고 어떤 테스트가 실행될지 미리 보고 싶을 때.
- ✓무작위 순서로 실행하거나 문제를 찾기 위해 반복 실행하고 싶을 때.
스킬 링크
https://github.com/onsi/ginkgo/blob/master/plugins/ginkgo/skills/running/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 Go 프로젝트의 모든 Ginkgo 테스트를 어떻게 실행하고, 어떤 테스트가 먼저 실행되는지 볼 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 ginkgo 명령과 옵션을 나열합니다. 예를 들어 테스트 폴더 실행, 미리 보기, 파일 변경 감시 등이 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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 {
자주 묻는 질문
대신 go test를 써도 되나요?
가능하지만, ginkgo 명령은 병렬 실행처럼 go test에 없는 기능을 지원합니다.
테스트에 설정을 어떻게 전달하나요?
이 스킬은 이중 대시 뒤에 쓰는 옵션이 테스트 프로그램 자체로 전달된다고 설명합니다.
감시 모드는 무엇을 하나요?
파일이 바뀌면 테스트를 자동으로 다시 실행합니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 9.1k
- 순위
- #12306
- 라이선스
- MIT
- 업데이트
- 2026. 10. 9.
댓글
- …
이 저장소의 다른 스킬
ci
9.1k에이전트가 지속적 통합에서 Ginkgo 테스트를 설정하도록 돕습니다. 남은 focus나 pending 표시와 불안정한 테스트를 잡아내는 권장 플래그를 씁니다.
debugging-failures
9.1k에이전트가 요약 줄을 읽고 JSON 보고서에서 실패한 정확한 테스트와 메시지를 꺼내서, Ginkgo 테스트가 왜 실패했는지 알아내도록 돕습니다.
decorators
9.1k에이전트가 Serial, Ordered, Label, Focus, 제한 시간 같은 Ginkgo 테스트 데코레이터를 바르게 쓰도록 각각의 역할을 설명해 돕습니다.
filtering
9.1k에이전트가 pending, skip, focus, 라벨, 버전 조건, 파일 필터를 올바른 우선순위에 따라 써서 Ginkgo 테스트의 일부만 실행하도록 돕습니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.