軟件過程與管理chapterppt課件_第1頁
軟件過程與管理chapterppt課件_第2頁
軟件過程與管理chapterppt課件_第3頁
軟件過程與管理chapterppt課件_第4頁
軟件過程與管理chapterppt課件_第5頁
已閱讀5頁,還剩36頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、1Chapter 17軟件測試戰略計控學院吳迪著明軟件錯誤案例研討著明軟件錯誤案例研討討論軟件測試的重要性?7Software Testing Testing is the process of exercising a program with the specific intent of finding errors prior to delivery to the end user.1、測試就是實行具有特定意圖方案的一個過程;2、測試的意圖就是在把軟件產品交付給最終用戶前找出錯誤。測試是有方案有步驟的活動,因此,為測試軟件建立系統化的測試戰略是合情合理的。817.1 Strategic

2、ApproachTo perform effective testing, you should conduct effective technical reviews. By doing this, many errors will be eliminated before testing commences.Testing begins at the component level and works outward toward the integration of the entire computer-based system. Different testing technique

3、s are appropriate for different software engineering approaches and at different points in time.Testing is conducted by the developer of the software and (for large projects) an independent test group.Testing and debugging are different activities, but debugging must be accommodated in any testing s

4、trategy. 1017.1.1V & VVerification refers to the set of tasks that ensure that software correctly implements a specific function. Validation refers to a different set of tasks that ensure that the software that has been built is traceable to customer requirements. Boehm states this another way: Veri

5、fication: Are we building the product right? Validation: Are we building the right product?測試是軟件質量平安網嗎?1217.1.2Who Tests the Software?developerindependent testerUnderstands the system but, will test gentlyand, is driven by deliveryMust learn about the system,but, will attempt to break itand, is driv

6、en by quality開發者精心地設計和執行測試,試圖證明其程序的正確性,而不是留意發現錯誤。在整個軟件工程中,開發人員和獨立測試組ITG親密配合以確保測試嚴厲地進展。在測試進展的過程中,必需隨時可以找到開發人員,以便及時修正發現的錯誤。討論和作業用本人的話描畫驗證和確認的區別;理出一些與獨立測試組的創建相關的問題。ITG和SQA小組是由一樣的人員組成的嗎?1417.1.3Testing StrategySystem engineeringAnalysis modelingDesign modelingCode generationUnit testIntegration testVali

7、dation testSystem test1517.2 Strategic IssuesSpecify product requirements in a quantifiable manner long before testing commences. State testing objectives explicitly. Understand the users of the software and develop a profile for each user category.Develop a testing plan that emphasizes “rapid cycle

8、 testing.什么樣的指點原那么導致勝利的軟件測試?Build “robust software that is designed to test itselfUse effective technical reviews as a filter prior to testingConduct technical reviews to assess the test strategy and test cases themselves. Develop a continuous improvement approach for the testing process.1717.3.1 Un

9、it Testingmoduleto betestedtest casesresultssoftwareengineer單元測試偏重于軟件設計的最小單元軟件構件或模塊的驗證任務。18Unit Testinginterface local data structuresboundary conditionsindependent pathserror handling pathsmoduleto betestedtest cases測試模塊的接口是為了保證被測程序單元的信息可以正常的流入和流出;檢查部分數據構造以確保暫時存儲的數據在算法的整個執行過程中能維護其完好性。測試邊境條件以確保模塊在到達

10、邊境值的極限或受限處置的情形下仍能正確執行。走遍控制構造中的一切獨立途徑根本途徑以確保模塊中的一切語句至少執行一次。對一切的錯誤處置途徑進展測試。19Unit Test EnvironmentModulestubstubdriverRESULTSinterface local data structuresboundary conditionsindependent pathserror handling pathstest cases由于構件模塊并不是獨立的程序,因此,必需為每個測試單元開發驅動軟件和或樁軟件驅動程序只是一個“主程序,它接納測試用例數據,將這些數據傳送給將要測試的構件并打印相

11、關結果。樁程序的作用是交換那些從屬于將要測試的構件或被其調用的構件。當構件具有高內聚時,可簡化單元測試。2017.3.2 Integration Testing StrategiesOptions:the “big bang approachan incremental construction strategy集成測試是構造軟件體系構造的系統化技術,同時,也是進展一些旨在發現與接口相關的錯誤的測試。其目的是利用已經過單元測試的構件建立設計中描畫的程序構造。“一步到位的方式構造程序:一切的構件都事先銜接在一同,全部程序作為一個整體進展測試。增量集成:程序以小增量的方式逐漸進展構造和測試,這樣錯

12、誤易于分別和糾正,更易于對接口進展徹底測試,而且可以運用系統化的測試方法。21Top Down Integrationtop module is tested with stubsstubs are replaced one at a time, depth firstas new modules are integrated, some subset of tests is re-runABCDEFG22Bottom-Up Integrationdrivers are replaced one at a time, depth firstworker modules are grouped

