Hoverfly API模拟与Golang仓库:如何入门

huangapple go评论85阅读模式
英文:

Hoverfly API Simulations with Golang repositories: how to get started

问题

我刚刚开始尝试使用Hoverfly,我有一个使用Golang的后端,调用了一些第三方API,我需要创建模拟。我知道Hoverfly有Java和Py的绑定,并且我找到了一些使用Hoverfly的教程。我可能在一个非常微小的地方遗漏了一点,一旦我创建了模拟(通过捕获模式),下一步是什么?我只需创建使用它们的集成测试吗?我需要将这里的go包导入到我的存储库中吗?我在示例文件夹中寻找一些用法示例,但看到的更多是.py的示例。有没有我完全错过的可用示例?

谢谢

英文:

I have just started to experiment with Hoverfly and I have a Golang backend calling a number of 3rd party APIs for which I would need to create simulations. I am aware that Hoverfly has Java and Py bindings and I have come across a number of tutorials using Hoverfly with both. I think I am possibly missing very trivial point here, once I have created the simulations (via the Capture Mode), what is the next step? Do I simply create integration tests making use of them? Do you import the go package here into my repository? I was looking for some sample usages in the examples folder and I have seen more .py driven ones. Is there any available example that I totally missed out?

Thank you

答案1

得分: 1

对于Golang的测试,你可以查看hoverfly项目中的功能测试:https://github.com/SpectoLabs/hoverfly/tree/master/functional-tests,它使用hoverfly来测试hoverfly!

英文:

For Golang testing, you can have a look at the functional tests in the hoverfly project: https://github.com/SpectoLabs/hoverfly/tree/master/functional-tests, it’s using hoverfly to test hoverfly!

huangapple
  • 本文由 发表于 2022年2月7日 02:31:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/71010360.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定