tailieunhanh - The art of software testing second edition p4

Như vậy, một định nghĩa thích hợp hơn là: Kiểm tra là quá trình thực hiện một chương trình với mục đích tìm kiếm các lỗi. Mặc dù điều này nghe có vẻ giống như một trò chơi của ngữ nghĩa tinh tế, nó thực sự là một khác biệt quan trọng. Sự hiểu biết đích thực | 58 The Art of Software Testing The next step is to write a test case covering one or more valid equivalence classes. For instance the test case DIMENSION A 2 covers classes 1 4 7 10 12 15 24 28 29 and 40. The next step is to devise one or more test cases covering the remaining valid equivalence classes. One test case of the form DIMENSION A 12345 I 9 J4XXXX 65535 1 KLM X 100 BBB -65534 100 0 1000 10 10 I 65535 covers the remaining classes. The invalid-input equivalence classes and a test case representing each are 3 DIMENSION 5 DIMENSION 10 6 DIMENSION A234567 2 9 DIMENSION 2 11 DIMENSION 1A 10 13 DIMENSION B 14 DIMENSION B 4 4 4 4 4 4 4 4 17 DIMENSION b 4 A 2 18 DIMENSION b 4 21 DIMENSION C I. 10 23 DIMENSION C 10 1J 25 DIMENSION d -65535 1 26 DIMENSION D 65536 31 DIMENSION D 4 3 37 DIMENSION D A 2 4 38 D . 4 Hence the equivalence classes have been covered by 18 test cases. You may want to consider how these test cases would compare to a set of test cases derived in an ad hoc manner. Test-Case Design 59 Although equivalence partitioning is vastly superior to a random selection of test cases it still has deficiencies. It overlooks certain types of high-yield test cases for example. The next two methodologies boundary-value analysis and cause-effect graphing cover many of these deficiencies. Boundary-Value Analysis Experience shows that test cases that explore boundary conditions have a higher payoff than test cases that do not. Boundary conditions are those situations directly on above and beneath the edges of input equivalence classes and output equivalence classes. Boundary-value analysis differs from equivalence partitioning in two respects 1. Rather than selecting any element in an equivalence class as being representative boundary-value analysis requires that one or more elements be selected such that each edge of the equivalence class is the subject of a test. 2. Rather than just focusing attention on the input conditions input space test cases are also .