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

Introduce spy or stub options to Hoverfly #389

Closed
mogronalol opened this issue Feb 9, 2017 · 2 comments
Closed

Introduce spy or stub options to Hoverfly #389

mogronalol opened this issue Feb 9, 2017 · 2 comments

Comments

@mogronalol
Copy link
Contributor

mogronalol commented Feb 9, 2017

This comes from this issue in Hoverfly-Java.

With Mockito in Java, you have the ability to Spy on real objects. This means instead of having a pure mock, you have the real object. In this case, individual methods are overridden to become stubs, leaving the the non-stubbed methods to work as normal.

This seems like something Hoverfly could do, but for http. So something like:

hoverctl simulate --stub // The same as how it currently behaves
hoverctl simulate // The same as above because stub is default
hoverctl simulate --spy // When there isn't a match, call the real service

This is a valid use case, in some situations. The one given was running the external dependency locally or as part of your build, and only wanting to change the behaviour of specific endpoints.

@tommysitu
Copy link
Member

tommysitu commented Jan 3, 2018

Spy mode has been introduced in this PR: #680

@tommysitu
Copy link
Member

tommysitu commented Jan 5, 2018

Thank to @3sunnysideup, Hoverfly v0.15.0 has a new spy mode.

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

No branches or pull requests

3 participants