• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 單元測試基本概念(3)

    發表于:2016-10-14來源:Qiana的小小站作者:Qiana的小小站點擊數: 標簽:
    測試什么? Right-BICEP原則 Right-結果正確,Happy-Path測試,了解最終用戶的目標,或所面對代碼的行為 Boundary Conditions-邊界條件正確, bug 往往發生在邊界上

    測試什么?

    Right-BICEP原則

    Right-結果正確,Happy-Path測試,了解最終用戶的目標,或所面對代碼的行為

    Boundary Conditions-邊界條件正確,bug往往發生在邊界上,CORRECT原則

    Inverse Relationships-檢查反向關系,盡量避免調用與正向相同方法

    Cross-Check能否用其他手段對結果進行再次確認,

    Error-Conditions-強制觸發錯誤條件,unhappy-path (Fishbowl and Mock)

    Performance–性能測試是否在允許范圍內

    如何確定邊界條件?

    conformance (一致性)-- 值 是否和預期的一致。

    Ordering(順序性)--一組值是該有序或者無序的。

    Range(區間性)--值是否位于合理的最小值和最大值之內。

    Reference(引用 、耦合性)--代碼是否引用了一些不在代碼本身控制范圍之內的外部資源。

    Existence(存在性)--值是否存在(例如,是否是非null,非0,在一個集合中等等)。

    Cardinatity(基數性)--是否恰好有足夠的值?

    原文轉自:http://xueqian.github.io/2016/01/10/單元測試基本概念/

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>