软件测试课程学习总结
一、知識結構
介紹:
1.Definition of Software testing:
Software testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results
Software Testing is an empirical(觀察和實驗) investigation conducted to provide stakeholders with information about the quality of the product or service under test
Software testing is any activity , which exists through the whole lifecycle, aimed at testing a program by using test cases to test the software behaviors(true/false)
2.Why Software Testing
Because we just are not good enough programmers
We probably don’t concentrate enough to keep from making mistakes
We forget some times to use full structured programming, top-down design to get our solutions
We should be able to distinguish what another programmer or customer says and what they really think or mean
Testing is an admission of failure
3.Some of the Definitions
error(錯誤): mistake that designer or programmer makes
defect(fault, bug)(缺陷) : the results from “errors” in source code, or. requirements gaps
failure(失敗或失效): cause of the executed “defect”, in certain situations the system will produce wrong results.
4.Understanding Software Testing
黑盒測試
1.Black Box Testing:It is a common method of testing, it is regarded as a black box that can not be open, and it design cases ?according to functional requirements.Some commom black box testing methods and testing tools will be introduced here.?
2.Equivalence Class Partitioning
?所謂等價類是指輸入域的某個互不相交的子集合,所有等價類的并集便是整個輸入域。目的在于測試用例的無冗余性。
劃分等價類( valid / invalid ) (1)有效等價類:檢驗程序是否實現了規格說明預先規定的功能和性能。 (2)無效等價類:檢查軟件功能和性能的實現是否有不符合規格說明要求的地方。
常用的等價類劃分原則 (1)按區間劃分 (2)按數值劃分 (3)按數值集合劃分 (4)按限制條件或規則劃分 (5)細分等價類
3.Boundary Value Analysis?
大量的軟件測試實踐表明,故障往往出現在定義域或值域的邊界上,而不是在其內部。為檢測邊界附近的處理專門設計測試用例,通常都會取得很好的測試效果。因此邊界值分析法是一種很實用的黑盒測試用例方法,它具有很強的發現故障的能力?! ?/p>
4.因果圖法及決策表法
E,I, O,R Equal,And,Or,Not
白盒測試:
1.
白盒測試:又稱結構測試,它一般用來測試程序的內部結構(Control Flow , Data Flow)。并判定其結果是否與預期的結果一致。
白盒測試的種類:靜態分析測試(Static Analysis Test,Code Inspection)、語句分支覆蓋測試(Ctrl Flow Test)等。
2.
語句覆蓋(Statement coverage)準則 是最簡單的結構性測試方法之一,它要求測試中,程序中的每條語句都得到運行。即,控制流圖中的所有語句都被運行的充分必要條件是,覆蓋圖中的所有節點。 測試數據集T稱為語句覆蓋充分的,當且僅當LT覆蓋了GP中的所有節點。NODE(LT)為路徑集合LT中所覆蓋的GP中的節點的集合。 NG 是GP 中所有節點的集合。
3.
分支覆蓋準則 分支覆蓋要求在軟件測試中,每個分支都至少獲得一次真/假取值的經歷。 測試數據集T稱為分支覆蓋充分的,當且僅當LT覆蓋了GP中的所有有向邊。EDGE(LT)為路徑集合LT中所覆蓋的GP中的有向邊的集合, EG 是GP 中所有邊的集合。
4.
謂詞(Predicate)測試 一個分支的條件是由謂詞組成。單個謂詞稱為原子謂詞。 例如前面的例子中的 a!=0、mid>0等。原子謂詞通過邏輯運算符的連接構成復合謂詞。
系統測試:
Testing conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. System testing falls within the scope of black box testing, and as such, should require no knowledge of the inner design of the code or logic.
系統測試的測試類型及內容 功能測試、GUI測試、性能測試、壓力測試、容量測試、健壯性測試、安全性測試、可靠性測試、恢復測試與備份測試、協議一致性測試、兼容性測試、安裝性測試、可用性測試、配置性測試、文檔性測試、驗收測試、回歸測試
UNIT Test:
A software verification & validation method where the programmer gains confidence that individual units of source code are fit for use. A unit is the smallest testable part of an application:function, procedure; method of class Unit tests are typically written and run by software developers to ensure that code meets its requirements and behaves as intended. xUnit:a family of unit testing frameworks
驗證代碼與設計相符合(Code Inspection與Unit Test相結合) 跟蹤需求和設計的實現 發現設計和需求中存在的錯誤 發現編碼過程中引入的錯誤
Integration Test:
集成(Integration)是指把多個單元組合起來形成更大的單元。 集成測試(Integration Testing)是在假定各個軟件單元已經通過了單元測試的前提下,檢查各個軟件單元之間的相互接口是否正確。
所有公共接口必須被測試到 關鍵模塊必須進行充分測試 集成測試應當按一定層次進行 集成測試策略選擇應當綜合考慮質量、成本和進度(Q.C.D)三者之間的關系 集成測試應當盡早開始,并以概要設計為基礎 在模塊和接口的劃分上,測試人員應該和開發人員進行充分溝通
Peer review:
A work product (normally some form of document) is examined by its author and one or more colleagues, in order to evaluate its technical content and quality. Purpose is to test whether each stage of software development and software testing are complete、standard or not. Whether each stage of product meets the prescribed technical requirements and quality requirements, in order to decide whether it can go into the next phase of the work. 。
The division of Review stage (1) System analysis and design (2) Software requirement analysis (3) System outline design (4) Software detailed design (5) Coding and unit test (6) Software component test (7) Software configuration test (8) Software system test (9) System acceptance?
Measure of peer review Defect density = defects/review scale Review speed = review scale/review hours Review efficiency = defects/man-hour Note: review scale: number of document pages(A4) man-hour: members * review hours
Merit of Technical peer review Have proven over time to be one of the most efective practices available for ensuring quality products and on-time deliveries. Have demonstrated its benefits across industry. Improve quality and reduce cost by reducing rework. More quickly bringing new members up to speed. Educating project members about efective develop-ment practices.
二、學習感想
通過本課程,我知道了什么是軟件測試、如何進行軟件測試、軟件測試的兩種方法----黑盒測試與白盒測試、不同階段的測試----單元測試集成測試系統測試,并學會了如何使用visual?studio?2013?ultimate?經行UI黑盒測試,手動進行白盒測試,使軟件出現問題的可能性大大的降低。
轉載于:https://www.cnblogs.com/airjasonsu/p/4474470.html
總結
以上是生活随笔為你收集整理的软件测试课程学习总结的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Supervised Convoluti
- 下一篇: mysql触发器更新前触发_mysql触