← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1971.o.1.b.1.a.2.c.1.b.2.b.1

下游验收测试纳入上游持续集成

理解等级:高级

下游与上游共同编写接口验收测试,表达下游对接口行为的预期;上游把测试加入自己的持续集成。这样上游变更能早知是否破坏下游契约,下游也无需持续盯着上游实现。

测试本身一旦改变,意味着接口预期改变,双方必须沟通。仅靠口头告知仍可能漏掉细微破坏,造成下游停工和上游紧急修复。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第106章《Customer/Supplier Development Teams》(源文件:_epub-src/0321125215_ch14lev1sec6.html;单元02) - 结论依据:原文明确要求双方共同开发自动化验收测试,放入上游测试集,且测试变化需跨团队沟通。 - 原始内容:Jointly develop automated acceptance tests that will validate the interface expected. Add these tests to the upstream team's test suite, to be run as part of its continuous integration. This testing will free the upstream team to make changes without fear of side effects downstream. [...] Even on the most cooperative project, although the customer can identify and communicate its dependencies, and the supplier can diligently try to communicate changes, without tests, surprises will happen. They will disrupt the downstream team's work and force the upstream team to take on unscheduled, emergency fixes. Instead, have the customer team, in collaboration with the supplier team, develop automated acceptance tests that will validate the interface it expects. The upstream team will run these tests as part of its standard test suite. Any change to these tests calls for communication with the other team, because changing the tests implies changing the interface. [...] There must be an automated test suite that allows the upstream team to change its code without fear of breaking the downstream, and lets the downstream team concentrate on its own work without constantly monitoring the upstream team.