0% found this document useful (0 votes)
13 views22 pages

BlackBoxTesting 2024-TELU

Uploaded by

Destu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views22 pages

BlackBoxTesting 2024-TELU

Uploaded by

Destu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Theory and Practice of Software

Testing

PERFORMING BLACK BOX


TESTING
Black-box testing
◼ An approach to testing where the program is
considered as a ‘black-box’
◼ Also called Functional Testing or Behavioral
Testing
◼ Focus on determining whether or not a program
does what it is supposed to do based on its
functional requirements
Black Box vs White Box
◼ Is not an alternative to white box testing, rather it
is a complementary approach that is likely to
uncover a different class of errors than white box
methods
Black Box Vs White Box
◼ Black box testing is testing that ignores the
internal mechanism of a system or component
and focuses solely on the outputs generated in
response to selected inputs and execution
conditions.

◼ White box testing (also called structural testing


and glass box testing) is testing that takes into
account the internal mechanism of a system or
component.
Objective Black Box Testing
Black box testing tends to find different kinds of
errors :
(1) incorrect or missing functionality;
(2) interface errors;
(3) errors in data structures used by interfaces;
(4) behavior or performance errors;
(5) initialization and termination errors

Most organizations have independent testing groups to


perform black box testing. These testers are not the
developers and are often referred to as third-party
testers. output should be for a given input into the
program
Black-box testing principles

A black-box test takes into account


only the input and output of the
software without regard to the
internal code of the program.
Black Box Testing
Inputs causing
anomalous
Input test data I behaviour
e

System

Outputs which reveal


the presence of
Output test results Oe defects
Anatomi Tabel Test Case
Contoh Poor Test Case
Contoh Good Test Case
Strategy Black Box Testing
◼ Test of User Requirement / Specification
◼ Equivalence Partitioning
◼ Boundary Value Analysis / Limit Testing
◼ Decision Table
◼ Cause Effect Graph
◼ Error Guessing
◼ etc
Test Of User Requirement
Equivalence Partitioning
◼ Divide the input domain into classes of data for
which test cases can be generated, based on
equivalence classes for input conditions
◼ An equivalence class can represent a set of valid
or invalid states
◼ Each of these classes is an equivalence partition
where the program behaves in an equivalent way
for each class member
Equivalence partitioning

Invalid inputs Valid inputs

System

Outputs
General Rules in EQP
Equivalence classes can be defined by :
A. If an input condition specifies a range or a spesific
value, 1 valid and 2 invalid equivalence class defined
Ex: [1..999]
• Valid Test Case : 1 value in range
• Invalid Test Case : 2 value out of range, < bottom
bound, > upper bound
General Rule in EQ

B. If an input condition specifies a boolean or a member of a


set, 1 valid and 1 invalid equivalence class defined

Ex : [ red, blue, yellow]


• Valid Test Case : 1 value in domain
• Invalid Test Case : 1 value out of domain
Example
Requirement of subprogram to be tested
IS : The subprogram takes an integer input
in the range [-100,100]
FS : Output is the sign of the input value
(value 0 is considered positive)
Boundary Value Analysis (BVA)
◼ A kind of BBT that complements equivalence
partitioning
◼ Focus of the testing is on the boundaries of the
input domain
◼ If input condition specifies a range bounded by
a certain values, say, a and b, then test cases
should include
◼ The values for a and b
◼ The values just above and just below a and b → (a-
1), (a+1), (b-1), (b+1)
Boundary Value Analysis
3 11
4 7 10

Less than 4 Between 4 and 10 More than 10

Number of input values

9999 100000
10000 50000 99999

Less than 10000 Between 10000 and 99999 More than 99999

Input values
Boundary Value Analysis (BVA)
◼ If an input condition specifies a number of
values N, test cases should be exercise
◼ the numbers (N),
◼ the values just above and just below the values
: (N-1) & (N+1)
Decision Table
◼ Decision Table are used to record a
complex bussiness rules that must be
implemented in the program, therefore
must be tested
Example Decision Table

You might also like