-
Notifications
You must be signed in to change notification settings - Fork 9
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
Replace external calls on the tests #13
Comments
If you were to spawn a web service for this, then you may as well go with tornado. I'm no longer involved with this project, although I can merge changes in. I won't be doing a release though. Maybe John from SpectoLabs can chip in. |
It is a little ironic to say the least that the tests for a tool that is intended to remove dependencies depend on an external (brittle) dependency! I'm sure was a bit of technical debt added to get things done quickly. We (SpectoLabs) are concentrating on Hoverfly, Hoverfly Java and Hoverfly Cloud at the moment. We don't have any Python expertise available at the moment to progress this but would welcome contributions. If it's useful to the Python community get in touch and I'd be happy to discuss a new arrangement for its maintenance. |
The irony is indeed palpable. 🥇It was a design decision however, as I was reluctant to bring in another dependency. In the interim, I'd requested for HoverFly to provide those endpoints, so I could test against that data directly. We never get around to it though, and the external dependencies remained. They are in the examples too.. I can always get those endpoints back up. This needs looking into. Would also like to hear about how HoverPy is being used. |
Hoverfly certainly has a webserver mode so that's probably the easiest solution with no external dependencies. |
That seems to be a good approach, but I need to call it out that pointing to a hoverfly URL it's still an external dependency that would require both internet connection and the hoverfly server to be up and running. If you guys are talking about Hoverfly as a service in the host machine, that's still a dependency external to the lib itself, but that's maybe ok since one should have it running in order to use hoverpy in the first place. In another hand, if we take the python-lib approach, this new lib can be added as a development-only dependency and the tests would be self-sufficient. I can help with this approach, but I cannot provide an estimation right now. |
It's in the host machine for unit tests at least. The philosophy of Hoverfly Go binary that it runs anywhere and Hoverpy is a wrapper that hides the over-the-wire element. In unit testing the Go binary will be local. In other tests, integration, end-to-end and performance testing Hoverfly will typically be remote. The idea is you would use a simulation in unit testing and then re-use a number of simulations in end-to-end testing with multiple Hoverfly instances. The intent of Hoverpy is that it must implement unit tests with a local Go binary. |
If that's the case, then using Hoverfly itself as the web server is a no-brainer. 😁 |
Currently, the test cases send requests to an external URL, which is a brittle dependency. Hoverpy should not rely on this approach. Instead, I suggest the use of a simple, internal web service, to be started on the
setUp
and closed on thetearDown
.We could use a lib as https://cherrypy.org to achieve this.
The text was updated successfully, but these errors were encountered: