好的测试用例13个特征(转)

PS:自认为最重要的特征是High Coverage,Accuracy,Efficiency(Write&Execute&Report):有利于测试 和  case管理

From http://www.51testing.com/?uid-256086-action-viewspace-itemid-132727

好的测试用例13个特征,欢迎指正探讨
1、覆盖率
2、规范性
3、可测试性:粒度划分
4、复用率: 对于一个有大多数测试用例的产品,不管测试人员对产品是否熟悉,其主要任务就是阅读,检查需求及其变更,然后对原有case进行理解、扩充和修改
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
   离线归档。

测试用例不仅是测试的依据,也是新人学习产品的最佳资料。

原文地址:https://www.cnblogs.com/limei/p/3248756.html