4
© 2003 John D. McGregor
Selecting test cases
 Input-based
•Analyze the data types of parameters and variables based on the problem domain
•Partition into “equivalence classes”
•Select inputs from each equivalence class
•setTemperature(int degrees) if the domain refers to water, the equivalence classes might be degrees<32; 32<=degrees<=212;degrees>212
•We assume that any value between 32 and 212 will cause the program to use the same mechanism so if one value is computed correctly then all will be
•
•
•
 Output-based
•Based on possible outcomes
•Win game
•Lose game
•Select test data to achieve these outcomes