mockery provides the ability to easily generate mocks for Golang interfaces using the stretchr/testify/mock package. It removes the boilerplate coding required to use mocks. mockery uses spf13/viper under the hood for its configuration parsing. It is bound to three different configuration sources, in order of decreasing precedence. By default, it searches the current working directory for a file named .mockery.[extension] where [extension] is any of the recognized extensions. Mockery will iteratively search every directory from the current working directory up to the root path for a .mockery.yaml file, if one is not explicitly provided. If your tests need access to the arguments to calculate the return values, set the return value to a function that takes the method's arguments as its own arguments and returns the return value.

Features

  • Install through brew
  • Generate all the mocks for your project
  • mockery uses spf13/viper under the hood for its configuration parsing
  • Config Search Path
  • Return Value Provider Functions
  • Expecter Interfaces

Project Samples

Project Activity

See All Activity >

Categories

Code Generators

License

BSD License

Follow mockery

mockery Web Site

Other Useful Business Software
Passwordless Authentication and Passwordless Security Icon
Passwordless Authentication and Passwordless Security

Identity is everything. Protect it with Duo.

It’s no secret — passwords can be a real headache, both for the people who use them and the people who manage them. Over time, we’ve created hundreds of passwords, it’s easy to lose track of them and they’re easily compromised. Fortunately, passwordless authentication is becoming a feasible reality for many businesses. Duo can help you get there.
Get a Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of mockery!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Code Generators

Registered

2023-01-11