For a testing framework for Go applications, the first results are onsi/ginkgo (Ginkgo is a comprehensive behavior-driven development framework for Go that provides a robust suite of tools for assertions, parallel test execution, and advanced diagnostic reporting), smartystreets/goconvey (GoConvey is a comprehensive testing framework for Go that provides a built-in assertion library, behavior-driven development syntax, and a real-time web dashboard for monitoring test execution and coverage) and stretchr/testify (Testify is a comprehensive and widely-adopted toolkit for Go that provides the essential assertion and mocking capabilities required for robust unit and integration testing workflows). golang/mock and vektra/mockery round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
We curate open-source GitHub repositories matching “best go testing frameworks”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
Ginkgo is a behavior-driven development testing framework, assertion library, and test runner for Go. It provides a domain-specific language for writing human-readable specifications, organizing tests into hierarchical containers and subjects to describe system behavior. The project distinguishes itself through advanced execution control and observability, featuring a test runner capable of parallel distribution, sharding, and randomized execution order to detect flaky tests. It includes specialized diagnostic tools for goroutine leak detection, hanging spec monitoring, and failure state debu
Ginkgo is a comprehensive behavior-driven development framework for Go that provides a robust suite of tools for assertions, parallel test execution, and advanced diagnostic reporting.
GoConvey is a behavioral testing framework for the Go programming language that provides a test runner, a code coverage tool, and a web-based monitoring dashboard. It integrates with the standard Go test command to organize tests into behavioral stories and conveyors. The project features a web interface that monitors the file system for source code changes and automatically triggers test execution to provide real-time feedback. This dashboard displays test results, failures, and a chronological history of execution status. The framework includes a state assertion system for verifying values
GoConvey is a comprehensive testing framework for Go that provides a built-in assertion library, behavior-driven development syntax, and a real-time web dashboard for monitoring test execution and coverage.
Testify is a comprehensive testing toolkit for Go that provides a suite of assertion libraries and mocking frameworks to validate code behavior. It enables developers to write automated tests by comparing actual results against expected outcomes, ensuring that functional requirements are met throughout the development process. The project distinguishes itself through its flexible failure propagation, which allows tests to either halt execution immediately upon a failed requirement or return boolean results for conditional logic. It includes deep-equality object comparison and JSON normalizati
Testify is a comprehensive and widely-adopted toolkit for Go that provides the essential assertion and mocking capabilities required for robust unit and integration testing workflows.
GoMock is a mocking framework for the Go programming language.
This is a specialized mocking library for Go that provides essential test double capabilities, but it is a single-aspect tool rather than a comprehensive testing framework.
Mockery is a code generation tool that produces mock implementations from Go interfaces, designed to simplify unit testing by automating the creation of test doubles. It parses Go source files using abstract syntax tree analysis to extract interface method signatures, then generates complete mock struct types that implement those interfaces with configurable function fields for test injection. The tool distinguishes itself through its configuration and customization capabilities. Rather than embedding directives in source code annotations, Mockery reads generation settings from a YAML configu
This is a specialized code generation tool for creating mock objects rather than a comprehensive testing framework that provides assertions, BDD, or test execution management.
Playwright is a comprehensive browser automation framework designed for end-to-end testing and web workflow automation. It provides a unified API to drive web applications across multiple browser engines, enabling developers to simulate complex user interactions, perform web scraping, and validate application behavior in consistent, isolated environments. The framework distinguishes itself through a web-first testing paradigm that prioritizes stability and resilience. By utilizing an auto-waiting actionability engine and accessibility-tree-based locators, it eliminates common sources of test
This is a browser automation and end-to-end testing framework for web applications, which serves a different purpose than a general-purpose Go unit and integration testing library.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| onsi/ginkgo | 9K | Go | MIT | |
| smartystreets/goconvey | 8.4K | Go | NOASSERTION | |
| stretchr/testify |
| 25.9K |
| Go |
| mit |
| golang/mock | 9.4K | Go | Apache-2.0 |
| vektra/mockery | 7.1K | Go | BSD-3-Clause |
| microsoft/playwright | 91.1K | TypeScript | Apache-2.0 |