GoConvey is a BDD testing framework for Go with a unique feature: a beautiful Web UI for viewing test results in real-time. It provides readable test syntax and live reload capabilities.
go get github.com/smartystreets/goconvey- BDD Style: Convey/So syntax for readable tests
- Web UI: Beautiful browser-based test runner with live reload
- Nested Contexts: Natural test organization
- Rich Assertions: Many built-in matchers (ShouldEqual, ShouldBeNil, etc.)
- Auto-Watch: Automatically reruns tests on file changes
- Coverage Visualization: See code coverage in the UI
Convey("Sum function", t, func() {
Convey("should add two numbers", func() {
So(Sum(2, 3), ShouldEqual, 5)
})
})Convey("Calculator", t, func() {
Convey("Addition", func() {
Convey("with positive numbers", func() {
So(Sum(2, 3), ShouldEqual, 5)
})
})
})# Standard go test
go test
# With GoConvey Web UI (recommended)
goconvey
# Then open browser to http://localhost:8080The GoConvey Web UI provides:
- Real-time test results
- Auto-rerun on file save
- Code coverage visualization
- Test history
- Notifications on failures
So(actual, ShouldEqual, expected)
So(actual, ShouldNotEqual, expected)
So(object, ShouldBeNil)
So(object, ShouldNotBeNil)
So(slice, ShouldContain, element)
So(slice, ShouldHaveLength, 3)
So(err, ShouldBeError)
So(value, ShouldBeTrue)- ✅ Beautiful, intuitive Web UI
- ✅ Live reload and watch mode
- ✅ Readable BDD-style syntax
- ✅ Visual code coverage
- ✅ Good for TDD workflow
- ✅ Nested contexts for organization
- ❌ Less actively maintained (as of 2025)
- ❌ Web UI adds overhead
- ❌ Smaller community compared to alternatives
- ❌ Not as feature-rich as Ginkgo
- Use the Web UI: It's GoConvey's killer feature
- Nest Convey blocks: Organize tests logically
- Use descriptive strings: Make the UI output readable
- One assertion per Convey: Keep tests focused
- Enable watch mode: Get instant feedback during development