Download presentation
Presentation is loading. Please wait.
Published byJoshua Logan Modified over 8 years ago
1
Introduction to Domain Testing
2
2 What is Domain Testing? Domain testing is: one of several software testing techniques designed to help you find bugs in programs. a systematic approach for reducing an enormous test data set to few manageable test data subsets, and further reducing each of these sub-sets to few best representatives (best test cases). a proven way to manage risk and reduce the testing effort (time, money, labor, other resources).
3
3 Domain testing-Terminology Domain Testing: a technique to systematically reduce the set of all possible values to few manageable subsets. In domain testing, we partition an input domain into equivalence classes and choose few test cases from each class. Input Domain: set of all possible values that can be ever inputted to an input variable. Partitioning: dividing a set into non-overlapping subsets, usually on the basis of some major property or characteristic. Equivalence Class: All members of an equivalence class are equivalent with respect to some risk, but the classification could be imperfect. This analysis is called equivalence class analysis.
4
4 Domain testing-Terminology Boundary value analysis: This analysis helps us in selecting one or more best representatives from each equivalence class. These are values on the boundary and values just beyond the boundary values. The best representatives are the test cases. In domain testing, we partition an input domain into equivalence classes and choose a few test cases (typically boundaries) from each class.
5
5 Domain testing-Terminology Risk: It is an assertion about how a program could fail. Test case: A test case is a combination of values of input variables of a program that is used to test the program against one or more risks. When considering one variable, every value that you would test the variable for, is a test case for that variable.
6
6 Summary Our goal is to not only do effective testing but to reduce the testing effort, which includes cost, labor, time, etc… We will learn how domain testing can help us in achieving this goal.
7
7 Examples – Simple Case
8
8 Testing Numeric fields We encounter numeric fields everyday everywhere. Money, Bank account number, Credit card number, Student ID number, Number of hours you work in a week, Salary, Pay rate, Number of computers you own, Number of courses you have taken, Your bank balance, Number of calories consumed in a day, Number of bugs reported, Number of reservations, Time frame within which a satellite should be launched, Time to finish a project, so on and so forth are all examples of numeric fields.
9
9 Testing Integer fields Example 1: An integer field/variable ‘x’ can take values in the range –99 and 99, the end-points being inclusive. Develop a series of tests by performing equivalence class analysis and boundary value analysis on this variable.
10
10 Testing Integer fields Example 1 Step 1: Represent this variable as a mathematical range expression.
11
11 Testing Integer fields Example 1 -99 <= x <=99 This is inclusive (or closed-ended) from both sides (right and left).
12
12 Testing Integer fields Example 1 Step 2: Determine what the input domain is.
13
13 Testing Integer fields Example 1 The input domain is the set of all possible values that can ever be inputted to the variable ‘x’.
14
14 Testing Integer fields Example 1 Step 3: Identify the risks associated with the variable.
15
15 Testing Integer fields Example 1 Failure to process values between –99 and 99 correctly Mishandling of values less than –99 Mishandling of values greater than 99 There are other risks that we will consider, but the ones listed here are the ones most often considered in domain testing.
16
16 Testing Integer fields Example 1 Step 4: Partition the input domain into equivalence classes based on the risks identified.
17
17
18
18 World Problems Example 2: The passing score for any course at ZLTech is 60/100. If a student scores less than 60 for a course, the student gets an ‘F’ grade in the course. What variables could be involved in analysis of this group of facts? What variable do we know enough about to perform equivalence class analysis and then a boundary value analysis? Develop a series of tests by performing equivalence class analysis and boundary value analysis on this variable. Assume integer values.
19
19 World Problems Example 2 Step 1: What variables could be involved in analysis of this group of facts?
20
20 World Problems Example 2 Student_name, student_number, passing_score, student_score, course_name, grade.
21
21 World Problems Example 2 Step 2: What variable do we know enough about to perform equivalence class analysis and then a boundary value analysis?
22
22 World Problems Example 2 ‘student_score’
23
23 World Problems Example 2 Step 3: Represent this variable as a mathematical range expression.
24
24 World Problems Example 2 60 <= student_score <=100 This is inclusive from both ends.
25
25 World Problems Example 2 Step 4: Determine what the input domain is.
26
26 World Problems Example 2 The input domain is the set of all possible values that can ever be inputted to the variable ‘student_score’.
27
27 World Problems Example 2 Step 5: Identify the risks associated with the variable.
28
28 World Problems Example 2 Failure to give a student F in a course with score less than 60 Assigning F to a student in a course with score 60 and greater. Mishandling of scores above 100 Mishandling of negative scores. There are other risks that we will consider later, but the ones listed here are the ones most often considered in domain testing.
29
29 World Problems Example 2 Step 6: Partition the input domain into equivalence classes based on the identified risks.
30
30
31
31 Identifying variables of a given program First, you identify the various functions of the application. Second, you take up each individual function and identify the variables/fields of the function. Third, you take up each variable and develop a series of tests for it by performing equivalence class and boundary value analysis on it, just as we have been doing so far in all the examples we have seen and the exercises you have solved. Fourth, you perform combination testing of independent variables of the function and test dependent variables separately. We shall look at combination testing later.
32
32 Identifying variables of a given program Example 3: For each of the following dialog boxes, identify variables. For each variable, identify its data type and state whether it is an input or output variable.
33
33 Identifying variables of a given program Example 3 When you open Microsoft PowerPoint, you are presented the following dialog window:
34
34 Identifying variables of a given program Example 3 What are the input variables of this function?
35
35 Identifying variables of a given program Example 3 Input variables Create a new presentation using (radio buttons, enumerated) Don’t show this dialog box again (checkbox, enumerated) Open an existing presentation (non-editable list box, enumerated)
36
36 Identifying variables of a given program Example 3 What are the output variables of this function?
37
37 Identifying variables of a given program Example 3 Output variables No obviously visible output variables.
38
38 Thanks
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.