← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1712.e.1.b

测试沙箱虚拟化外部条件

理解等级:高级

沙箱隔离真实后果,让试验可回滚;时钟、网络、电量和内存等资源可用可控版本替代。例如抽象系统时间后,可直接测试临界日期而不必等待现实时间流逝。桩、模拟与依赖注入都可提供这种控制,但替代资源必须保留被验证行为的关键假设。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 可测试性 · 查看原书依据

      When we can abstract system time from clock time, we can allow the system (or components) to run at faster than wall-clock time, and test the system (or components) at critical time boundaries such as the next transition to or from Daylight Savings Time.

    参考来源

    - 位置:《Software Architecture in Practice, 4th Edition》第12章《可测试性》(来源项目:book-sources;源文件:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch12.html) - 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。 - 原始内容:When we can abstract system time from clock time, we can allow the system (or components) to run at faster than wall-clock time, and test the system (or components) at critical time boundaries such as the next transition to or from Daylight Savings Time.