running
यह क्या करती है
यह स्किल बताती है कि Command Line से Ginkgo टेस्ट कैसे शुरू करें और कौन से विकल्प इस्तेमाल करें। यह उन डेवलपर्स के लिए है जो Ginkgo टूल से Go टेस्ट चलाते हैं।
कब इस्तेमाल करें
- ✓जब आपको टर्मिनल से एक या अधिक Ginkgo टेस्ट सूट चलाने हों।
- ✓जब आप बिना चलाए देखना चाहते हों कि कौन से टेस्ट चलते।
- ✓जब आप टेस्ट को random क्रम में या बार-बार चलाकर समस्याएं ढूंढना चाहते हों।
Skill का लिंक
https://github.com/onsi/ginkgo/blob/master/plugins/ginkgo/skills/running/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Go प्रोजेक्ट के सारे Ginkgo टेस्ट कैसे चलाऊं, और देखूं कि कौन से पहले चलेंगे?”
हर हफ़्ते 5 नई skills, 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 कमांड parallel रन जैसी सुविधाएं देता है, जो go test नहीं देता।
टेस्ट को सेटिंग्स कैसे दूं?
स्किल समझाती है कि double dash के बाद रखे विकल्प सीधे टेस्ट प्रोग्राम को भेजे जाते हैं।
watch mode क्या करता है?
यह फ़ाइलें बदलने पर टेस्ट अपने-आप दोबारा चलाता है।
जानकारी
लेखक का मूल विवरण
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
- अपडेट की गई
- 9/10/2026
कमेंट
- …
इस repository की और skills
ci
9.1kयह आपके एजेंट को Ginkgo टेस्ट CI के लिए सेट करने में मदद करती है, ताकि बचे हुए focus या pending निशान और flaky टेस्ट पकड़े जा सकें।
debugging-failures
9.1kयह आपके एजेंट को summary लाइन पढ़कर और JSON रिपोर्ट से ठीक फ़ेल होने वाले टेस्ट और संदेश निकालकर Ginkgo टेस्ट फ़ेल होने का कारण ढूंढने में मदद करती है।
decorators
9.1kयह आपके एजेंट को Ginkgo टेस्ट decorators सही ढंग से इस्तेमाल करने में मदद करती है, जैसे Serial, Ordered, Label, Focus और timeouts, हर एक का काम समझाकर।
filtering
9.1kयह आपके एजेंट को Ginkgo के कुछ ही टेस्ट चलाने में मदद करती है, pending, skip, focus, labels और file filters को सही क्रम में लगाकर।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।