Black-box testing: Generate input values that exercise the specification and compare the actual output with the expected output.
把测试对象看作是一个不公开透明的黑色盒子。测试时,不考虑盒子里面的逻辑结果跟程序运行,只根据程序的需求规格书来检查程序的功能是否符合它的功能说明。
等价类划分
Equivalence Partitioning, EP
- The technique invariably involves generating as few tests as possible.
- Each equivalence partition for each of the parameters is a test case.
- Test input data can be an arbitrary value within an equivalence class.
- Commonly, the middle value is selected.
划分类型
下面的“强”、“弱”指每次测多个参数还是一个参数,“一般”、“健壮”指是否测试边界外的值。
- Weak Normal Equivalence Class Testing 弱一般等价类测试
- Strong Normal Equivalence Class Testing 强一般等价类测试
- Weak Robust Equivalence Class Testing 弱健壮等价类测试
- Strong Robust Equivalence Class Testing 强健壮等价类测试
Test Case
Test Data
边界值测试
Boundary Value Testing / Boundary Value Analysis (BVA)
Programming faults are often related to the incorrect processing of boundary conditions, so an obvious extension to Equivalence Partitioning is to select two values from each partition: the bottom and the top values.
Test Case
Test Data