单位测试用例弹簧靴。服务方法或HTTP URL

发布于 2025-02-02 19:49:22 字数 1452 浏览 2 评论 0原文

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

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

发布评论

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

评论(1

绅刃 2025-02-09 19:49:22

通常,单位测试涵盖@Service注释的类(和其他组件)的公共方法。

使用HTTP客户端进行测试更像是编写集成测试,这些集成测试涵盖了不同系统之间的连接 - 就像在HTTP API的情况下一样,这是由您的不同服务或其他与系统独立于系统的组件调用的。

PS:欢迎使用Stackoverflow,希望您能找到答案。 :)

Usually unit tests cover public methods from @Service annotated class (and other components).

Testing with HTTP client is more like writing integration tests, which cover connection between different systems - just like in the case of HTTP API, that is called either by your different service or by other component independent from your system.

PS: Welcome on StackOverflow, I hope that you will find your answers. :)

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