想要做好测试有没有捷径

来源:互联网 发布:找兼职 知乎 编辑:程序博客网 时间:2024/05/02 04:34

  许多公司都在尝试建立一种工作流程,这种工作流程能使得测试人员即使在匆忙之中仍知道如何开始、进行并结束测试工作,这种现象在中小型企业中尤为常见。
  项目经理和测试经理尝尝迫使测试团队尽快完成任务,在这种压力下, 有的人采用系统化的方法来执行测试工作但无法完成任务;有的人想利用捷径快速执行测试工作但质量没有保障。因此,这成为了工作中的一道难题。
  本文将从实际出发出一些具体的解决方案。

快捷的测试但并非有效的测试:

  任何人都想走捷径,但理智告诉我们想成要大事无捷径可走。
  虽然我并不反对以上观点,但我相信有一条“捷径”能让我们做到又快又好地完成测试,详见下文。
  比如,你被指派去测试一个网页应用或网站。从你通过了测试人员的面试起,你就有了许多的理论知识, 现在暂且先忘记这些知识或将它们抛到脑后, 开始准备享受测试。
  不要为太多的文档材料而烦恼,你只要:

  1. 准备好测试工具
  2. 准备好和开发人员交流

  例如:你在测试一个表单,里面包含一个电话号码输入框。
  花两分钟的时间好好考量这个输入框,然后问问自己:

  • 这个输入框在这里的用意是什么?
  • 要把谁的电话号码写在这个输入框里?
  • 谁会给这号码打电话?为什么?

  为了回答这些问题,你先要准备一些测试用的输入数据。
  如果对于第一个问题的答案是这样的: 每个符合法律规定的公司都会有他们自己的网站,那么再好好考虑下, 你要明白这说明了网站上可能需要一个电话号码输入框来对预期的服务做出回应。
  假设这是一个来自美国的潜在客户的电话号码,那么你要知道,在美国有效的电话号码形式是什么样的。上网搜索, 最好是到一个正规的网站,在那里你能找到美国有效电话号码的例子。注意,许多亚洲的开发人员仍以为电话号码完全是由数字组成的,但事实不是这样。
  在美国, 1-800-OFFICEDEPOT 也是一个有效的电话号码。是的,美国人在电话号码栏中可以输入字母。 总之,你要为了不同区域的目标客户准备好各种输入数据来测试这个电话号码栏。
  看到这里,快将这些测试数据写进你的测试工具里。
  现在,与其他输入框相比较, 我们从另一个角度来看待这个输入框。
  在填充表单时,你先选择了一个国家,比如印度,接着,如果电话号码自动填充了“ 91”,那么这对用户来说就是一个惊喜! 要感谢开发人员设计了这么一个有用的小细节,你也将会与开发人员保持良好的关系并从中受益。但是请注意, 在团队里你是产品质量的把关者,即使是 CEO 也得重视你, 因此你表面上是个挑刺者,实际是对产品起到推动作用。
  现在,从实际使用的观点出发,如果这家公司对他们的业务采取积极的态度的话,他们一定会想要获取咨询者的联系方式,而在你测试过程中如果发现没能获取到联系方式的话就该问问项管为什么不行。项管可能会回答说那家公司没有提及相关的信息,但为了保险起见,你该反问“ 我们问过他了吗? ”。 渐渐地,你将不会仅仅是喜欢,而是深深迷上了测试这个工作。 甚至你可能会慢慢超越团队里的其他成员,这样一来就没有人会轻视你了。
  到目前为止,你都在笔记上记录了什么?从理论上来说,你要为一切的测试工作准备“测试用例”,但照着测试用例或是别的什么进行测试其实都是没有意义的。与开发人员进行交流,修复 bug,并在新发布的版本中检验 bug, 这才是你该做的。
  总的来说,你可以走以下几条捷径:

  1. 无需测试计划文档,更多的要靠常识积累
  2. 无需测试方法文档,更多的要靠思维方式
  3. 无需大量的测试用例, 更多的要靠付诸行动
  4. 无需大量的测试报告文档,更多的要靠与开发人员的交流

  在测试过程中要热忱地实现以上几点批注不正确(原来翻译的意思是正确的),并从软件元素的角度来思考你所要测的东西。
  你是否稍微有了点热情呢?接着要和开发人员确认,他们是如何对数据进行“增”和“查”操作的。从设备的角度来看,界面要美观,能够正确地显示电话号码,比如数字“ 0”看起来不会像字母“ O”,“ Y”看起来不会像“ V”,“ 8”看起来不会像“ 3”,字母“ g”不会只显示部分等等。
  到这里还没有结束,你要将这些思维过程应用到整个测试工作中。
  现在,把你的理论知识投入到实践中去。 输入一些数据来验证数据边界的性能如何,这被称作“边界值测试”。 在所有目标客户区域的电话号码类型中,选择最大长度的电话号码来准备右侧的极限数值。在测试左侧的极限数值时,只需输入空格或空值看看结果会怎样即可。 如果可以选择的话,应该要限制不能输入空格和空值,这样就不会干扰你输入数据。
  接下来要为负面测试做一些数据准备, 由此来检验开发人员是否训练有素(反向测试同样也适用与当今的资源管理)。首先检验开发人员有没有设置好光标,比如一个输入框输入完毕后按下回车键,光标是否会自动跳到下一个输入框,这称为可用性测试。
  最后,也是最重要的一点, 从监听的角度来看,这些输入框是开放的,若有人想要干扰你,他们可能会注入脚本来破坏你的产品或者来获取对他们来说有价值的东西。
  因此,需要测试工作来保证产品是安全的。在输入框中输入一些没用的内容,比如逗号,单引号,双引号, HTML 脚本, 或“ NULL” 看看结果如何。以上几种输入都该要提示是无效输入, 这就是安全测试。虽然安全测试才处于起步阶段,但这条“捷径”也能够给你的测试结果带来一定的帮助。

