51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3679|回复: 7
打印 上一主题 下一主题

What are the test case writing techs?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2005-11-29 11:10:51 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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.
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2005-11-29 11:13:39 | 只看该作者

Equivalence Partitioning Example

Equivalence Partitioning Example

A 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
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2005-11-29 11:14:03 | 只看该作者
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
回复 支持 反对

使用道具 举报

该用户从未签到

4#
发表于 2005-12-9 17:59:36 | 只看该作者
I am very glad to know about those messages.
even though have owner so many knowledges,i give you a  advice. : )
could you tell me about foreign forum ?  thank you very much !!!!!!!!!
回复 支持 反对

使用道具 举报

  • TA的每日心情
    开心
    2018-1-19 10:19
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    5#
    发表于 2005-12-15 19:22:24 | 只看该作者
    先翻译第一段吧.如有翻译不当之处请指出!谢谢.
    /********************************************/
    编写测试用例的技巧是什么?
    编写测试用例的技巧是什么(边界值分析和等价类划分)?

    黑盒测试用例的选择: 等价类划分

    因为穷举测试是不可能的.所以在可能的情况下黑盒测试用例被设计成能够找到不同缺陷.

    我们通常会假定相似的输入值会引起相似的反映,那么就让我们把这些相似的输入值归到一个等价类里.

    在一个等价类里,仅用一个或很少的测试用例来表现整个等价类.

    等价类

    基于以下条件将输入的不同数据分成不同的等价类:
    有效的和无效的输入数据
    有效的和无效的输出数据
    输入数据相似和差异
    输出数据相似和差异
    期望处理过程的相似和差异

    注释:
    等价类的例子:
    负值,正值,0输入和输出;
    输入或输出字符串时,输入值在尺寸界限之内,超出尺寸界限和空的字符串;
    输入,输出的数字的值在数值大小的界限之内,超出数值大小的界限之外;
    输入的文件存在或者不存在,可读或者不可读,正确或者不正确;
    输出的文件存在或者不存在,可写不可写;
    合并的输入值是否保持一致,合并的输入值是否保持不一致.
    /**************************************************************/
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
     楼主| 发表于 2005-12-19 13:45:31 | 只看该作者
    to xiaoye_china:+u+u
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-1-19 10:19
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    7#
    发表于 2005-12-22 16:20:49 | 只看该作者

    再翻译第二段

    但是总觉得自己翻译的不是很顺,请指点:
    /************************************************/
    等价类划分的例子:

    构成图表的线段可以是给出的标准线段分量,也可以是八种备选线段分量 ,
    输入的数据是作为在菜单选项中变换线段分量的.等价类可以是:

         当前的线段是标准线段分量状态时,选择标准线段分量
         当前的线段是一种备选线段分量状态时,选择标准线段分量
         当前的线段是标准线段分量状态时,选择一种备选线段分量
         当前的线段是一种备选分量状态时,选择另一种备选线段分量
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-1-19 10:19
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    8#
    发表于 2005-12-22 17:16:26 | 只看该作者

    再来第三段的翻译:)献丑了!

    /***********************************************/
    黑盒测试用例的选择: 边界值分析法
    因为穷举测试是不可能的,所以黑盒测试用例的选择时应该注重最大可能的发现尽可能多的错误.
    经验显示:边界值或者接近于等价类边界值在发现错误方面是很相象的.
    在等价类边界值或者接近等价类边界值时用边界值分析法来选择测试用例.

    注释:
    等价类的例子:
    最大负值,最大正值,0 的输入和输出
    限定的范围内的字符串,超过限定一个字符大小的字符串,空字符串,和一个字节的字符串,
    在限定大小范围之内输入的数值和超过限定的一个大小范围内输入的数值
    空的文件和只有一个字符的文件

    边界值分析的例子:

    当前线段是一种备选分量时,怎样考虑为图表选择等价类的标准线段分量

    边界值分析建议使用下面的测试用例:
    线段被选择为标准线段的状态时当前的线段是最浅的线段分量
    线段被选择为标准线段的状态时当前的线段是最深的线段分量
    /******************************************************/
    觉得这个翻译出来不太通顺,所以希望大家能够帮忙看一下,请指出需要改进的地方,谢谢.
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-9-24 01:18 , Processed in 0.087479 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表