Here is a checklist for having well-documented,effective and usefultestcases:
以下是一个如何设计文档化、高效、有用测试用例的检查表(checklist)
0vPH0l d.\Y191325
7A3~{ [3o\*c191325Quality 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.
· 自我清理性:单个用例不会影响整个测试环境,即用例执行完了可以恢复原有的测 试环境。
51Testing软件测试网 l~dWPOI
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
· 用例之间的先后顺序是否跟业务流程一致,即用例在业务流程中的彼此顺序关系是否合理。
exE0~c o.V(YIV191325Configuration 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
· 离线归档。