White-Box Testing:
逻辑覆盖Logic Coverage
语句覆盖 Statement coverage
判定覆盖 Decision coverage
条件覆盖Condition coverage
条件组合覆盖 Condition combination coverage
路径覆盖 Path coverage
Black-Box Testing:
等价划分法Equivalence Partitioning Method选取小量有代表性的输入数据,以期用较小的代价暴露较多的程序错误。Select minor representative
input data to expect more program error discovered with less cost.
边界值法Boundary Value Method处理边界情况时程序最容易发生错误。使用边界值选择一组测试用例,检查程序处理边界数值的能力
Errors occur easily when the program deals with boundary circumstance. Use the boundary value to
choose one set of test cases, to check the capability of processing boundary value.
规格导出法(Specification Export Method )根据相关的规范描述来设计测试用例。每一个测试用例用来测试一个或多个规范陈述语句。Design
test cases according to the relative criterions. Each test case can be used to test one or more
statement in the criterions.
例如,考虑一个计算平方根的函数的规范For example, consider the criterion of calculating the
square root of a function.
输入:实数 Input: real number
输出:实数Output: real number
规范:当输入一个0 或大于0 的数时,返回其正的平方根;当输入一个小于0 的数时,显示错误信息,
并返回0。
输入输出组合法Combination Method of Input and Output
“CRUD”覆盖法"CRUD" Coverage Method
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment