从8个方面写好测试用例

TestAndTry.com的文章《8 Tips To Create Complete Test Cases》描述了如何写好测试用例,值得参考和借鉴:

 

How to ensure the quality of the test cases are created? How to manage their life cycle? How to deliver them quickly and when developers need it ?

 

1. Template – need one and complete template for creating test cases. We can create it in a text editor, spreadsheet or buy or customize the tool. I have written about this in the context of the JIRA.

(使用测试用例模板)

 

2. Descriptive and specific – you need a short, concise title and description. Should clearly define the purpose and scope of their operations. We are writing to all testers, not only for yourself, use simple language, complicated language figures are not popular here. Use rather imperative, therefore “Write abc and press enter” not “I am writing abc, and pressing Enter.”

(测试用例描述要简明扼要、清晰明确)

 

3. Reusable – one and the same test case can be used in many scenarios. Let us remember that! Creating a new item, we must imagine a different kind of use case of our work. I also imagine that test step could be reused, so pay your attention at this level too.

(考虑测试用例的可重用性)

 

4. Atomic – the greatest tester nightmare struggled with the manual testing is a test case, which is too long and doing too much dependency checks. Person carrying out a process must have a sense of progress, otherwise is bored, reducing its vigilance, and motivation. Tester may have to perform 100 test cases and do them in one day, but it can also have their 10 and do it for a week. Let us create test case, which can be performed up to several minutes, and gain the favor of the other fellow testers, among the satisfied, we can also include those who write automation scripts.

(保持测试用例的“原子性”)

 

5. Positive and negative – the next important thing is the order of creation. What to do when the project manager requests a set of test cases on the day following approval of an implementation plan? Usually we do not say that he wanted only the beginning of positive tests, those which check whether the functionality exists and acts in accordance with the requirement. Give him as  such set as soon as possible, then we can deal with the preparation of a negative description situation and the relationship between other requirements. To sum up: Positive -> Negative -> Relationships

(先写“正面”的测试用例,再写“负面”的以及其它类型的测试用例)

 

6. Refactor – if you already done your job we have to remember that applications are changing and the changes in the test cases should follow this process. We can version it, using clone and change method for a given version number. Head of the tests should determine how many past versions we support and we should care enough about our current collection of test cases.

(测试用例也需要“重构”)

 

7. Test data – there are moments in which along the correct execution of the test we have to provide some data, which usually (if they are too complex to be described in the text) are attached as binary files. We need to analyze whether it is easier to provide test data or may be easier to add the appropriate test steps.

(考虑在测试步骤中还是在附件中提供测试数据)

 

8. Setup and tear down – if the test case requires the initial configuration, call a particular component, we need to take this into account in the zero step. It is also important to cleanup in the last step like in unit testing or automation, but I believe that during the test manual is worth to preserve this good practice.

(测试用例执行前的初始化和执行后的“扫尾”)

 

 

本文来自优快云博客,转载请标明出处:http://blog.youkuaiyun.com/Testing_is_believing/archive/2010/03/07/5354658.aspx

在软件开发中,测试用例是用来验证软件功能是否按照预期工作的一组输入、执行步骤和预期输出的描述。涉及测试用例时,可以从以下几个方面进行考虑: 1. 正常情况测试测试用例应该包括对软件功能的正常操作进行验证,确保其按照预期工作。这些测试用例应该覆盖各种典型的输入和操作路径。 2. 边界情况测试:边界情况测试是指对软件功能的边界条件进行验证,例如最小值、最大值、空值等。这些测试用例可以帮助发现潜在的错误或异常情况。 3. 异常情况测试:异常情况测试是指对软件功能的异常处理能力进行验证,例如输入非法字符、输入超出范围等。这些测试用例可以确保软件在面对异常情况时能够正确地处理并给出适当的提示或错误信息。 4. 性能测试:性能测试是指对软件在不同负载条件下的性能进行验证,例如并发用户数、响应时间等。这些测试用例可以帮助评估软件的性能瓶颈,并找出可能的优化点。 5. 兼容性测试:兼容性测试是指对软件在不同操作系统、浏览器或设备上的兼容性进行验证。这些测试用例可以确保软件在不同环境下都能够正常运行。 6. 安全性测试:安全性测试是指对软件的安全性进行验证,例如对输入进行注入攻击、密码破解等。这些测试用例可以帮助发现潜在的安全漏洞,并提供相应的修复措施。 7. 可靠性测试:可靠性测试是指对软件的稳定性和可靠性进行验证,例如长时间运行、异常情况下的恢复等。这些测试用例可以确保软件在各种情况下都能够保持稳定和可靠。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值