官术网_书友最值得收藏!

什么是軟件測試

要點

多年來,許多專家已提出各種不同的關于軟件測試(Software Testing)的定義,其中一些關于測試的共同定義包括:

“……以尋找錯誤為目的的執行程序的過程。”

——邁爾斯G. J. 軟件測試的藝術,Wiley出版社,1979年

“軟件測試是一個以尋找錯誤為目的的分析和操作軟件的過程。”

——克里斯·布朗,格雷·柯布,羅伯特·卡伯特森,軟件測試快速入門,2001年

該領域的很多專家似乎都在倡導測試的主要目的是找到缺陷,而且盡可能在軟件開發生命周期的早期發現這些缺陷。但是,上面這些被過分簡單化的對軟件測試的解釋卻存在著兩個基本問題。

(1)盡可能多地去發現缺陷會使測試成為一種數字游戲。難道找到一大堆漏洞就意味著測試人員的工作做得很好?難道尋找到的缺陷越多就越能提高軟件質量?這種測試行為是“有質量的測試”嗎?

(2)當測試工程師把工作的重點放在尋找更多的錯誤上的時候,他們往往會急功近利,忽略一些偏僻的問題,或者會把一些情況視為理所當然。

心得

歸根結底,軟件測試的目的是為了保證軟件產品的最終質量。所以,軟件測試要做到:(1)要證明軟件是“工作的”; (2)要證明軟件是“不工作的”; (3)要證明存在軟件缺陷;(4)不能以“尋找錯誤”為目標;(5)不要試圖窮盡測試;(6)要測試“軟件規格說明書”; (7)要深入分析缺陷和錯誤;(8)要幫助度量軟件質量并為團隊中的其他成員(如項目經理、軟件開發工程師)提供信息。

Software testing is…

Over the years many experts have proposed various definitions for software testing, some common definitions of testing including:

… The process of executing a program with the intent of finding errors, (Myers, G. J., the art of software testing, Wiley, 1979)

“Execute a program or system with the intention of finding errors.”-Myers, 1979

Software testing is a process of analyzing or operating software for the purpose of finding bugs. (Chris Brown, Gray Cobb, Robert Culbertson, Introduction to Rapid Software Testing, 2001)

May experts in the field seem to advocate the primary purpose of testing is to find defects; as many as possible as early in the software development lifecycle as possible. Unfortunately there are 2 fundamental problems with this simplistic interpretation of software testing.

Finding as many as defects as we can as early as possible can make testing a numbers game. Does a large bug count imply testing is doing a good job? High numbers of bugs don' t always mean the testing effort is finding the most important critical issues as early as possible. Another potential side effect of simply finding as many as bugs as possible includes artificial explosion of bug count. Defects manifest themselves in many ways; if a tester doesn' t take time to investigate or understand the cause of a bug then they could write several bug reports for a single issue. Unfortunately, novice testers often believe that by finding as many as defects as they can they are improving software quality. YOU CANNOT TEST IN QUALITY.

When the test engineer is focused on finding more bugs they tend to skip over areas or take things for granted. Antidotal evidence suggests that testers often miss simple errors because they are too focused on finding as many as bugs as possible or finding the most heinous bugs. For example, testing boundary conditions some testers may exercise the specific valid boundary values and then try invalid values well above or below the valid boundary values instead of minimum -1 and maximum +1. Also, many testers simply overlook the minimum +1 value and the maximum -1 value assuming if the minimum and maximum value worked so everything in between the range of minimum and max is the valid equivalence class. This oversight can lead to missed errors in arrays or in assignments for ranges of data.

主站蜘蛛池模板: 彭泽县| 安平县| 新宁县| 行唐县| 榕江县| 新源县| 阿拉善左旗| 新蔡县| 南岸区| 松溪县| 镇赉县| 江孜县| 阿克陶县| 华池县| 霞浦县| 平泉县| 和平县| 鄱阳县| 保亭| 石棉县| 东阿县| 突泉县| 和田市| 古蔺县| 黔江区| 高要市| 锡林郭勒盟| 平南县| 芮城县| 红原县| 磐安县| 麦盖提县| 麟游县| 渝北区| 襄汾县| 乌拉特前旗| 健康| 雷山县| 明光市| 平塘县| 横山县|