본문으로 건너뛰기
Skillpedia
테스트9.1k · #12306

running

하는 일

이 스킬은 명령줄에서 Ginkgo 테스트를 시작하는 방법과 어떤 옵션을 쓸지 설명합니다. Ginkgo 도구로 Go 테스트를 실행하는 개발자를 위한 것입니다.

사용하는 경우

  • ✓터미널에서 하나 이상의 Ginkgo 테스트 묶음을 실행해야 할 때.
  • ✓실행하지 않고 어떤 테스트가 실행될지 미리 보고 싶을 때.
  • ✓무작위 순서로 실행하거나 문제를 찾기 위해 반복 실행하고 싶을 때.

스킬 링크

https://github.com/onsi/ginkgo/blob/master/plugins/ginkgo/skills/running/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/onsi/ginkgo/blob/master/plugins/ginkgo/skills/running/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 off GinkgoRandomSeed() 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-fast controls 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 -v compiles, builds the tree, and walks it honoring filters and dynamically generated specs — the most complete preview. --dry-run can't combine with -p/--procs; it runs in series. (ginkgo outline is faster but static, so it misses dynamic specs and filter/order effects.)
  • PreviewSpecs in place of RunSpecs returns a full Report (run specs → SpecStatePassed, skipped → SpecStateSkipped) for programmatic inspection. Pass it the same description+decorators you'd give RunSpecs:
    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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