Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

ginkgo

> 测试质量
Open source

A Modern Testing Framework for Go

9.0K stars0 likes7 views
WebsiteGitHub

About

A Modern Testing Framework for Go

[](https://onsi.github.io/ginkgo/) [](https://github.com/sponsors/onsi)

Ginkgo

Ginkgo is a mature testing framework for Go designed to help you write expressive specs. Ginkgo builds on top of Go's testing foundation and is complemented by the Gomega matcher library. Together, Ginkgo and Gomega let you express the intent behind your specs clearly:

…

Jump to the docs to learn more. It's easy to bootstrap and start writing your first specs.

If you have a question, comment, bug report, feature request, etc. please open a GitHub issue, or visit the Ginkgo Slack channel.

Capabilities

Whether writing basic unit specs, complex integration specs, or even performance specs - Ginkgo gives you an expressive Domain-Specific Language (DSL) that will be familiar to users coming from frameworks such as Quick, RSpec, Jasmine, and Busted. This style of testing is sometimes referred to as "Behavior-Driven Development" (BDD) though Ginkgo's utility extends beyond acceptance-level testing.

With Ginkgo's DSL you can use nestable Describe, Context and When container nodes to help you organize your specs. BeforeEach and AfterEach setup nodes for setup and cleanup. It and Specify subject nodes that hold your assertions. BeforeSuite and AfterSuite nodes to prep for and cleanup after a suite... and much more!.

At runtime, Ginkgo can run your specs in reproducibly random order and has sophisticated support for spec parallelization. In fact, running specs in parallel is as easy as

bash
ginkgo -p

By following established patterns for writing parallel specs you can build even large, complex integration suites that parallelize cleanly and run performantly. And you don't have to worry about your spec suite hanging or leaving a mess behind - Ginkgo provides a per-node context.Context and the capability to interrupt the spec after a set period of time - and then clean up.

As your suites grow Ginkgo helps you keep your specs organized with labels and lets you easily run subsets of specs, either programmatically or on the command line. And Ginkgo's reporting infrastructure generates machine-readable output in a variety of formats and allows you to build your own custom reporting infrastructure.

Ginkgo ships with ginkgo, a command line tool with support for generating, running, filtering, and profiling Ginkgo suites. You can even have Ginkgo automatically run your specs when it detects a change with ginkgo watch, enabling rapid feedback loops during test-driven development.

And that's just Ginkgo! Gomega brings a rich, mature, family of assertions and matchers to your suites. With Gomega you can easily mix synchronous and asynchronous assertions in your specs. You can even build your own set of expressive domain-specific matchers quickly and easily by composing Gomega's existing building blocks.

Happy Testing!

Using Ginkgo with Claude Code

Ginkgo ships a set of Claude Code skills as a plugin, with this repo doubling as the marketplace, so an agent writing specs in your project has Ginkgo's idioms, decorators, and gotchas on hand. From inside Claude Code:

/plugin marketplace add onsi/ginkgo
/plugin install ginkgo@ginkgo

(or non-interactively: claude plugin marketplace add onsi/ginkgo then claude plugin install ginkgo@ginkgo)

This installs a family of ginkgo:* skills that activate automatically while you write and run specs. Start with ginkgo:overview; see the plugin README for the full list.

License

Ginkgo is MIT-Licensed

Contributing

See CONTRIBUTING.md

Sponsors

Sponsors commit to a sponsorship for a year. If you're an organization that makes use of Ginkgo please consider becoming a sponsor!

Browser testing via

</a>

Issues· 125 open

View all issuesOpen on GitHub
  • #1684

    Feature : Create a label for a test case to always execute it at last of test suite

    Updated Sep 11, 2026
  • #1656

    doc: --asan and --msan help text is incomplete and outdated

    Updated Sep 10, 2026
  • #1668

    Feature Request: Emulate -fd style output

    Updated Jun 22, 2026
  • #1675

    Chris adams

    Updated Jun 15, 2026
  • #1481

    Ginkgo slower than `go test` for same suite (resurrect #644)

    Updated May 11, 2026
  • #1601

    Synctest support

    Updated May 9, 2026
  • #1386

    Feeding report back for focusing on failed test-cases

    Updated May 8, 2026
  • #1537

    Feature Request: Add a subcommand to list all skipped/pending tests

    Updated Apr 29, 2026
  • #1541

    It should be possible to (roughly) prioritize tests.

    Updated Apr 4, 2026
  • #1629

    Question/Feature Request: Ability to run a BeforeEach for ALL specs in a project

    Updated Mar 23, 2026

> Tags

Gobddbdd-frameworkgogolang

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.