在进行集成测试时模拟客户端依赖性

发布于 2025-02-09 06:26:04 字数 242 浏览 1 评论 0原文

我有一项由工作流程中的几种微服务组成的服务。其中一些MS正在调用依赖关系。 现在我想嘲笑这些电话,因此,当我在工作流的入口处发送消息时,依赖项答案被嘲笑,但是我的系统正常工作。

挑战是我想从外部配置模拟:即时配置我想从模拟中获得的答案,运行测试,验证我的系统的行为是否正常。

我在一家公司工作的公司工作,该公司的内部工具就是这样做的,但是我想知道是否有公共工具这样做?我不敢相信它不存在,我敢打赌,这是我对此缺乏的知识;)

欢呼

I have a service composed of several micro services working in workflow. Some of these MS are calling dependencies.
Now I'd like to mock these calls, so when I send a message at the entrance of the workflow the dependencies answers get mocked, but my system works as normal.

The challenge is that I would want to configure the mock from the outside: Configure on the fly the answer I want to get from the mock, run my test, verify that my system behaves properly.

I worked for a company that shall remain unnamed that has an internal tool doing just that, but I'm wondering if there is a public tool doing this? I can't believe it doesn't exist, I bet more on my lack of knowledge about this, at that point ;)

Cheers

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沫尐诺 2025-02-16 06:26:04

到目前为止,我发现的最好是 https://wiremock.org/docs/
我不想在这里做任何广告,这只是我看到的唯一一个模拟从远处配置的一个广告

So far best I've found is https://wiremock.org/docs/
I don't want to do any ad here, it's just the only one I see that gets its mocks configured from a distance

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文