13、into builds and integratedABCDEFGcluster23Regression TestingRegression testing is the re-execution of some subset of tests that have already been conducted to ensure that changes have not propagated unintended side effectsWhenever software is corrected, some aspect of the software configuration (the

14、 program, its documentation, or the data that support it) is changed. Regression testing helps to ensure that changes (due to testing or for other reasons) do not introduce unintended behavior or additional errors.Regression testing may be conducted manually, by re-executing a subset of all test cas

15、es or using automated capture/playback tools.24Smoke TestingA common approach for creating “daily builds for product softwareSmoke testing steps:Software components that have been translated into code are integrated into a “build. A build includes all data files, libraries, reusable modules, and eng

16、ineered components that are required to implement one or more product functions.A series of tests is designed to expose errors that will keep the build from properly performing its function. The intent should be to uncover “show stopper errors that have the highest likelihood of throwing the softwar

17、e project behind schedule.The build is integrated with other builds and the entire product (in its current form) is smoke tested daily. The integration approach may be top down or bottom up.2617.4Object-Oriented Testingbegins by evaluating the correctness and consistency of the analysis and design m

18、odelstesting strategy changesthe concept of the unit broadens due to encapsulationintegration focuses on classes and their execution across a thread or in the context of a usage scenariovalidation uses conventional black box methodstest case design draws on conventional methods, but also encompasses

19、 special featuresThese slides are designed to accompany Software Engineering: A Practitioners Approach, 7/e (McGraw-Hill 2021). Slides copyright 2021 by Roger Pressman. 27Broadening the View of “TestingIt can be argued that the review of OO analysis and design models is especially useful because the

20、 same semantic constructs (e.g., classes, attributes, operations, messages) appear at the analysis, design, and code level. Therefore, a problem in the definition of class attributes that is uncovered during analysis will circumvent side effects that might occur if the problem were not discovered un

21、til design or code (or even the next iteration of analysis). OO分析和設計模型的審查特別有用,是由于在分析、設計和編碼階段具有一樣的語義構圖例如,類、屬性、操作、音訊。所以,類屬性定義問題可以在分析階段發現,這將防止副作用的發生:問題直到設計或編碼或者分析的下一次迭代階段才發現28OO Testing Strategyclass testing is the equivalent of unit testingoperations within the class are testedthe state behavior of th

22、e class is examinedintegration applied three different strategiesthread-based testingintegrates the set of classes required to respond to one input or eventuse-based testingintegrates the set of classes required to respond to one use casecluster testingintegrates the set of classes required to demon

23、strate one collaboration2917.5WebApp Testing - IThe content model for the WebApp is reviewed to uncover errors. The interface model is reviewed to ensure that all use cases can be accommodated. The design model for the WebApp is reviewed to uncover navigation errors. The user interface is tested to

24、uncover errors in presentation and/or navigation mechanics.Each functional component is unit tested. 30WebApp Testing - IINavigation throughout the architecture is tested. The WebApp is implemented in a variety of different environmental configurations and is tested for compatibility with each confi

25、guration. Security tests are conducted in an attempt to exploit vulnerabilities in the WebApp or within its environment.Performance tests are conducted.The WebApp is tested by a controlled and monitored population of end-users. The results of their interaction with the system are evaluated for conte

26、nt and navigation errors, usability concerns, compatibility concerns, and WebApp reliability and performance.32High Order TestingValidation testingFocus is on software requirementsSystem testingFocus is on system integrationAlpha/Beta testingFocus is on customer usageRecovery testingforces the softw

27、are to fail in a variety of ways and verifies that recovery is properly performedSecurity testingverifies that protection mechanisms built into a system will, in fact, protect it from improper penetrationStress testing executes a system in a manner that demands resources in abnormal quantity, freque

28、ncy, or volumePerformance Testingtest the run-time performance of software within the context of an integrated system3317.8Debugging: A Diagnostic Process調試并不是測試,但總是發生在測試之后。調試試圖將病癥symptom與緣由相匹配,從而使錯誤得到修正 。34The Debugging Process35Debugging Efforttime requiredto diagnose thesymptom anddetermine theca

29、usetime requiredto correct the errorand conductregression tests36Symptoms & Causessymptomcausesymptom and cause may be geographically separated symptom may disappear when another problem is fixedcause may be due to a combination of non-errors cause may be due to a system or compiler errorcause may b

30、e due to assumptions that everyone believessymptom may be intermittent為什么調試如此困難?37Consequences of BugsdamagemildannoyingdisturbingseriousextremecatastrophicinfectiousBug TypeBug Categories: function-related bugs, system-related bugs, data bugs, coding bugs, design bugs, documentation bugs, standards violations, etc.38Debugging Techniquesbrute force / testingbacktrackinginductiondeduction蠻力調試法:利用“讓計算機本人找錯誤的思想。最常用但最低效的方法。回溯法:從發現病癥的地方開場,向后追蹤手工源代碼,直到發現錯誤的緣由。緣由排除法:經過演繹ded

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論