Choosing Test Data-测试数据的选择
Choosing Test Data测试数据的选择
In system testing, test data should cover the possible values of each parameter based on the the requirements. Since testing every value is impractical, a few values should be chosen from each equivalence class. An equivalence class is a set of values that should all be treated the same.
在系统测试中,测试数据应该根据需求覆盖每一个参数的可能的取值。既然要测遍每一个值是不可能的,那么应该在每个定价类中选取几个值.一个定价类就是一个被认为是类似值的集合.
Ideally, test cases that check error conditions are written separately from the functional test cases and should have steps to verify the error messages and logs. Realistically, if error test cases are not yet written, it is OK for testers to check for error conditions when performing normal functional test cases. It should be clear which test data, if any, is expected to trigger errors.
理想情况下,检测错误条件的测试用例应该与功能测试用粒分开来写,并且应该有校验错误信息和日志的步骤。实际上,如果错误测试用例还没有写出来,测试人员可以用执行功能测试用例来检测错误条件。如果可能,应该清楚那些测试数据能构触发错误.
Example equivalence classes:
等价类的例子:
Strings
字符串
empty string
空字符串
String consisting solely of white space
只包含一个空格的字符串
String with leading or trailing white space
一字符串开头或/和结尾的字符串
syntactically legal: short and long values
语法上合法:短和长值
syntactically legal: semantically legal and illegal values
语法上合法:合法的语义和不合法的值
syntactically illegal value: illegal characters or combinations
语法上不合法的值:非法字符或者组合
Make sure to test special characters such as #, ", ', &, and <
确定测试特殊字符,例如#, ", ', &, 和 <
Make sure to test "Foreign" characters typed on international keyboards
确定测试可以从国际化键盘上输入的"外文"字符
Numbers
数字
empty string, if possible
如果可能的话,是以下空的字符串
0
数字0
in range positive, small and large
在范围内的正数,小数(靠近零的数字)和大数
in range negative, small and large
在范围内的负数,小数(靠近零的数字)和大数(绝对值)
out of range positive
超出范围的正数
out of range negative
超出范围的负数
with leading zeros
零开头的数字
syntactically invalid (e.g., includes letters)
语法上不合法的输入,例如含有字母
Identifiers
标识符
empty string
空字符串
syntactically legal value
语法上合法的值
syntactically legal: reference to existing ID, invalid reference
语法上合法的值: 重复索引,非法索引
syntactically illegal value
语法上非法的值
Radio buttons
Radio 选项
one item checked
选中一项
nothing checked, if possible
如果可能,一项也不选
Checkboxes
Checkbox选项
checked
选中项
unchecked
未选项
Drop down menus
下拉菜单
select each item in turn
按顺序选择每一项
Scrolling Lists
滚动菜单列表
select no item, if possible
如果可能,一项也不选
select each item in turn
按顺序选择每一项
select combinations of items, if possible
如果可能,选择多项
select all items, if possible
如果可能,选择所有项目
File upload
文件上传
blank
空白
0 byte file
0字节文件
long file
大文件
short file name
短文件名
long file name
长文件名
syntactically illegal file name, if possible (e.g., "File With Spaces.tar.gz")
如果可能,语法上非法的文件名,例如:"File With Spaces.tar.gz" (带空格)
新手-请多关照!
加精鼓励!!! 支持一下!不容易啊!呵呵! 哇~中英文对照~
不错啊~
页:
[1]