工作中的测试员
发表于:2009-01-20来源:作者:点击数:
标签:
工作中的测试员 When testing, you must decide how to exercise the program, then do it. The doing is ever so much more interesting than the deciding. A tester\'s itch to start breaking the program is as strong as a programmer\'s itch to star
工作中的测试员
When testing, you must decide how to exercise the program, then do it. The doing is ever so much more interesting than the deciding. A tester\'s itch to start breaking the program is as strong as a programmer\'s itch to start writing code - and it has the same effect: design work is skimped, and quality suffers. Paying more attention to running tests than to designing them is a classic mistake. A tester who is not systematic, who does not spend time laying out the possibilities in advance, will overlook special cases. They may be the same subtle ones that the programmers overlooked.
在测试的时候,必须决定如何执行程序,然后完成它们。完成它们比决定它们要有趣的多。测试员渴望的是开始破坏程序,
程序员渴望的是开始写代码——这导致相同结果:设计工作被忽略了,产品
质量受到损害。将更多的注意力集中于运行测试而不是设计它们是一个典型错误。
Concentration on execution also results in unreviewed test designs. Just like programmers, testers can benefit from a second pair of eyes. Reviews of test designs needn\'t be as elaborate as product design reviews, but a short check of the testing approach and the resulting tests can find signific
ant omissions at low cost.
集中于执行测试也导致未经审核的
测试设计。就像程序员一样,测试员也得益于第二双眼睛的检查。测试设计的审核不必像产品审核那样严格,但是对
测试方法和结果测试的快速检查可以低成本地找到重要的疏忽。
What is a test design?
什么是测试设计? A test design should contain a description of the setup (including machine configuration for a configuration test), inputs given to the product, and a description of expected results. One common mistake is being too specific about test inputs and procedures.
测试设计应当包含设置描述(包括配置测试的机器配置),对产品的输入和预期结果的描述。一个常见错误是对测试输入和过程过于注重细节。
Let\'s assume manual test implementation for the moment. A related argument for automated tests will be discussed in the next section. Suppose you\'re testing a banking application. Here are two possible test designs:
让我们先假设一个
手工测试实施。相关的
自动化测试将在下一节讨论。假设你在测试
银行应用程序。这里有两个可能的测试设计:
Design 1
设计1 Setup: initialize the balance in a
clearcase/" target="_blank" >ccount 12 with $100.
设置:将帐户12的余额初始化为$100。
Procedure:
过程:
Start the program.
Type 12 in the Account window.
Press OK.[Page]
Click on the \'Withdraw\' toolbar button.
In the withdraw popup dialog, click on the \'all\' button.
Press OK.
Expect to see a confirmation popup that says \"You are about to withdraw all the money from this account. Continue?\"
Press OK.
Expect to see a 0 balance in the account window.
Separately query the database to check that the zero balance has been posted.
Exit the program with File->Exit.
启动程序。
在帐户窗口中输入12。
按“确定”按钮。
点击“取款”工具条按钮。
在弹出的取款对话框中,点击“所有”按钮。
按“确定”按钮。
预期会看到一个确认消息:“您将从此帐户中取出所有的钱,是否继续?”
按“确定”按钮。
在帐户窗口中预期会看到余额为0。
单独查询
数据库,检查余额为0。
通过“文件->退出” 退出程序。
Design 2
设计2
Setup: initialize the balance with a positive value.
设置:将帐户余额初始化为一个正值。
Procedure:
过程:
Start the program on that account.
Withdraw all the money from the account using the \'all\' button.
It\'s an error if the transaction happens without a confirmation popup.
Immediately thereafter:
- Expect a $0 balance to be displayed.
- Independently query the database to check that the zero balance has been posted.
启动该帐户的程序。
用“所有”按钮从帐户中取出所有的钱。
如果在事务发生时没有弹出确认消息,则是一个错误。
其后立即:
- 预期余额会显示$0。
- 单独查询数据库,检查余额为0。 The first design style has these advantages:
第一种设计风格有以下优点:
· The test will always be run the same way. You are more likely to be able to reproduce the bug. So will the programmer.
· 测试总是以相同方式运行。重现错误的可能性更大。程序员也一样。
原文转自:http://www.ltesting.net