Function_testing
Function_testing
Functional Testing
Contents
• Functional Testing
• Boundary Value Analysis(BVA)
• Equivalence Class Testing
• Decision Table Based Testing
• Cause –Effect Graphing Technique
Function Testing
• Functional testing techniques attempt to design those test cases which have a higher probability of making a
software fail. These techniques also attempt to test every possible functionality of the software. Test cases are
designed on the basis of functionality and the internal structure of the program is completely ignored.
• Observed output(s) is (are) compared with expected output(s) for selected input(s) with preconditions, if any.
The software is treated as a black box and therefore, it is also known as black box testing.
Software under
Test
Output Domain
Input Domain
Boundary Value Analysis(BVA)
• we concentrate on input values and design test cases with input values that are on or close to
boundary values. Experience has shown that such test cases have a higher probability of detecting a
fault in the software.
• Suppose there is a program ‘Square’ which takes ‘x’ as an input and prints the square of ‘x’as
output. The range of ‘x’ is from 1 to 100. One possibility is to give all values from 1 to 100 one by
one to the program and see the observed behavior. We have to execute this program 100 times to
check every input value.
• In boundary value analysis, we select values on or close to boundaries and all input values may
have one of the following:
(i) Minimum value
(ii) Just above minimum value
(iii) Maximum value
(iv) Just below maximum value 1 2 50 99 100
(v) Nominal (Average) value
Boundary Value Analysis(BVA)
• The number of inputs selected by this technique is 4n + 1 where ‘n’ is the number of
inputs. One nominal value is selected which may represent all values which are neither
close to boundary nor on the boundary.
I1 0 Invalid input
I2 50 2500
Password F F T T
Format .jpg .jpg .jpg .jpg Not .jpg Not .jpg Not .jpg Not .jpg
1.You can upload only '.jpg' format image Size Less than Less than >= 32kb >= 32kb Less than Less than >= 32kb >= 32kb
32kb 32kb 32kb 32kb
2.file size less than 32kb
3.resolution 137*177.
resolution 137*177 Not 137*177 Not 137*177 Not 137*177 Not
137*177 137*177 137*177 137*177
• A tourist of age greater than 21 years and having a clean driving record is supplied a
rental car. A premium amount is also charged if the tourist is on business, otherwise it is
not charged. If the tourist is less than 21 year old, and does not have a clean driving
record, the system will display the following message: “Car cannot be supplied” Draw the
cause-effect graph and generate test cases.
• The cause are : - C1: Age is over 21 C2: Driving record is clean C3: Tourist is on
business
• The effects are :- e1: Supply a rental car without premium charge
e2: Supply a rental car with premium charge e3: Car can not be supplied
CAUSE-EFFECT GRAPHING TECHNIQUE(Example)
• The cause-effect graph is shown in Figure
CAUSE-EFFECT GRAPHING TECHNIQUE(Example)