Intended explicitly for defect DETECTION (not correction).
Defects may be logical errors, anomalies in the code that might indicate an erroneous condition (e.g., an uninitialised variable) or non-compliance with standards.
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 > 99,999.
Choose test cases at the boundary of these sets:
9999, 10000, 10001,99998,99999, 100000
Equivalence Partitioning
42.
Search Routine Specification procedure Search (Key : INTEGER ; T: array 1..N of INTEGER; Found : BOOLEAN; L: 1..N) ; Inputs T: array of N integers, N >= 1. Key: integer. Outputs Found: Boolean. L: integer, 1<=L<=N. If there exists an index i such that T[i]=Key then Found=true and T[L]=Key; otherwise, Found=false and L=N.
43.
Search Routine - Input Partitions Array 1 element 1 element 2 elements 2 elements 3 elements 3 elements 3 elements Element in array not in array first element last element First element middle element last element
Be the first to comment