# Test planning can begin early in the software process

• No School
• AA 1
• 10

This preview shows page 2 - 5 out of 10 pages.

Test planning can begin early in the software process ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 12 Black-box testing I e Input test data O e Output test results System Inputs causing anomalous behaviour Outputs which reveal the presence of defects

Subscribe to view the full document.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 13 Equivalence partitioning Input data and output results often fall into different classes where all members of a class are related Each of these classes is an equivalence partition where the program behaves in an equivalent way for each class member Test cases should be chosen from each partition ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 14 Equivalence partitioning System Outputs Invalid inputs Valid inputs ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 15 Partition system inputs and outputs into equivalence sets If input is a 5-digit integer between 10,000 and 99,999, equivalence partitions are <10,000, 10,000-99, 999 and > 10, 000 Choose test cases at the boundary of these sets 00000, 09999, 10000, 99999, 10001 Equivalence partitioning ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 16 Equivalence partitions Between 10000 and 99999 Less than 10000 More than 99999 9999 10000 50000 100000 99999 Input values Between 4 and 10 Less than 4 More than 10 3 4 7 11 10 Number of input values ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 17 Search routine specification procedure Search (Key : ELEM ; T: ELEM_ARRAY; Found : in out BOOLEAN; L: in out ELEM_INDEX) ; Pre-condition -- the array has at least one element T FIRST <= T LAST Post-condition -- the element is found and is referenced by L ( Found and T (L) = Key) or -- the element is not in the array ( not Found and not ( exists i, T FIRST >= i <= T LAST, T (i) = Key )) ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 20 Slide 18 Inputs which conform to the pre-conditions Inputs where a pre-condition does not hold Inputs where the key element is a member of the array Inputs where the key element is not a member of the array Search routine - input partitions