Simpo Chương 2: Tâm lý học và Kinh tế của Chương trình thử nghiệm PDF Merge và Split Version Chưa đăng ký - Thứ hai, một chương trình có thể không đúng vì con đường bị mất tích. Kiểm tra đường dẫn đầy đủ, tất nhiên, sẽ không phát hiện trường hợp không có các đường dẫn cần thiết | Simpo PDF1 M ergeandySplitcUnregistered Versio nr-http Second a program may be incorrect because of missing paths. Exhaustive path testing of course would not detect the absence of necessary paths. Third an exhaustive path test might not uncover data-sensitivity errors. There are many examples of such errors but a simple example should suffice. Suppose that in a program you have to compare two numbers for convergence that is to see if the difference between the two numbers is less than some predetermined value. For example you might write a Java IF statement as if a-b c a-b c Of course the statement contains an error because it should compare c to the absolute value of a-b. Detection of this error however is dependent upon the values used for a and b and would not necessarily be detected by just executing every path through the program. In conclusion although exhaustive input testing is superior to exhaustive path testing neither proves to be useful because both are infeasible. Perhaps then there are ways of combining elements of black-box and white-box testing to derive a reasonable but not airtight testing strategy. This matter is pursued further in Chapter 4. Software Testing Principles Continuing with the major premise of this chapter that the most important considerations in software testing are issues of psychology we can identify a set of vital testing principles or guidelines. Most of these principles may seem obvious yet they are all too often over- looked. Table summarizes these important principles and each is discussed in more detail in the paragraphs that follow. Table Vital Program Testing Guidelines Principle Number Principle 1 A necessary part of a test case is a definition of the expected output or result. 2 A programmer should avoid attempting to test his or her own program. 3 A programming organization should not test its own programs. 4 Thoroughly inspect the results of each test. 5 Test cases must be