简单+勤奋,把测试当做一番事业去奋斗!

好的测试用例13个特征

上一篇 / 下一篇  2009-06-22 21:07:25 / 个人分类:测试技术

查看( 8094 ) / 评论( 4 )
上周培训的时候总结了好的测试用例13个特征,欢迎指正探讨
1、覆盖率
2、规范性
3、可测试性
4、复用率
5、稳定性
6、有效性
7、准确
8、指导性
9、高效性
10、完整
11、简洁
12、一致性
13、清晰明了
在网上还找到一个checklist,附在下面供参考:

Here is a checklist for having well-documented,effective and useful test cases:
以下是一个如何设计文档化、高效、有用测试用例的检查表(checklist
Quality Attributes
质量属性
 Accurate: tests what the descrīption says it will test.
正确性:确保测试标题描述部分的内容正确性。
Economical: has only the steps needed for its purpose.
经济性:只为确定需要的目的设计相应的测试步骤。
Repeatable, self standing: same results no matter who tests it.
可重复性:自我一致性,即不管谁执行此用例,结果一样。
Appropriate: for both immediate and future testers.
适应性:既能适应短期需要,又能考虑长远需要。
Traceable: to a requirement.
可追踪性:用例能追踪到一个具体的需求。
 Self cleaning: returns the test environment to clean state.
自我清理性:单个用例不会影响整个测试环境,即用例执行完了可以恢复原有的测                                                       试环境。
Structure and testability
结构化和可测试性
 Has a name and number
含有规范的测试标题和编号。
Has a stated purpose that includes what requirement is being tested
 含有一个确定的测试某一个特定需求的目的。
 Has a descrīption of the method of testing
 含有关于测试方法的描述。
Specifies setup information - environment, data, prerequisite tests, security access
 指定条件信息-环境、数据、预置的条件测试、安全入口等。
 Has actions and expected results
含有操作步骤和预期结果。
States if any proofs, such as reports or screen grabs, need to be saved
 陈述任何辅助证据,例如截图报告并确保这些东西妥善保存。
 Leaves the testing environment clean
 确保测试环境的干净(即用例不会影响整个环境)。
 Uses active case language
描述时使用主动语气结构。
Does not exceed 15 steps
操作步骤不要超过15步。
Matrix does not take longer than 20 minutes to test
 确保单个用例测试执行时用时不超过20分钟。
Automated scrīpt is commented with purpose, inputs, expected results
 自动化脚本用例添加必要的注释,比如目的、输入和期望结果。
 Setup offers alternative to prerequisite tests, if possible
如果可能,建议提供可选择性的预置条件测试。
 Is in correct business scenario order with other tests
用例之间的先后顺序是否跟业务流程一致,即用例在业务流程中的彼此顺序关系是否合理。
Configuration management
配置管理
 Employs naming and numbering conventions
 采用命名和编号规范归档。
Saved in specified formats, file types
保存为特定的格式,文件类型。
 Is versioned to match software under test
 用例版本是否与当前被测试软件版本一致(对应)。
 Includes test objects needed by the case, such as databases
 包含用例需要的相应测试对象,如特定数据库
 Stored as read
 存档阅读。
 Stored with controlled access
存档时按角色控制访问方式
Stored where network backup operates
当网络备份时存档。
Archived off-site
   离线归档。


TAG:

davy_chen发布于2009-06-23 10:33:31
说的还是挺好的,不过测试设计要比测试用例重要的多。
bubill的个人空间 bubill 发布于2009-07-25 11:21:58
优先级,层次分明
chd的个人空间 chd 发布于2009-07-25 23:08:08
学习,学习,谢谢啦!!
dabeixiong的个人空间 dabeixiong 发布于2009-07-26 13:19:23
好么,这一堆"性"

要我说就两性,当然不是男性和女性了-。-! 具体性如下:

规范性:
每个公司都有自己的规范,符合你那公司规范标准就行,这样一公司的人都能看懂,好干事儿

艺术性:
不同的项目信息、设计方法、环境条件用例粒度等等许多因素都跟用例息息相关,如何使用例包含必要的信息又很简洁,那就要看测试人员的经验和功力了。你的用例是缺少一些环境条件让执行用例的人得不到预期结果变得很迷惑(没准误报个bug-.-!),还是你的用例很繁琐让执行用例的人跑了俩小时打瞌睡,或是干脆让非专业人士看不懂,那都要看这个性了。

[ 本帖最后由 dabeixiong 于 2009-7-26 13:36 编辑 ]
我来说两句

(可选)

Open Toolbar