What are the test case writing techs?
What are the test case writing techs (Boundary value analysis and equalence class part)?Black-Box Test Case Selection: Equivalence Partitioning
Because exhaustive black-box testing is infeasible, black-box test cases must be chosen to find different faults if possible.
We can usually assume that similar inputs will evoke similar responses, allowing us to group inputs into equivalence classes.
In equivalence partitioning, only one or a few test cases are chosen to represent an entire equivalence class.
Equivalence Classes
Input data should be divided into equivalence classes based on consideration of:
valid vs. invalid input values
valid vs. invalid output values
similarity and difference of input values
similarity and difference of output values
similarity and difference of expected processing
Notes:
Examples of equivalence classes:
negative, positive, and 0 inputs or outputs;
input or output strings within size limits, beyond size limits, and the empty string;
input or output numeric values within size limits and beyond size limits;
input files that exist or not, are readable or not, are correct or not;
output files that exist or not, are writable or not;
combinations of input values that are consistent, and combinations that are not consistent.
Equivalence Partitioning Example
Equivalence Partitioning ExampleA graphing package displays lines with a standard weight, or eight alternate weights. Input data is a menu choice to change line weight. The equivalence classes might be:
choosing the standard weight when the current weight is the standard weight
choosing the standard weight when the current weight is an alternate weight
choosing an alternate weight when the current weight is the standard weight
choosing an alternate weight when the current weight is an alternate weight Black-Box Test Case Selection: Boundary Value Analysis
Because exhaustive black-box testing is infeasible, black-box test cases must be chosen to maximize the chance of finding faults.
Experience has shown that values at or near equivalence class boundaries are more likely to detect faults.
Boundary value analysis is choosing test cases at or near the boundaries of equivalence classes.
Notes:
Examples of equivalence classes:
maximum negative, maximum positive, and 0 inputs or outputs;
input or output strings at size limits, 1 character beyond size limits, the empty string, and strings of 1 character;
input or output numeric values at size limits and 1 beyond size limits;
empty input files and files with one character in them;
Boundary Value Analysis Example
Consider the graphing package line weight equivalence class of choosing the standard weight when the current weight is an alternate weight.
Boundary value analysis suggests the following test cases:
the current weight is the lightest weight when the standard weight is chosen
the current weight is the heaviest weight when the standard weight is chosen I am very glad to know about those messages.
even though have owner so many knowledges,i give you aadvice. : )
could you tell me about foreign forum ?thank you very much !!!!!!!!! 先翻译第一段吧.如有翻译不当之处请指出!谢谢.
/********************************************/
编写测试用例的技巧是什么?
编写测试用例的技巧是什么(边界值分析和等价类划分)?
黑盒测试用例的选择: 等价类划分
因为穷举测试是不可能的.所以在可能的情况下黑盒测试用例被设计成能够找到不同缺陷.
我们通常会假定相似的输入值会引起相似的反映,那么就让我们把这些相似的输入值归到一个等价类里.
在一个等价类里,仅用一个或很少的测试用例来表现整个等价类.
等价类
基于以下条件将输入的不同数据分成不同的等价类:
有效的和无效的输入数据
有效的和无效的输出数据
输入数据相似和差异
输出数据相似和差异
期望处理过程的相似和差异
注释:
等价类的例子:
负值,正值,0输入和输出;
输入或输出字符串时,输入值在尺寸界限之内,超出尺寸界限和空的字符串;
输入,输出的数字的值在数值大小的界限之内,超出数值大小的界限之外;
输入的文件存在或者不存在,可读或者不可读,正确或者不正确;
输出的文件存在或者不存在,可写不可写;
合并的输入值是否保持一致,合并的输入值是否保持不一致.
/**************************************************************/ to xiaoye_china:+u+u
再翻译第二段
但是总觉得自己翻译的不是很顺,请指点:/************************************************/
等价类划分的例子:
构成图表的线段可以是给出的标准线段分量,也可以是八种备选线段分量 ,
输入的数据是作为在菜单选项中变换线段分量的.等价类可以是:
当前的线段是标准线段分量状态时,选择标准线段分量
当前的线段是一种备选线段分量状态时,选择标准线段分量
当前的线段是标准线段分量状态时,选择一种备选线段分量
当前的线段是一种备选分量状态时,选择另一种备选线段分量
再来第三段的翻译:)献丑了!
/***********************************************/黑盒测试用例的选择: 边界值分析法
因为穷举测试是不可能的,所以黑盒测试用例的选择时应该注重最大可能的发现尽可能多的错误.
经验显示:边界值或者接近于等价类边界值在发现错误方面是很相象的.
在等价类边界值或者接近等价类边界值时用边界值分析法来选择测试用例.
注释:
等价类的例子:
最大负值,最大正值,0 的输入和输出
限定的范围内的字符串,超过限定一个字符大小的字符串,空字符串,和一个字节的字符串,
在限定大小范围之内输入的数值和超过限定的一个大小范围内输入的数值
空的文件和只有一个字符的文件
边界值分析的例子:
当前线段是一种备选分量时,怎样考虑为图表选择等价类的标准线段分量
边界值分析建议使用下面的测试用例:
线段被选择为标准线段的状态时当前的线段是最浅的线段分量
线段被选择为标准线段的状态时当前的线段是最深的线段分量
/******************************************************/
觉得这个翻译出来不太通顺,所以希望大家能够帮忙看一下,请指出需要改进的地方,谢谢.
页:
[1]