軟件測試并不僅僅是按照測試用例(testcase)進行測試
軟件測試并不僅僅是按照testcase測試有一種普遍存在的看法是 軟件測試 只是一個沒有什么技術含量的工作,任何人只要能讀懂testcase就能做軟件測試;蚨嗷蛏俚,在我工作過的每一個公司都有人這樣的觀點,特別是規模小的公司更甚。
當然,這是一種完全錯誤的觀點。
如果我們把軟件看做是一個圓球,那么軟件測試的目標就是盡可能的覆蓋最多的球體表面。。
所有的testcase的集合可以看做是一張試圖包住整個球體的網,而一個testcase就是網上的一個節點?梢妼τ谶@張網來說,最重要的不是它的節點的數量而是節點的布局。testcase應該覆蓋整個球體表面,但也不應該有太多的節點堆積在某一個區域。
一個良好設計的testcase集合需要對軟件的深刻理解,很高的抽象能力,還要在覆蓋率和可執行性之間保持平衡。對這些能力的要求,相比于其他的設計工作,比如軟件設計,并無二致。
如果說testcase本身只是一個節點,它并不能覆蓋更多的區域,那么一個測試人員實際的測試行為就像一塊在圍繞在點周圍的布,才能填補網格中空白部分。有多大區域能被測試行為所覆蓋,這是一個衡量測試人員能力的關鍵要素。
好的測試人員在測試的時候所做工作遠遠超過testcase本身。實際上,這也是對測試人員的一個基本要求。測試人員應該通過各種方式擴展testcase,比如改變參數,調整前置條件,從多個角度來觀察系統行為,使用不同的方法等等來盡力覆蓋更多的內容。
研究顯示,在一個項目中,超過3/4的bug并不能僅僅根據testcase的descrīption得來。那也就是說,一個好的測試人員相對于一個僅僅根據testcase來測試的測試人員,其發現的bug數可以是后者的4倍之多。
所以軟件測試的工作也許看起來簡單和直接,但事實是,實際的工作遠遠超過testcase本身。
以下是本文的英文版。(following is the English edition)
=========================================================
Some people think that software testing is a low skill job, and that just any one can be a tester. This is definitely not true. Allow me to explain why.
If we represent the software being tested as a ball, then the aim of the software testing is to cover as much of the space of the ball as possible.
Test cases act together as a net, attempting to cover the ball. Test cases act individually as a node in that net. So the most important aspect of a test case is not its amount, but its structure. The test case should cover the entire surface of the ball, but without too many nodes in any one place.
A well designed test case requires a deep understanding to the software, high ability of abstraction, and skills to balance between the coverage and testability. The requirements are not that different from other forms of design work.
To continue the previous analogy, the actual test behavīor is like a piece of cloth wrapped around the node; there to fill spare space left by nodes. How much space your real test behavīor can cover is one key standard to measure the capability of a tester.
Good testers test far more than the test case descrīption. In fact, it’s an essential requirement. They will extend the test case descrīption by changing parameters, adjusting preconditions, and using many different means in order to try to wrap more space around a single test case.
One investigation showed that over 3/4 of all bugs found, are not directly related to test case descrīptions. That is to say, the number of bugs a good tester can find can be 4 times as many as that of a tester who simply follows the test case descrīption.
So the job of software testing may seem simple and straightforward enough, but the truth is, the actual effort expended is much greater than just a simple test case.
(Thanks to Kyle for fixing errors of the original version)
文章來源于領測軟件測試網 http://www.kjueaiud.com/