软件过程与管理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

提交评论