Documenting Your Testing Strategy
For the example function on the left, on the right is how we can document the testing strategy we worked on in the partitioning exercises above. The strategy also addresses some boundary values we didn’t consider before.
右边就是左边的函数对应的测试策略,在MIT的test文档中有相关的分割输入区间的练习。
测试策略包含一些我们之前没有想到的边界值。
左边的方法文档包括:
1,方法的功能
2,调用该方法的具体例子
3,输入一些边界值参数的行为说明
4,参数规约: 两个参数@param 对方法调用者的约束
@return对方法调用者的承诺
而测试策略的模板则是:
1,标题 testing strategy
2,分割输入如下:Partition the inputs as follows:
3, 对每个参数的划分
4,各个参数之间的关系的边界(非必需)
4,特殊说明(如果有的话)
一个testing strategy的例子