结论:

  所以,要做好测试需要的是你高度的热情,深入软件和开发人员交流以及深度的思考。从错综复杂的用例中找到其中的逻辑,这样你就能进行思考,享受找 bug 的乐趣。 在完成这个“走了捷径”但能够“保证质量”的测试之前,不要考虑太多流程和文档的问题。

关于作者:这是由 Dipankar Goswami 所写的一篇特约文稿,他是数学专业的研究生,在一家软件开发公司担任项目经理一职。他亲自进行测试工作,用最实用的方法来指导测试团队。这篇文章是他执行输入框测试的简单介绍。

原文如下:

  In many companies, especially small and medium, where there is a strive to establish any work process, it has been observed that testers are a little puzzled about how to start, progress and finish their testing job in a hurried manner.
  The project or test manager always pressurize test team to complete testing as soon as possible. With this pressure, somebody starts with a great methodical way but cannot complete the testing; somebody tries to be fast by short-cutting it, but cannot achieve quality. So, there is a problem in daily practice.
  This article will give you some concrete path to such situations in a practical way.

Shortcut Testing but Quality Testing:

  Everybody wants a shortcut, but wise says there is no shortcut to do good things.
  Whereas I do not refute the above, but believe there is ‘shortcut’ to do testing and yet good testing can be done. Here it is how.
  Let say, you are assigned to test a Web based application or a website. Since you have cracked the interview of a tester, you have all theoretical knowledge. Forget those or keep those at the back of your mind for the time being. Now be ready toenjoy testing.
  Do not bother to do too many documentation, just keep your

  1. Workpad ready
  2. Be ready to interact with the developers

  Example: Now say, you are testing a form, where there is a Phone Number field.
  Think on this field for 2 minutes and ask these questions to yourself:

  • What is the perspective of this field being here?
  • Whose phone number is this going to be?
  • Who will make calls to this number and why?

  The answer to these questions will lead you to prepare Test input data.
  So, if the answer to the first question is a legal firm required to have their web presence, then you should understand that, and think for a second, it will reveal that this is perhaps required for making response to prospective service requests to the legal firm.
  If this phone number is of a prospective client from USA, then you should know what the valid Phone number types in USA are. Search in the internet; preferably go to an authentic website, where valid US numbers are exampled. Mind that, many developers of Asia still assumes the Phone number is a perfect numeric type, which is not.
  In USA, 1-800-OFFICEDEPOT is a valid phone number, and yes, they enter Alphabets in the Phone field. So, in short, depending on the target client’s geographic region, you should cater to prepare all your various input data to test the phone number field.
  Just write down the test data in your Workpad.
  Now, think from a perspective of the essence of one field with respect to other field (s).
  While filling the form, if you have selected the country field as India, then if the Phone field is automatically populated with ‘91’ then it is a WAH! Thank the developer for this tiny cute usability thought, and you gain by getting a good relationship with the developer. But mind that, you are a contributor to the quality gate in your organization, so no one get passed you, not even the CEO, so you have to be a friend in disguise.
  Now, from a practical usage point of view, if the Legal firm is aggressive on their business, they must capture an alternate phone number of inquirer. Ask the project manager (PM) why it is not captured (if it is not). The PM will probably answer; the firm did not mention anything about it. You can counter, to be on the safe side, did we ask the firm? So, gradually, you are not only enjoying testing but also getting involved deeply and perhaps taking upper hand over other members, so no one can fool you around.
  So, by now what is the scribble there in your notepad? In theoretical terms, everything needed to prepare your ‘Test Cases’. It hardly makes any sense if you call it Test Case or anything else, you go and test it. Discuss the results with the developers, get it fixed, re-test in the revised version, and you should be done.
  In summary, you applied the following shortcuts:

  1. No Test Plan document, it is your common sense, which worked.
  2. No Testing approach document, it is your thought on the perspective which worked.
  3. No big Test Case excel, it is your Workpad which worked
  4. No big test report document, it is your discussion with developer which worked

  And you achieved all these at the cost of your enthusiasm in testing, and thinking behind the perspective of the software element which you are going to test.
  Are you a little more enthusiastic? Then check with the developers how data is stored and how they are retrieving it. Think from the device perspective, if the UI is fine enough, to display the Phone number correctly and soothingly. The zero does not look like ‘O’, the ‘Y’ does not look like ‘V’, the ‘8’ does not look like ‘3’, the ‘g’ is not cut etc. etc..
  That is not the end of it; you will need to apply this thinking process to the whole testing affair.
  Now, bring your theoretical knowledge into the forefront. Do some testing with some input to check how well are the boundaries protected, the so called‘boundary-value testing’. Prepare right side extreme values by thinking on the highest length of Phone number of all possible types of target region valid phones. Test the left side extreme, just put the blank or a space and see what happens. It should not take blank or space if it is mandatory, if it is optional, it should allow you to proceed without disturbing.
  Now, make some inputs ready for negative testing, to check if the developer was a trainee developer (which is definitely a possibility in today’s resource management). Now check whether the developer has forgotten to make the cursor control perfect, which means, if an entry is over in a field the cursor must automatically go to the next field, the so called ‘usability’ testing.
  Now, last but not the least, you have to think from a sniffer’s view, these fields are open, so there are people who wants to distort you, they will inject scripts which will either break your software or will retrieve useful information from your application.
  So, test if it is adequately protected. Put some junk into the field, put commas, inverted commas, single and double, copy and paste some HTML script, put the word ‘NULL’ that is a famous system word see what happens. All should come out with invalid entry –this is so called ‘Security Testing’ even though at beginner’s level, this shortcut adds value to your testing results.

Conclusion:

  So, what is needed for quality testing is your highest enthusiasm, deep involvement with software and developer, and deep perspective thinking. Find out the most logical issues in number of various twisting cases you can think of and enjoy finding bugs, do not bother too much on process and documentation before this ‘Shortcut’ Testing, but ‘Quality Testing’.
  About the author: This is a guest post by DipankarGoswami. He is a post graduate in Mathematics, worked as a Project manager in software development companies, dealing with Testing on his own hand, and has lead testing teams in a most practical way. This article is a glimpse of his execution from the field.

0 0