go-vcr
Record and replay your HTTP interactions for fast, deterministic and accurate tests (by dnaeon)
ginkgo
A Modern Testing Framework for Go (by onsi)
Our great sponsors
- CodiumAI - TestGPT | Generating meaningful tests for busy devs
- ONLYOFFICE ONLYOFFICE Docs — document collaboration in your environment
- SonarQube - Static code analysis for 29 languages.
- InfluxDB - Access the most powerful time series database as a service
go-vcr | ginkgo | |
---|---|---|
6 | 11 | |
1,008 | 7,176 | |
- | - | |
0.0 | 4.6 | |
3 months ago | 4 days ago | |
Go | Go | |
GNU General Public License v3.0 or later | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
go-vcr
Posts with mentions or reviews of go-vcr.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-09.
-
Testing calls to external APIs
Mocking the http client using recorded responses; for example using dnaeon/go-vcr
-
How I write offline API tests in Go
For example I see go-vcr (note: not mine), but haven't taken time yet to evaluate it.
-
go-vcr v3 has been released
I've finally found some spare time and managed to work on go-vcr, fixed some long standing issues, refactored things here and there and was able to get a new version of the package.
-
What are you using for testing your IAC?
Terraform providers are tested this way (separate cloud account w/ create/destroy) paired with VCR to record and replay the HTTP requests.
-
Go Package for testing HTTP interactions: github.com/dnaeon/go-vcr
Let me introduce to you github.com/dnaeon/go-vcr.
-
best way to mock/unit test http.Client?
dnaeon/go-vcr
ginkgo
Posts with mentions or reviews of ginkgo.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-04-09.
-
Recommendations for Learning Test-Driven Development (TDD) in Go?
A bit off-topic, but i really like the ginkgo BDD framework
-
ginkgo integration with jira/elasticsearch/webex/slack
If you are using Ginkgo for your e2e, this library might of help.
-
Testing frameworks, which to use?
https://onsi.github.io/ginkgo/ offers a simple way to create tables with different scenarios useful to generate different test cases based on a file like a yml without to need to develop useless code. Maybe at start seems to be a little verbose but depends how you design the test case.
If you like BDD and more expressive tests, go get ginkgo. It is a pain in the back get the hang of its R-spec like syntax, but if you're good at it and you like it, it is very expressive and readable. It has its own matcher (assertions library), gomega, but if you don't like it, you can still use testify instead.
-
Testza - A modern test framework with pretty output
What are people’s thoughts on testing frameworks? I’ve heard that most devs only use the testing package in the standard library and the testify package for assertions— I assume this is because Go is meant to be lightweight and scalable, and adding external dependencies basically goes against that. But I’ve also seen devs use packages like ginkgo to make tests more structured and readable. What do you guys think?
-
What are your favorite packages to use?
Ginkgo Behavioural test framework
-
Air – Live reload when developing with Go
If you write your tests with Ginkgo [0] its CLI can do this for you. It also has nice facilities to quickly disable a test or portion of a test by pretending an X to the test function name, or to focus a test (only run that test) by prepending an F. It’s pretty nice.
-
Half a million lines of Go at The Khan Academy
The BDD testing framework Ginko [1] has some "weird" / unidiomatic patterns, yet it is very popular
-
Ginkgo for unit testing?
To settle an argument amongst my coworkers, I started a Twitter poll on using Gingko for golang unit testing. Some like the framework because it makes tests clean. Others hate it with a firey passion.
-
Autobucket Operator
As a big fan of automated testing, it’s comforting to learn that we can easily write tests for our controllers using envtest (which runs a local k8s control plane so we can run our tests against it), the Gingko testing framework and the Gomega matching/assertion library:
What are some alternatives?
When comparing go-vcr and ginkgo you can also consider the following projects:
Testify - A toolkit with common assertions and mocks that plays nicely with the standard library
GoConvey - Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
godog - Cucumber for golang
goblin - Minimal and Beautiful Go testing framework
httpexpect - End-to-end HTTP and REST API testing for Go.
go-cmp - Package for comparing Go values in tests
gotests - Automatically generate Go test boilerplate from your source code.
gocheck - Rich testing for the Go language
Gauge - Light weight cross-platform test automation
testfixtures - Ruby on Rails like test fixtures for Go. Write tests against a real database
gofight - Testing API Handler written in Golang.