談完效能測試後,接下來我都會大家一個問題:效能測試、壓力測試(Stress Testing)和負載測試的差別在哪裡?
 
 
一般人聽到這三個名詞,覺得很相像,又覺得不太一樣,很少人會分的清楚到底差在哪裡。這三個名詞要做的事情當然不一樣,否則老外不會那麼無聊去創造出他們出來,讓我們來看看各位名家所給的定義:
 
 
A. J Myers
 
這位老大是”The Art of Software Testing”一書的作者,基本上市面上講黑箱測試(Black Box Testing)的理論,可以說十本有十本是出自於他的內容,是超級無敵軟體測試界的聖經。以下是他給的定義:
 
(1). 效能測試
The purpose of performance testing is to demonstrate that the program does not meet its objectives, test cases must be devised that attempt to show that the program does not satisfy its performance objectives.
 
(2). 壓力測試
Stress testing involves subjecting the program to heavy loads or stresses. This should not be confused with volume testing, a heavy stress is a peak volume of data encountered over a short span of time.
 
(3). 負載測試
Volume testing is subjecting the program to heavy volumes of data. The purpose of volume testing is to show that the program cannot handle the volume of data specified in its objectives.
 
他舉一個有名的例子:當你要測試文書處理程式,負載測試是決定程式是否能處理一個1GB的檔案;而壓力測試則是在測試,此程式使否成承受當使用者每秒輸入 1000 個字元。 也就是說壓力測試伴隨著一個壓力的條件,可能是單位時間內會衝大量,或是磁碟空間不足,或是記憶體不足。看看在這樣的狀況下,是否程式還能處理正常。
 
 
B. Cem Kaner
 
接下來這位作者也是赫赫有名,他是 ”Testing Computer Software” 一書的作者,這本書是實務派的,很多業界的人員都會買這本書,是接著 ”The Art of Software Testing” 另一本巨著。目前在軟體測試業界,很多人都會去看他的文章和 blog。另一件要提的是,他是 exploratory testing 開山始祖,影響軟體測試界甚深。以下是他的解釋:
 
(1). 效能測試
One objective of performance testing is performance enhancement. The tests might determine which modules execute most often or use the most computer time.
 
(2). 壓力測試
It studies the program's response to peak bursts of activity. High volume is much work over a long period. High stress is max load at one time.
 
(3). 負載測試
It studies the largest tasks the program can deal with
 
 
 
C. wiki
 
我想 wiki 的定義有一定的公信力,因此也值得大家參考一下,畢竟前面兩本書的年紀有點大了,看看現在年輕一點的說法是什麼。
 
(1). 效能測試
Performance testing is testing that is performed to determine how fast some aspect of a system performs under a particular workload.
 
(2). 壓力測試
Stress testing is a form of testing that is used to determine the stability of a given system or entity. It involves testing beyond normal operational capacity, often to a breaking.
 
(3). 負載測試
Load testing is the process of running a number of clients simultaneously to test a client-server system and measure response times
Load testing generally refers to the practice of modeling the expected usage of a software program by simulating multiple users accessing the program's services concurrently. As such, this testing is most relevant for multi-user systems, often one built using a client/server model, such as web servers.
When the load placed on the system is raised beyond normal usage patterns, in order to test the system's response at unusually high or peak loads, it is known as Stress testing. The load is usually so great that error conditions are the expected result, although there is a gray area between the two domains and no clear boundary exists when an activity ceases to be a load test and becomes a stress test
 
 
 
D. Improving .NET Application Performance and Scalability
 
最後我們來看微軟的說法,畢竟它是最大的軟體公司,他還是有他獨到的地方。
 
(1). 效能測試
Performance testing is used to verify that an application is able to perform under expected and peak load conditions, and that it can scale sufficiently to handle increased capacity.
The main goal of performance testing is identify how well your application performs in relation to your performance objectives.
 
(2). 壓力測試
Use stress testing to evaluate your application's behavior when it's pushed beyond the normal or peal load conditions. Stress test your application by subjecting it to very high loads that are beyond the capacity of the application, while denying it the resources required to process that load.
 
(3). 負載測試
Use load testing to verify application behavior under normal and peak load conditions.
You incrementally increase the load from normal to peak load to see how your application performs with varying load conditions.
 
arrow
arrow
    全站熱搜

    kojenchieh 發表在 痞客邦 留言(0) 人氣()