Lecture 8-Input space partitioning Flashcards
What are 4 characteristics of input domain?
-Even for small programs, input domain is so large that might be infinite
-Input PARAMETERS define scope of input DOMAIN
-Domain for each input parameter is partitioned into regions
-At least one value is chosen from each region
What is the input domain?
It consists of all possible inputs that could be take by the program.
What is the test selection problem(ideally & in practice) ?
Ideally : To select a subset T of the input domain so that the execution of T will reveal ALL ERRORS.
In practice: To select a subset T within the budget so it reveals as many errors as possible.
What is partitioning?
It defines a set of equivalent classes , or blocks. –> all the members in an equivalence class contribute to error detection in the same way.
What is a partition usually based on?
On a certain characteristic:
-if a list of integer is sorted or not
-if a list allows duplicates or not
What do we do in partitioning ?
1.Partition the input domain into a relatively small number of groups.
2.Select one representative from each group.
What are the 2 properties of partitioning?
Completeness:
-The partition must cover the entire domain.
Disjointness:
-The blocks must not overlap.
*If neither , it means that the partitions have not been considered carefully enough.
What are the 4 steps of Input Domain Modelling (IDM)?
- Identify testable components (method, use case , entire system)
2.Identify ALL parameters that affect the behaviour of a component
3.Identify characteristics + create partitions for each of them.
4.Select values from each partition + combine them to create tests.
What are the 2 IDM approaches?
-Interface-Based IDM
-Functionality-Based IDM
What is the main idea of Interface-based IDM?
To develop characteristics directly from INPUT PARAMETERS.
What is the advantage (1) and disadvantages(2) of Interface-based IDM?
Advantage :
-relatively easy to identify characteristics.
Disadvantage:
-IDM may be incomplete –> additional characteristics needed
-Not all info reflected in interface –> may require parameters in combination
What is the range of Interface-based IDM?
One class with values inside the range
Two with values outside of range.
What is the string of Interface-based IDM?
AT LEAST :
-One with all legal strings
-One with all illegal strings.
What is the enumeration of Interface-based IDM?
Each value in a separate class.
What is the array of Interface-based IDM?
One class with all legal arrays
One with only empty array
One with arrays larger than expected size