← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 3224.c

模拟服务支持并行开发

理解等级:中级

双方先同意交互契约后,消费者可用契约生成的模拟服务开发和演示,生产者则用生成的验证测试实现真实接口。这样减少等待对方完成部署的时间,但模拟服务只代表约定响应;最终仍要让生产者测试与真实集成验证接上。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      A key benefit of using contracts is that once the producer agrees to implement a contract, this decouples the dependency of building the consumer and producer. Tip We have used generated stub servers to run demos for stakeholders. This was useful as the producer was still implementing the logic; however, they had agreed to the contracts. The consumer has a stub server to develop against and the producer has tests to ensure that they are building the right interaction.

    参考来源

    - 位置:《Mastering API Architecture》第2章《Testing APIs》之《How a Contract Is Implemented》(源文件:_epub-src/OEBPS/ch02.xhtml) - 结论依据:原文说协议一经生产者接受便可分开开发,消费者用 stub,生产者用生成测试;模拟服务可用于早期演示。 - 原始内容:A key benefit of using contracts is that once the producer agrees to implement a contract, this decouples the dependency of building the consumer and producer. Tip We have used generated stub servers to run demos for stakeholders. This was useful as the producer was still implementing the logic; however, they had agreed to the contracts. The consumer has a stub server to develop against and the producer has tests to ensure that they are building the right interaction.