软件测试策略讲义

上传人:F****n 文档编号:95527008 上传时间:2019-08-20 格式:PPT 页数:41 大小:2.95MB
返回 下载 相关 举报
软件测试策略讲义_第1页
第1页 / 共41页
软件测试策略讲义_第2页
第2页 / 共41页
软件测试策略讲义_第3页
第3页 / 共41页
软件测试策略讲义_第4页
第4页 / 共41页
软件测试策略讲义_第5页
第5页 / 共41页
点击查看更多>>
资源描述

《软件测试策略讲义》由会员分享,可在线阅读,更多相关《软件测试策略讲义(41页珍藏版)》请在金锄头文库上搜索。

1、1,Chapter 17,软件测试策略 计控学院 吴迪,著明软件错误案例研究,著明软件错误案例研究,讨论,软件测试的重要性?,7,Software 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、测试的意图就是在把软件产品交付给最终用户前找出错误。,测试是有计划有步骤的活动,因此,为测试软件建立系统化的测试策略是合情合理的。,8,

2、17.1 Strategic Approach,To 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. Differen

3、t testing techniques 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 accommod

4、ated in any testing strategy.,10,17.1.1V & V,Verification 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

5、 this another way: Verification: “Are we building the product right?“ Validation: “Are we building the right product?“,测试是软件质量安全网吗?,12,17.1.2Who Tests the Software?,developer,independent tester,Understands the system,but, will test “gently“,and, is driven by “delivery“,Must learn about the system,bu

6、t, will attempt to break it,and, is driven by quality,开发者精心地设计和 执行测试,试图证明 其程序的正确性,而 不是注意发现错误。,在整个软件项目中,开发人员和(独立)测试组(ITG)密切配合以确保测试严格 地进行。在测试进行的过程中,必须随时可以找到开发人员,以便及时修改发现的 错误。,讨论和作业,用自己的话描述验证和确认的区别; 理出一些与独立测试组的创建相关的问题。ITG和SQA小组是由相同的人员组成的吗?,14,17.1.3Testing Strategy,System engineering,Analysis modeling,

7、Design modeling,Code generation,Unit test,Integration test,Validation test,System test,15,17.2 Strategic Issues,Specify 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 eac

8、h user category. Develop a testing plan that emphasizes “rapid cycle testing.”,什么样的指导原则导致成功的软件测试?,Build “robust” software that is designed to test itself Use effective technical reviews as a filter prior to testing Conduct technical reviews to assess the test strategy and test cases themselves. Deve

9、lop a continuous improvement approach for the testing process.,17,17.3.1 Unit Testing,module to be tested,test cases,results,software engineer,单元测试侧重于软件设计的最小单元 (软件构件或模块)的验证工作。,18,Unit Testing,interface,local data structures,boundary conditions,independent paths,error handling paths,module to be test

10、ed,test cases,测试模块的接口是为了保证被测程序单元的信息能够正常的流入和流出;,检查局部数据结构以确保临时存储的数据在算法的整个执行过程中能维护其完整性。,测试边界条件以确保模块在到达边界值的极限或受限处理的 情形下仍能正确执行。,走遍控制结构中的所有独立路径(基本路径)以确保模块中的所有语句至少执行一次。,对所有的错误处理路径进行测试。,19,Unit Test Environment,Module,stub,stub,driver,RESULTS,interface,local data structures,boundary conditions,independent p

11、aths,error handling paths,test cases,由于构件(模块)并不是独立的程序,因此,必须为 每个测试单元开发驱动软件和(或)桩软件,驱动程序只是一个“主程序”,它接收测试用例数据,将这些数据传递给(将要测试的)构件 并打印相关结果。,桩程序的作用是替换那些从属于将要测试的构件或被其调用的构件。,当构件具有高内聚时,可简化单元测试。,20,17.3.2 Integration Testing Strategies,Options: the “big bang” approach an incremental construction strategy,集成测试 是构

12、造软件体系结构的系统化技术,同时,也是进行一些旨在发现与接口相关的错误的测试。其目标是利用已通过单元测试的构件建立设计中描述的程序结构。,“一步到位”的方式构造程序:所有的构件都事先 连接在一起,全部程序作为一个整体进行测试。,增量集成:程序以小增量的方式逐步进行构造 和测试,这样错误易于分离和纠正,更易于对 接口进行彻底测试,而且可以运用系统化的测 试方法。,21,Top Down Integration,top module is tested with,stubs,stubs are replaced one at,a time, “depth first“,as new modules

13、 are integrated,some subset of tests is re-run,A,B,C,D,E,F,G,22,Bottom-Up Integration,drivers are replaced one at a,time, “depth first“,worker modules are grouped into,builds and integrated,A,B,C,D,E,F,G,cluster,23,Regression Testing,Regression testing is the re-execution of some subset of tests tha

14、t have already been conducted to ensure that changes have not propagated unintended side effects Whenever software is corrected, some aspect of the software configuration (the program, its documentation, or the data that support it) is changed. Regression testing helps to ensure that changes (due to

15、 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 cases or using automated capture/playback tools.,24,Smoke Testing,A common approach for creating “daily builds” for product sof

16、tware Smoke 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 engineered 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

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > PPT模板库 > PPT素材/模板

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号