Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vektra/mockery
A mock code autogenerator for Go
https://github.com/vektra/mockery
generation generator go golang mock mockgen mocking mocks stretchr testify testing
Last synced: 3 days ago
JSON representation
A mock code autogenerator for Go
- Host: GitHub
- URL: https://github.com/vektra/mockery
- Owner: vektra
- License: bsd-3-clause
- Created: 2014-09-02T16:49:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-12-04T16:36:10.000Z (8 days ago)
- Last Synced: 2024-12-07T16:42:33.633Z (5 days ago)
- Topics: generation, generator, go, golang, mock, mockgen, mocking, mocks, stretchr, testify, testing
- Language: Go
- Homepage: https://vektra.github.io/mockery/
- Size: 26.7 MB
- Stars: 6,193
- Watchers: 33
- Forks: 413
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-go - mockery - Tool to generate Go interfaces. (Testing / Mock)
- my-awesome - vektra/mockery - 12 star:6.2k fork:0.4k A mock code autogenerator for Go (Go)
- awesome-list - mockery
- awesome-go - mockery - Tool to generate Go interfaces. Stars:`6.2K`. (Testing / Mock)
- awesome-golang-repositories - mockery
- awesome-go - Mockery
- awesome-go-extra - mockery - 09-02T16:49:01Z|2022-08-17T19:17:19Z| (Testing / Mock)
README
mockery
=======
[![Release](https://github.com/vektra/mockery/actions/workflows/release.yml/badge.svg)](https://github.com/vektra/mockery/actions/workflows/release.yml) [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/vektra/mockery/v2?tab=overview) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vektra/mockery) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/vektra/mockery) [![Go Report Card](https://goreportcard.com/badge/github.com/vektra/mockery)](https://goreportcard.com/report/github.com/vektra/mockery) [![codecov](https://codecov.io/gh/vektra/mockery/branch/master/graph/badge.svg)](https://codecov.io/gh/vektra/mockery)mockery provides the ability to easily generate mocks for Golang interfaces using the [stretchr/testify/mock](https://pkg.go.dev/github.com/stretchr/testify/mock?tab=doc) package. It removes the boilerplate coding required to use mocks.
Documentation
--------------Documentation is found at our [GitHub Pages site](https://vektra.github.io/mockery/).
Development
------------taskfile.dev is used for build tasks. Initialize all go build tools:
```
go mod download -x
```You can run any of the steps listed in `Taskfile.yml`:
```
$ task test
task: [test] go test -v -coverprofile=coverage.txt ./...
```Stargazers
----------[![Stargazers over time](https://starchart.cc/vektra/mockery.svg)](https://starchart.cc/vektra/mockery)