Software testing [two]
阅读() 评论() 发表时间:2008年03月12日 20:47
|
Step 2
Test unit B, by calling it from tested unit A, using stubs for units C and D. 测试单元B, Step 3 Test unit C, by calling it from tested unit A, using tested units B and a stub for unit D 测试单元C, Step 4 Test unit D, by calling it from tested unit A, using tested unit B and C, and stubs for units E, F and G. (Shown in figure 2.1) 测试单元D Step 5 Test unit E, by calling it from tested unit D, which is called from tested unit A, using tested units B and C, and stubs for units F, G, H, I and J. 测试单元E, Step 6 Test unit F, by calling it from tested unit D, which is called from tested unit A, using tested units B, C and E, and stubs for units G, H, I and J. 测试单元F Step 7 Test unit G, by calling it from tested unit D, which is called from tested unit A, using tested units B, C, E and F, and stubs for units H, I and J. 测试单元G Step 8 Test unit H, by calling it from tested unit E, which is called from tested unit D, which is called from tested unit A, using tested units B, C, E, F and G, and stubs for units I and J. 测试单元H Step 9 Test unit I, by calling it from tested unit E, which is called from tested unit D, which is called from tested unit A, using tested units B, C, E, F, G and H, and a stub for units J. 测试单元I Step 10 Test unit J, by calling it from tested unit E, which is called from tested unit D, which is called from tested unit A, using tested units B, C, E, F, G, H and I. 测试单元J Figure 1: Top-down Testing Major Features: The controlled program is tested first Modules are integratedone at a time Major emphasis isone interface testing 主要特点:先测试受控程序;模块逐步集成;强调接口测试。 Advantages: No test drivers are needed The controlled program plus a few modules form. the basic early prototype Interface errors are discovered early Modular features aid debugging 优点:不需要测试driver Disadvantages: Test stubs are needed The extended early phases dictate a slow manpower buildup Errors is critical modules at low levels are found late 缺点:需要测试stub; Comments: An early working program raises morale and helps convince management progress is being made It is hard to maintain a pure top-down strategy in practice 注释:尽早开始工作可以提升士气,同时帮助将进展情况呈现给管理层;但是实际中很难做到纯粹的自上而下。 4.2.2. Bottom-up Testing Units are tested in isolation from the units, which call them, but using the actual units called as part of the test. The lowest level units are tested first, and then used to facilitate the testing of higher level units. Other units are then tested using previously tested called units. The process is repeated until the unit at the top of the hierarchy has been tested. Bottom up testing requires test drivers, but does not require test stubs. Figure 2 illustrates the test driver and tested units needed to test unit D, assuming that units E, F, G, H, I and J have already been tested in a bottom up approach. 将单元与调用他们的单元隔离,但是使用被调用的单元进行测试。首先测试最底层的单元,然后推动上层单元的测试。其他单元使用被调用并已测试的单元进行测试。重复过程,直到最顶层的单元被测试。自下往上测试要求测试driver A test plan for the program shown in Figure 2 using a strategy based on the bottom-up organization approach could read as follows: 图2 Step 1 (Note that the sequence of tests within this step is unimportant, all tests within step 1 could be executed in parallel.) (注意本步骤内的测试顺序不重要,步骤1 Test unit H, using a driver to call it in place of unit E Test unit I, using a driver to call it in place of unit E Test unit J, using a driver to call it in place of unit E Test unit F, using a driver to call it in place of unit D Test unit G, using a driver to call it in place of unit D Test unit B, using a driver to call it in place of unit A Test unit C, using a driver to call it in place of unit A 测试单元H 测试单元I 测试单元J 测试单元F 测试单元G 测试单元B 测试单元C Step (2) Test unit E, using a driver to call it in place of unit D and tested units H, I and J. 测试单元E Step (3) Test unit D, using a driver to call it in place of unit A and tested units E, F, G, H, I and J. (Shown in figure 2). 测试单元D, Step (4) Test unit A, using tested units B, C, D, E, F, G, H, I and J. 测试单元A Figure 2: Bottom-up Testing Major Features: Allows early testing aimed at proving feasibility and practical of particular modules Modules can be integrated in various clusters as desired Major emphasis is on module functionality and performance 主要特点:允许尽早对特定模块的可行性和实用性进行测试;模块可以根据需要进行集成;主要关注模块的功能和性能。 Advantages: No test stubs are needed. It is easier to adjust to manpower needs Error in critical modules are found early 优点:不需要测试stub; Disadvantages: Test drivers are needed Many modules must be integrated before a working program is available Interface errors are discovered late 缺点:需要测试driver Comments: At any given point, more code has been written and tested than with top-down testing Some people feel that bottom-up is a more intuitive philosophy 注释:在任何时候,与自上而下测试相比,有更多的代码被编写并测试。很多人认为自下而上是一种更为自发的哲学。 4.3. Regression Testing Whenever there is a change to the existing software or when new modules/units are added, there could be new data flow paths, new I/O, new control logics. These changes may impact the existing functions that were previously working flawlessly. Regression testing is the process of running all existing test cases and verifying that the changes have not propagated any side effects. 当对软件做变更或者增加新的模块/ Regression testing is theonly reliable way to ensure that modifications did not introduce new errors into code or to check whether modifications successfully eliminated existing errors. Every time code is modified or used in a new environment, regression testing should be used to check the code's integrity. Ideally, you perform. regression testing nightly (during automated nightly builds) to ensure that errors are detected and fixed as soon as possible 要保证修改没有带来新的错误,或者检查修改是否成功排除已有的错误,回归测试是最可靠的方法。每一次代码被修改或者在新的环境中使用,都应该进行回归测试来检查代码的完整性。理想状态下,每天晚上进行回归测试(自动的夜间build Regression testing is most often used in testing maintenance to existing programs. It is also used when new modules are added to a system under development, which has already undergone integration testing. 回归测试最常用在已有测试的测试维护。在开发时,当往已经进行集成测试的系统中添加新的模块,也可使用回归测试。 4.4. System Testing System testing verifies that all elements (modules/units) mesh properly and that overall system function/performance is achieved. 系统测试验证所有元素(模块/ In system testing the focus is on the whole application and its environment. It is intended to test the system as a whole rather than individual system component. Inevitably, System Testing reveals errors which were undiscovered during Integration testing. 在系统测试中,关注整体应用和环境。将系统作为整体而不是各个组件来测试。系统测试会发现集成测试中未发现的错误。 System testing involves Interface Testing and Stress Testing. 系统测试包括接口测试和压力测试。 4.5. Acceptance Testing (Alpha and Beta Testing) Acceptance Testing is a process of demonstrating to the customer that the system is acceptable. When customer software is built, series of acceptance tests are conducted to enable the customer to validate all requirements. Acceptance testing is usually performed by the end-users. They will work with the system to determine if it satisfies their criteria. 接受测试是向客户显示系统是可接受的过程。当客户软件建立后,客户可以做一系列的接受测试来验证需求。接受测试通常由最终用户执行。他们来决定系统是否满足准则。 Most software developers use a process called Alpha and Beta testing to uncover errors thatonly the end-users seems able to find. The Alpha test is conducted at the developers’ site by the customer with the developer monitoring the recording of errors and other usage problems. 大多数开发人员使用Alpha The Beta test is conducted atone or more customer site by the end-user of the software. Unlike Alpha testing, the developer usually is not present. Therefore, Beta test is a ‘live’ application in an environment that cannot be controlled by the developer. |
空间的其他文章:
- [个人日记]:177本名著浓缩成了177句话!经典收藏!(2010年02月05日 00:46)
- [嬡凊尒説]:周年感悟(2009年05月27日 23:38)
- [個亾ㄖ梽]:纪念我:已丢失的微笑(2008年06月03日 19:20)
- [咑尐卟乖]:ノ个亻簡历ノ(2008年06月01日 04:29)
- [兲芐卆侃]:镬嘚Q币哋20種汸琺[免费](2008年05月02日 19:13)
- [覀蔀計劃]:倡议[幇莇濡婹幇莇哋亾](2008年04月29日 21:17)
- [恻鉽笁珵]:Software testing [one](2008年03月12日 20:43)
- [個亾ㄖ梽]:滭鄴憾訁[毕业感言]①(2008年01月22日 00:21)
- [個亾ㄖ梽]:滭鄴憾訁[毕业感言]②(2007年12月20日 00:31)
发表评论
copyright © 1998 - 2010 Tencent Inc. all rights reserved 腾讯公司 版权所有
