tailieunhanh - Lecture Software testing and analysis - Chapter 10: Functional testing

In lecture Software testing and analysis - Chapter 10, you will: Understand the rationale for systematic (nonrandom) selection of test cases; understand why functional test selection is a primary, base-line technique; distinguish functional testing from other systematic testing techniques. | Functional testing c 2007 Mauro Pezze Michal Young Ch 10 slide 1 Functional testing Functional testing Deriving test cases from program specifications Functional refers to the source of information used in test case design not to what is tested Also known as - specification-based testing from specifications - black-box testing no view of the code Functional specification description of intended program behavior - either formal or informal c 2007 Mauro Pezze Michal Young Ch 10 slide 3 Learning objectives Understand the rationale for systematic nonrandom selection of test cases - Understand the basic concept of partition testing and its underlying assumptions Understand why functional test selection is a primary base-line technique - Why we expect a specification-based partition to help select valuable test cases Distinguish functional testing from other systematic testing techniques SOFTWARE TESTING ANDJJNALYSIS IJesS c 2007 Mauro Pezze Michal Young Ch 10 slide 2 Systematic vs Random Testing Random uniform - Pick possible inputs uniformly - Avoids designer bias A real problem The test designer can make the same logical mistakes and bad assumptions as the program designer especially if they are the same person - But treats all inputs as equally valuable Systematic non-uniform - Try to select inputs that are especially valuable - Usually by choosing representatives of classes that are apt to fail often or not at all Functional testing is systematic testing AHO AHftLYSIS IJesS c 2007 Mauro Pezze Michal Young Ch 10 slide 4 Why Not Random Non-uniform distribution of faults Example Java class roots applies quadratic equation x -b Vb2-4ac 2a Incomplete implementation logic Program does not properly handle the case in which b2 - 4ac 0 and a 0 Failing values are sparse in the input space needles in a very big haystack. Random sampling is unlikely to choose a and b SOFTWARE TESTING AND ANALYSIS c 2007 Mauro Pezze Michal Young Ch 10 slide 5 Systematic Partition Testing