← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 743.d.2.b.5.a.2.a.3.c · 生成模型:GPT-6

专项测试的验证目标

理解等级:初级

专项测试按要验证的问题挑选,而非单靠调用范围划分。

方法 验证目标
性能测试 在给定条件下测量速度等指标
负载测试 检查高负载下系统能否保持服务
契约测试 确认生产方仍提供约定的数据形态
变异测试 改动实现,检查现有测试能否察觉变化
模糊测试 用意外输入寻找崩溃等异常
属性测试 生成许多输入,检验约定的不变量

属性测试提供样例覆盖。有限次生成不能代替对所有输入成立的证明。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Testing a builder macro 单元测试之外 · 查看原书依据

      Obviously, we cannot explore all these kinds of testing in depth. That would double the size of this book! But what kinds of tests are useful when you’re writing macros? In my opinion, integration tests that check your interaction with other systems, like APIs or databases, can be useful depending on the type of macro you are creating. For our current example (builder), unit tests are all we need.

    参考来源

    - 位置:《Write Powerful Rust Macros》第06章《Testing a builder macro》(book-source:extracted/Write Powerful Rust Macros/_epub-src/OEBPS/Text/chapter-6.xhtml#p167) - 结论依据:6.6 在集成层次之外逐项介绍性能、负载、契约、变异、模糊和属性测试,最后指出应按宏的交互对象选择额外测试。 - 原始内容:Obviously, we cannot explore all these kinds of testing in depth. That would double the size of this book! But what kinds of tests are useful when you’re writing macros? In my opinion, integration tests that check your interaction with other systems, like APIs or databases, can be useful depending on the type of macro you are creating. For our current example (builder), unit tests are all we need.