Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to automatically generate mock code #132

Open
ivanxwwu opened this issue May 20, 2020 · 1 comment
Open

Support to automatically generate mock code #132

ivanxwwu opened this issue May 20, 2020 · 1 comment

Comments

@ivanxwwu
Copy link

ivanxwwu commented May 20, 2020

Since most of the time when we write cases we are writing mock data, I want to know if there are plans to integrate mock tools under gotests, such as gomonkey, convey, etc. When we use gotests to generate cases, we also generate mock sample code together. I am also doing secondary development based on your gotests tool to achieve this function.

@cweill
Copy link
Owner

cweill commented Dec 26, 2020

When you have a PR that adds similar functionality, let me know. I'll be happy to have a look. Feel free to add more details here if you have suggestions. Currently there are no plans to add mock support as the use of mocks heavily depends on whether the code author prefers mocks or fakes/dependency-injection.

See https://martinfowler.com/articles/mocksArentStubs.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants