What are Ginkgo and Gomega?

Ginkgo is a Go testing framework built to help you efficiently write expressive and comprehensive tests using Behavior-Driven Development (“BDD”) style. It is best paired with the Gomega matcher library, but is designed to be matcher-agnostic.

Gomega is a matcher/assertion library. Although it is best paired with the Ginkgo BDD test framework, Gomega can be adapted for other contexts.

Behavior-Driven Development is an Agile software development process that encourages collaboration among developers, QA, and non-technical or business participants in a software project.

svg viewer

Installation

You can get both frameworks using the commands:

$ go get github.com/onsi/ginkgo/ginkgo
$ go get github.com/onsi/gomega/...

Both Ginkgo and Gomega are open-source projects. You can find their documentation here.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved