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

Consider integrating VCR-style testing for HTTP calls... #90

Closed
brendandburns opened this issue Oct 8, 2017 · 6 comments
Closed

Consider integrating VCR-style testing for HTTP calls... #90

brendandburns opened this issue Oct 8, 2017 · 6 comments

Comments

@brendandburns
Copy link
Contributor

There is a Java library here:

https://github.com/betamaxteam/betamax

Similar to VCR for Ruby and VCR.py for Python.

It supports recording and playback of HTTP requests. We should consider using it to write a bunch of functional tests for this library.

@rpalcolea
Copy link

Hi @brendanburns ,

Are there any examples out there on how to tests applications that use this library? is people only mocking responses?

@brendandburns
Copy link
Contributor Author

@rpalcolea

Here are examples of using it in python:

https://vcrpy.readthedocs.io/en/latest/usage.html

Sadly, it looks like the equivalent Java library (Betamax) has been abandoned.

We could just use Mockito to mock out the relevant HTTP calls.

But basically, the problem I'm trying to solve for is that our unit testing doesn't really cover most of our usage, and thus we have introduced bugs that are only found when users use the code.

@rpalcolea
Copy link

Thanks for the response @brendanburns,

Yes... I thought about Betamax but go abandoned last year :(

In our case, we ended up using WireMock for our tests against the kubernetes API using the library... still it would be nice to have something like betamax

@rpalcolea
Copy link

I wonder if flashback could be helpful to you -> https://github.com/linkedin/flashback

@brendanburns
Copy link
Contributor

brendanburns commented Jun 1, 2018 via email

@brendandburns
Copy link
Contributor Author

This is now done. For the record, I used WireMock

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

3 participants