mockery
keploy
Our great sponsors
mockery | keploy | |
---|---|---|
20 | 69 | |
5,608 | 3,316 | |
2.5% | 4.0% | |
8.6 | 9.6 | |
2 days ago | 1 day ago | |
Go | Go | |
BSD 3-clause "New" or "Revised" License | Apache License 2.0 |
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.
mockery
-
I Write Tests in Go
I'm far too lazy to write mocks by hand in go. You can generate a mock for a given interface with mockery https://github.com/vektra/mockery
-
go-ecommerce-microservices: A practical e-commerce microservices, built with cqrs, event sourcing, vertical slice architecture, event-driven architecture.
Some of the features: - ✅ Using Vertical Slice Architecture as a high level architecture - ✅ Using Event Driven Architecture on top of RabbitMQ Message Broker with a custom [Event Bus](pkg/messaging/bus/) - ✅ Using Event Sourcing in Audit Based services like [Orders Service](services/orders/) - ✅ Using CQRS Pattern and Mediator Patternon top of Go-MediatR library - ✅ Using Dependency Injection and Inversion of Controlon top of uber-go/fx library - ✅ Using RESTFul api with Echo framework and using swagger with swaggo/swag library - ✅ Using Postgres and EventStoreDB to write databases with fully supports transactions(ACID) - ✅ Using MongoDB and Elastic Search for read databases (NOSQL) - ✅ Using OpenTelemetry for collection Distributed Tracing with using Jaeger and Zipkin - ✅ Using OpenTelemetry for collection Metrics with using Prometheus and Grafana - ✅ Using Unit Test for testing small units with mocking dependent classes and using Mockery for mocking dependencies - ✅ Using End2End Test and Integration Test for testing features with all of their real dependeinces using docker containers (cleanup tests) and testcontainers-go library
- Direction of mockery: absorb different styles of mocks into this project · vektra mockery · Discussion #671
-
Go: Write Mock Test cases using Mockery and
Read mockery documentation: https://vektra.github.io/mockery/
-
Mocking unexported interfaces?
https://github.com/vektra/mockery is the better mocking framework in my biased opinion. The Google maintainers for gomock seem to have neglected the project.
-
I want to contribute to open source but don't know where to start
There are some one liner changes you can implement in https://github.com/vektra/mockery
-
Is gomock still maintained and recommended?
When there's just one heavyweight dependency you're interacting with, perhaps a one-off stub/fake is simpler, but I would posit that auto-generated mocks via things like mockery + go:generate leave less test code to maintain vs. perhaps many stubs across the project.
-
vektra/mockery: v2.21.0 includes "packages" config section, allowing 5x faster mock generation and more fine-grained control over mocks
Please take a look at the documentation linked here, and the related discussion topic that spawned this.
-
Issue implementing interface method that returns another interface
As you can see, the package has a chained method Logical().Write() . Since I want to create tests for PublicFunctionIWantToTest, I want to pass down all the functionality as interface so that I can use https://vektra.github.io/mockery/ to create mocks for it.
- FEEDBACK REQUESTED: Deprecation of automatic interface discovery · Discussion #549 · vektra/mockery
keploy
-
Getting Started with Keploy
October is the month of Open Source and Keploy is taking part in this celebration. You can contribute to several Keploy projects by participating in this year’s Hacktoberfest. You can both contribute to the code part and the no-code part as well. Here are some contributions that you can make!
curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy
- Show HN: Keploy – eBPF-Driven API Mock and Test Generation from Prod Traffic
-
6 AI Tools every developer must try
Keploy is an open-source, end-to-end (E2E) testing toolkit for developers. It creates test cases and data mocks/stubs by recording API calls, database queries, etc., making releases faster and more reliable. Keploy works by being added as a middleware to your application. It captures and replays all network interaction served to the application from any source. This allows Keploy to generate test cases for all of your API endpoints, including those that are not explicitly tested by your unit tests. This can help you to identify and fix bugs that would otherwise go undetected. Keploy can create data mocks/stubs for your APIs, which can help you to isolate your tests and make them more reliable. It can automatically compare test cases generated from previously collected traffic against updated behaviour of your application, and bring any differences to your attention. This can help you to identify regressions in your production code early on.
-
Toxic Backlink Issue: Semrush Flags OSS Project's GitHub Link. Disavow or Whitelist? Need SEO Advice!
I'm new to SEO, I run an OSS project and Semrush shows my project's main repo link as TOXIC backlink!! I'm not sure if I should add this to the whitelist of my domain.
-
Gokiburi: Automatic Test Runs for Go Projects
I have once contributed to one similar project https://github.com/keploy/keploy , This can help you generate e2e tests and mocks as well , with real api and infra calls .
-
FOSS Projects needed
Please feel free to checkout keploy too - https://github.com/keploy/keploy
- Becoming a Go dev
-
I’ve created a tool that generates automated integration tests by recording and analyzing API requests and server activity. Within 1 hour of recording, it gets to 90% code coverage.
This looks very similar to keploy but specific to node apps. Keploy is designed to be multi language.
-
Test generating tools - future of test automation?
I recently discovered Keploy (https://github.com/keploy/keploy) and was really impressed by its promise that it can generate API tests with code coverage by itself just by recording API calls and mocking everything that goes outside of the application - including calls to external API endpoints and the database. It seems like a super useful tool and potentially a game changer, especially now that GPT is starting another wave of automation.
What are some alternatives?
gomock - GoMock is a mocking framework for the Go programming language.
Testify - A toolkit with common assertions and mocks that plays nicely with the standard library
counterfeiter - A tool for generating self-contained, type-safe test doubles in go
go-rabbitmq - A wrapper of streadway/amqp that provides reconnection logic and sane defaults
minimock - Powerful mock generation tool for Go programming language
core - Backend server API handling user mgmt, database, storage and real-time component
go-sqlmock - Sql mock driver for golang to test database interactions
CodeTriage - Discover the best way to get started contributing to Open Source projects
hoverfly - Lightweight service virtualization/ API simulation / API mocking tool for developers and testers
changie - Automated changelog tool for preparing releases with lots of customization options
moq - Interface mocking tool for go generate
evergreen - A Distributed Continuous Integration System from MongoDB