You are reading the article What Is Domain Testing In Software Testing? (With Example) updated in September 2023 on the website Benhvienthammyvienaau.com. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested October 2023 What Is Domain Testing In Software Testing? (With Example)
What is Domain Testing?
Domain Testing is a Software Testing process in which the application is tested by giving a minimum number of inputs and evaluating its appropriate outputs. The primary goal of Domain testing is to check whether the software application accepts inputs within the acceptable range and delivers required output.
It is a Functional Testing technique in which the output of a system is tested with a minimal number of inputs to ensure that the system does not accept invalid and out of range input values. It is one of the most important White Box Testing methods. It also verifies that the system should not accept inputs, conditions and indices outside the specified or valid range.
Domain testing differs for each specific domain so you need to have domain specific knowledge in order to test a software system.
In this tutorial, you will learn-
Simpler Practice of Domain TestingIn domain testing, we divide a domain into sub-domains (equivalence classes) and then test using values from each subdomain. For example, if a website (domain) has been given for testing, we will be dividing the website into small portions (subdomain) for the ease of testing.
Domain might involve testing of any one input variable or combination of input variables.
Practitioners often study the simplest cases of domain testing less than two other names, “boundary testing” and “equivalence class analysis.”
Boundary testing – Boundary value analysis (BVA) is based on testing at the boundaries between partitions. We will be testing both the valid and invalid input values in the partition/classes.
Equivalence Class testing – The idea behind this technique is to divide (i.e. to partition) a set of test conditions into groups or sets that can be considered the same (i.e. the system should handle them equivalently), hence ‘equivalence partitioning.’
That simplified form applies for Domain testing –
Only to tests of input variables
Only when tested at the system level
Only when tested one at a time
Only when tested in a very superficial way
It can be simplified as below:
Variable
Valid Class Equivalence Class
Invalid Class Equivalence Class
Boundaries & Special cases
Notes
X
0-100
0
100
<0
-1
>100
101
Explanation:
If a field accepts ranges from 0-100, the field should not accept -1 and 101 as they are invalid entries and beyond the boundaries.
The field should accept values such as 0,100 and any number between them.
Building table like these (in practice)
The table should eventually contain all variables. This means, all input variables, all output variables, and any intermediate variables that you can observe.
In practice, most tables that I have seen are incomplete. The best ones seen list all the variables and add detail for critical variables.
Domain Testing StrategyWhile domain testing, you need to consider following things,
What domain are we testing?
How to group the values into classes?
Which values of the classes to be tested?
How to determine the result?
What domain are we testing?
Any domain which we test has some input functionality and an output functionality. There will be some input variables to be entered, and the appropriate output has to be verified.
Domain Testing Example
Consider a single input test scenario:
C = a+b, where a and b are input variables and C is the output variable.
Here in the above example, there is no need of classification or combination of the variables is required.
Consider the below multiple inputs and appropriate output scenario:
Consider a games exhibition for Children, 6 competitions are laid out, and tickets have to be given according to the age and gender input. The ticketing is one of the modules to be tested in for the whole functionality of Games exhibition.
According to the scenario, we got six scenarios based on the age and the competitions:
Age<5, both boys and girls should participate in Rhymes Competition.
Here the input will be Age and Gender and hence the ticket for the competition will be issued. This case partition of inputs or simply grouping of values come into the picture.
How to group the values into classes?
Partitioning some values means splitting it into non-overlapping subsets.
As we discussed earlier there are two types of partitioning:
Equivalence partitioning – Equivalence partitioning is a software testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases can be derived. In principle, test cases are designed to cover each partition at least once.
Boundary value analysis – Boundary value analysis is a software testing technique in which tests are designed to include representatives of boundary values in a range. The idea comes from the boundary.
For the above example, we are partitioning the values into a subset or the subset. We are partitioning the age into the below classes :
Class 1: Children with age group 5 to 10
Class 2 : Children with age group less than 5
Class 3: Children with age group age 10 to 15
Class 4: Children with age group greater than 15.
Which values of the classes to be tested?
The values picked up for testing should be Boundary values:
Boundaries are representatives of the equivalence classes we sample them from. They’re more likely to expose an error than other class members, so they’re better representatives.
The best representative of an equivalence class is a value in between the range.
For the above example we have the following classes to be tested:
For example for the scenario #1:
Boundary values:
Values should be Equal to or lesser than 10. Hence, age 10 should be included in this class.
Values should be greater than 5. Hence, age 5 should not be included in this class.
Values should be Equal to or lesser than 10. Hence, age 11 should not be included in this class.
Values should be greater than 5. Hence, age 6 should be included in this class.
Equivalence partition Values:
Equivalence partition is referred when one has to test only one condition from each partition. In this, we assume that if one condition in a partition works, then all the condition should work. In the same way, if one condition in that partition does not work then we assume that none of the other conditions will work. For example,
Scenario
Boundary values to be taken
Equivalence partitioning values
Input age = 6
Input age = 5
Input age = 11
Input age = 10
Input age = 8
Input age = 6
Input age = 5
Input age = 11
Input age = 10
Input age = 8
Input age = 11
Input age = 10
Input age = 15
Input age = 16
Input age = 13
Input age = 11
Input age = 10
Input age = 15
Input age = 16
Input age = 13
Age<=5
Input age = 4
Input age = 5
Input age = 3
Input age = 15
Input age = 16
Input age = 25
How do we determine whether the program passed or failed the test?
Passing the functionality not only depends upon the results of the above scenarios. The input given and the expected output will give us the results and this requires domain knowledge.
Determining the results of the example:
Hence, if all the test cases of the above pass, the domain of issuing tickets in the competition get passed. If not, the domain gets failed.
Domain Testing StructureUsually, testers follow the below steps in a domain testing. These may be customized/ skipped according to our testing needs.
Identify the potentially interesting variables.
Identify the variable(s) you can analyze now and order them (smallest to largest and vice versa).
Create and identify boundary values and equivalence class values as above.
Identify secondary dimensions and analyze each in a classical way. (In the above example, Gender is the secondary dimension).
Identify and test variables that hold results (output variables).
Evaluate how the program uses the value of this variable.
Identify additional potentially-related variables for combination testing.
Imagine risks that don’t necessarily map to an obvious dimension.
Identify and list unanalyzed variables. Gather information for later analysis.
Summarize your analysis with a risk/equivalence table.
Summary:Domain testing, as it is described above, requires knowledge of providing right input to achieve the desired output. Thus, it is only possible to use it for small chunks of code.
You're reading What Is Domain Testing In Software Testing? (With Example)
Update the detailed information about What Is Domain Testing In Software Testing? (With Example) on the Benhvienthammyvienaau.com website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!