Chapter - 23 - Testing Conventional Applications - Black Box
Chapter - 23 - Testing Conventional Applications - Black Box
QUALITY
ENGINEERING
(SQE)
Chapter 23 Testing Conventional
1
Applications
SOFTWARE
2
TESTING
FUNDAMENTAL
S
The goal of testing is to find errors, and a good test is
one that has a high probability of finding errors.
Software Testability is simply how easily a
computer program can be tested.
Test Characteristics: Following are the attributes of
a “good” test
A good test has a high probability of finding an error
A good test is not redundant.
A good test should be “best of breed”
A good test should be neither too simple nor too
complex
3
INTERNAL AND
4
EXTERNAL
VIEWS OF
TESTING
Black-box vs White-box Testing vs Grey Box
Testing
Any engineered product can be tested in one of three ways:
6
7
BLACK-BOX
TESTING
Black Box Testing is a software testing method in which the
functionalities of software applications are tested without having
knowledge of internal code structure, implementation details and
internal paths.
Black Box Testing mainly focuses on input and output of software
applications and it is entirely based on software requirements and
specifications.
10
Example of ECP
As present in the below image, an “AGE” text field accepts only the
numbers from 18 to 60. There will be three set of classes or groups.
Two invalid classes will be:
a) Less than or equal to 17.
b) Greater than or equal to 61.
11
BLACK-BOX
12
TESTING
TECHNIQUES
2. Boundary Value Analysis (BVA)
In this technique we focus on the values at
boundaries as it is found that many applications have
a high amount of issues on the boundaries.
Boundary means the values near the limit where the
behavior of the system changes.
In boundary value analysis both the valid inputs and
invalid inputs are being tested to verify the issues.
13
Example of BVA
14
BLACK-BOX
15
TESTING
TECHNIQUES
3. Decision Table Testing (DTT)
As the name itself suggests that, wherever there are
logical relationships like:
If
{
(Condition = True)
then action1 ;
}
else action2; /*(condition = False)*/
Then a tester will identify two outputs (action1 and
action2) for two conditions (True and False). So
based on the probable scenarios a Decision table is
carved to prepare a set of test cases.
16
Example of DTT
Take an example of XYZ bank that provides interest rate for
the Male senior citizen as 10% and for rest of the people 9%.
19
Elements of State Transition Diagram
20
How to Make a State Transition Diagram.
Example:
Let’s consider an ATM system function where if the
user enters the invalid password three times, the
account will be locked.
In this system, if the user enters a valid password in
any of the first three attempts the user will be logged
in successfully. If the user enters the invalid password
in the first or second try, the user will be asked to re-
enter the password. And finally, if the user enters
incorrect password 3rd time, the account will be
blocked.
21
State Transition Diagram of the scenario discussed
in prev. slide
Transition: blue
and black arrows
are showing
transition.
Events: Incorrect
22
Pin, Correct PIN.
State Transition Table of the same scenario
Events
States
Correct PIN Incorrect PIN
S1: Start - -
S2: 1st Try S5 S3
S3: 2nd Try S5 S4
S4: 3rd Try S5 S6
S5: Access Granted - -
S6: Account Blocked - -
23
BLACK-BOX
24
TESTING
TECHNIQUES
5. Error Guessing Testing
This is a classic example of experience based
testing.
In this technique, the tester can use his/her
experience about the application behavior and
functionalities to guess the error-prone areas.
Many defects can be found using error
guessing where most of the developers usually
make mistakes.
25
Examples of Error Guessing
29
Example of OAT
Let us consider you have to identify the test cases for a Web
Page that has 4 sections: Headlines, Details, References and
Comments, that can be displayed or not displayed or show
Error message. You are required to design the test condition to
test the interaction between different sections.
In this case:
30
The array is L9 orthogonal, because all possible pair-wise
combinations between parameters occurs only once.
31
5. Now, map this array with our requirements as below:
1 will represent “Is Displayed” value
2 will represent “not displayed” value
3 will represent “error message value”
Factor A will represent “ Headlines” section
Factor B will represent “Details” section
Factor C will represent “References ”section
Factor D will represent “Comment” section.
Experiment no. will represent “Test Cases ID”
32
TC_ID
7. Based on the table above, design your test cases. Also look out
for the special test cases / left over test cases.
33