Skip to content

v1.0.0 - Complete Go Testing Frameworks Examples

Latest

Choose a tag to compare

@lirany1 lirany1 released this 08 Nov 20:34
· 5 commits to master since this release

🎉 Go Testing Frameworks Examples v1.0.0

A comprehensive collection of 11 Go testing framework examples with production-ready code and extensive documentation.

✨ Features

  • 11 Testing Frameworks - Complete examples for all major Go testing frameworks
  • 9/9 Tests Passing - All testable frameworks have working examples
  • 100% Documentation - Every framework includes detailed README with examples
  • CI/CD Pipeline - GitHub Actions workflow with matrix testing
  • Interactive Comparison - Table with live links to each framework
  • Production Ready - Well-commented code following best practices

📦 Frameworks Included

Unit Testing

  1. Built-in Testing - Native Go testing with table-driven tests
  2. Testify - Assertions and mocking (100% coverage)

BDD Testing

  1. Ginkgo + Gomega - BDD-style testing (100% coverage)
  2. GoConvey - BDD with Web UI support
  3. Godog - Cucumber-style BDD with Gherkin
  4. Gauge - Acceptance testing with Markdown specs

Mocking

  1. GoMock - Interface mocking (97.8% coverage)

Advanced Testing

  1. Gopter - Property-based testing (600+ tests)
  2. Rapid - Model-based stateful testing (800+ tests)
  3. Testcontainers - Docker integration testing
  4. httpexpect - HTTP/REST API testing

🚀 Quick Start

# Clone the repository
git clone https://github.com/lirany1/go-testing-framework-examples.git
cd go-testing-framework-examples

# Download dependencies
go mod tidy

# Run all tests
go test ./01_builtin_testing/... ./02_testify/... ./03_ginkgo_gomega/... \
        ./04_goconvey/... ./05_gomock/... ./06_godog/... \
        ./08_gopter/... ./09_rapid/... ./11_httpexpect/...

📊 Test Results

All frameworks tested and passing:

  • ✅ Built-in Testing
  • ✅ Testify
  • ✅ Ginkgo + Gomega
  • ✅ GoConvey
  • ✅ GoMock
  • ✅ Godog
  • ✅ Gopter
  • ✅ Rapid
  • ✅ httpexpect

Special requirements:

  • ⚠️ Gauge requires Gauge CLI
  • ⚠️ Testcontainers requires Docker

📚 Documentation

Each framework includes:

  • Installation instructions
  • Feature overview
  • Pros and cons
  • Usage examples
  • Best practices

🏷️ Topics

go golang testing bdd tdd unit-testing integration-testing mocking testify ginkgo goconvey gomock godog gopter testcontainers httpexpect testing-frameworks go-testing best-practices tutorial

🙏 Support

If you find this helpful:

  • ⭐ Star this repository
  • 🐛 Report issues
  • 💡 Suggest improvements
  • Buy me a coffee

Full Changelog: https://github.com/lirany1/go-testing-framework-examples/commits/v1.0.0