知识卡片

普通读书笔记卡 · 517.g.2.a.4.c.1

声明逻辑需测变化

理解等级:高级

单纯把变量填进声明往往由基础设施工具检查合法性;调用函数、条件分支和地址计算却会产生多种结果,需要边界测试。若声明中嵌入复杂过程逻辑,可提取为过程语言库并单独测试,让声明保留简单组合。多个简单网络声明组合后的连通性,也比逐项资源存在更值得测试。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 基础设施代码测试策略 · 查看原书依据

      The outcome of applying this code varies based on inputs and context, which makes writing tests worthwhile. Testing Declarative Code Mixed with Procedural Code Imagine that instead of calling these functions, you wrote the code to select a subset of the address range as a

    参考来源

    - 位置:《Infrastructure As Code》第17章《基础设施代码测试策略》(来源项目:book-sources;源文件:extracted/Infrastructure As Code/_epub-src/OEBPS/ch17.html) - 结论依据:原文在该段定义概念并解释相关过程或限制,支撑“单纯把变量填进声明往往由基础设施工具检查合法性;调用函数、条件分支和地址计算却会产生多种结果,需要边界测试”这一核心结论;正文的用途与边界据同小节后续论述整理。 - 原始内容:The outcome of applying this code varies based on inputs and context, which makes writing tests worthwhile. Testing Declarative Code Mixed with Procedural Code Imagine that instead of calling these functions, you wrote the code to select a subset of the address range as a