tailieunhanh - The art of software testing second edition phần 8

Sau này, không có thủ tục đúng duy nhất để lựa chọn các mô-đun tiếp theo sẽ được từng bước thử nghiệm, quy tắc duy nhất là được đủ điều kiện để các module tiếp theo, ít nhất là một trong những cấp dưới của module (gọi) các mô-đun phải | 162 The Art of Software Testing Figure A method for structuring the clues. in Figure to structure the available data. The what boxes list the general symptoms the where boxes describe where the symptoms were observed the when boxes list anything that you know about the times that the symptoms occur and the to what extent boxes describe the scope and magnitude of the symptoms. Notice the is and is not columns they describe the contradictions that may eventually lead to a hypothesis about the error. 3. Devise a hypothesis. Next study the relationships among the clues and devise using the patterns that might be visible in the structure of the clues one or more hypotheses about the cause of the error. If you can t devise a theory more data are needed perhaps from new test cases. If multiple theories seem possible select the more probable one first. 4. Prove the hypothesis. A major mistake at this point given the pressures under which debugging usually is performed is skipping this step and jumping to conclusions to fix the Debugging 163 problem. However it is vital to prove the reasonableness of the hypothesis before you proceed. If you skip this step you ll probably succeed in correcting only the problem symptom not the problem itself. Prove the hypothesis by comparing it to the original clues or data making sure that this hypothesis completely explains the existence of the clues. If it does not either the hypothesis is invalid the hypothesis is incomplete or multiple errors are present. As a simple example assume that an apparent error has been reported in the examination grading program described in Chapter 4. The apparent error is that the median grade seems incorrect in some but not all instances. In a particular test case 51 students were graded. The mean score was correctly printed as but the median printed was 26 instead of the expected value of 82. By examining the results of this test case and a few other test cases the clues are organized as .