tailieunhanh - The art of software testing second edition phần 6
Lý do là rằng việc thử nghiệm bắt đầu từ dưới lên trong một cách đó là giống hệt với một thử nghiệm nonincremental (tức là, khi phía dưới, hoặc thiết bị đầu cuối, các mô-đun được kiểm tra), nhưng như chúng ta đã thấy trong phần trước, kiểm tra từ dưới lên là một gia tăng chiến lược. | 110 The Art of Software Testing designed in top-down fashion can be incrementally tested in either a top-down or a bottom-up fashion. Second bottom-up testing or bottom-up development is often mistakenly equated with nonincremental testing. The reason is that bottom-up testing begins in a manner that is identical to a nonincre-mental test . when the bottom or terminal modules are tested but as we saw in the previous section bottom-up testing is an incremental strategy. Finally since both strategies are incremental the advantages of incremental testing are not repeated here only the differences between top-down and bottom-up testing are discussed. Top-down Testing The top-down strategy starts with the top or initial module in the program. After this there is no single right procedure for selecting the next module to be incrementally tested the only rule is that to be eligible to be the next module at least one of the module s subordinate calling modules must have been tested previously. Figure is used to illustrate this strategy. A through L are the 12 modules in the program. Assume that module J contains the program s I O read operations and module I contains the write operations. The first step is the testing of Module A. To accomplish this stub modules representing B C and D must be written. Unfortunately the production of stub modules is often misunderstood as evidence you may often see such statements as a stub module need only write a message stating we got this far and in many cases the dummy module stub simply exits without doing any work at all. In most situations these statements are false. Since module A calls module B A is expecting B to perform some work this work most likely is some result output arguments returned to A. If the stub simply returns control or writes an error message without returning a meaningful result module A will fail not because of an error in A but because of a failure of the stub to simulate the corresponding module. .
đang nạp các trang xem trước