Presentation is loading. Please wait.

Presentation is loading. Please wait.

Com1040 Systems Design and Testing Part II – Testing (Based on A.J. Cowling’s lecture notes) LN-Test5: Category-Partition Method Marian Gheorghe ©University.

Similar presentations


Presentation on theme: "Com1040 Systems Design and Testing Part II – Testing (Based on A.J. Cowling’s lecture notes) LN-Test5: Category-Partition Method Marian Gheorghe ©University."— Presentation transcript:

1 Com1040 Systems Design and Testing Part II – Testing (Based on A.J. Cowling’s lecture notes) LN-Test5: Category-Partition Method Marian Gheorghe ©University of SheffieldCom1040 - Testing

2 Category-partition testing method - recap Category-partition for relationships between sets of items Principles to build test sets are identified Summary

3 Category-partition principles - recap The method relies on –identifying properties of data and program behaviour –defining partitions according to properties identified The method, a black box approach, has three basic steps: – Construct test cases for the preconditions associated to functions: two partitions – values satisfying conditions & the other values; the first class is further analysed in the next step –Construct test cases for the individual sets of items –Construct test cases for the relationships between sets of items involved in the function (First two studied in the last lecture; the third presented now)

4 Size and position categories Operations with data may lead to various properties of the data set: When a set is displayed then, if there is no upper limit, the following three partitions are considered –empty set –set containing one element –set with more than one element The above characteristic refers to the size of a set of values and is called size category When an item is selected or it is added to a set then the order of elements can be considered – position category. For selection the empty set and the set with one element remain the same, but the case of more than one element will change: –selected element is the first –selected element is the last –selected element is in between

5 Testing relationships between sets This is the third step in building test sets using category partition First two steps involve single sets of data Some use cases deal with multiple sets and relations between them (associations, aggregations etc); in this case the method is applied for each data set and then the relationships are considered Relationships can be viewed as pairs of data; hence need to partition the set of these pairs With respect to the size of this set, we have the following usual possibilities: –the set is empty –the set with one pair –the set with multiple pairs (very rare)

6 Relationships – example (1-to-many) StaffMemberStudents Supervision 1 * Marian GheorgheMatthew Cotton Supervision Tiffany Fung David McNair A one-to-three instance of the relationship defining the group of aerospace tutees MG’s has.

7 Relationships – example (1-to-0/1) LectureRoomLecture TimeTable 1 0..1 SG LT17; Monday 3-5pmCom1040: Crossover TimeTable SG LT17; Monday 3-5pm ? When a lecture is scheduled there is an association, when it’s cancelled there isn’t any

8 Relationships – example (1-to-1) StaffMemberUCard Identification 1 1 M.Gheorghe001178514 M Gheorghe is identified by his Ucard no Identification

9 Types of operations with relationships Irrespective of the multiplicity involved, the pairs of elements manipulated by a function implementing a use case, are subject to two different type of operations: Navigate through the relationship: elements from the two sets forming the relationship are identified maybe modified, but the relationship remains the same Add and/or delete elements participating in the relationship; in this case the relationship will change its previous multiplicity When a change is implied this might be preceded by a navigation, hence the test sets will be a combination of these two operations

10 Navigating a relationship There are two categories: size and position. The size category leads to considering for 1-1 relationship only one element is enough – one testing partition (see the example) for 1-to-0/1, there are two partitions (see the example) for 1-to-many, there are three partitions (no relation, a 1-to-1, and 1-to-any – see the example with three) When the associated element is from an ordered set, the position category is considered; for example for one element we have three cases: the element is the first, last, in between – consider the Ucard number Additionally the type of the partition should be tested as well

11 Add and/or remove operations for 1-to-1 relationship, add and remove must be applied both to keep the relationship: M Gheorghe will change the UCard no by firstly removing the old and adding a new one for 1-to-0/: removing an element leads to 0 links; adding one element to 0 leads to a pair with one element, when 1-to-1 and add one leads to error, but needs tested -> three testing situations for 1-to-many apply the principle of size category

12 Combining categories Navigation: test partition related to finding the first element of the association is combined with the test sets for the association relationship and with finding the second element of the pair Navigation followed by deletion: the selection of the first element and the navigation generate test sets as above; these are combine with the test set for removing For adding a pair we consider the union of the test cases for selecting an element in the first set and one from the second; this will be combined with test cases for adding a new pair

13 Category-partition considered for relationships between items Principles of category-partitions identified for simple sets are combined with various situations involving pairs Conclusions


Download ppt "Com1040 Systems Design and Testing Part II – Testing (Based on A.J. Cowling’s lecture notes) LN-Test5: Category-Partition Method Marian Gheorghe ©University."

Similar presentations


Ads by Google