tailieunhanh - Lecture Software testing and analysis - Chapter 9: Test case selection and adequacy

Learning objectives in this chapter: Understand the purpose of defining test adequacy criteria, and their limitations; understand basic terminology of test selection and adequacy; know some sources of information commonly used to define adequacy criteria; understand how test selection and adequacy criteria are used. | Test Case Selection and Adequacy Criteria c 2007 Mauro Pezze Michal Young Ch 9 slide 1 Adequacy We can t get what we want What we would like - A real way of measuring effective testing If the system system passes an adequate suite of test cases then it must be correct or dependable But that s impossible - Adequacy of test suites in the sense above is provably undecidable. So we ll have to settle on weaker proxies for adequacy - Design rules to highlight inadequacy of test suites SOFTWARE TESTING MID ANALYSIS c 2007 Mauro Pezze Michal Young Ch 9 slide 3 Learning objectives Understand the purpose of defining test adequacy criteria and their limitations Understand basic terminology of test selection and adequacy Know some sources of information commonly used to define adequacy criteria Understand how test selection and adequacy criteria are used c 2007 Mauro Pezze Michal Young Ch 9 slide 2 Adequacy Criteria as Design Rules Many design disciplines employ design rules - . traces on a chip on a circuit board must be at least___wide and separated by at least___ - The roof must have a pitch of at least to shed snow - Interstate highways must not have a grade greater than 6 without special review and approval Design rules do not guarantee good designs - Good design depends on talented creative disciplined designers design rules help them avoid or spot flaws - Test design is no different SOFTWARE TESTING MID ANALYSIS c 2007 Mauro Pezze Michal Young Ch 9 slide 4 Practical in Adequacy Criteria Criteria that identify inadequacies in test suites. - Examples - if the specification describes different treatment in two cases but the test suite does not check that the two cases are in fact treated differently we may conclude that the test suite is inadequate to guard against faults in the program logic. - If no test in the test suite executes a particular program statement the test suite is inadequate to guard against faults in that statement. If a test suite fails to satisfy .