Unit 5: Black Box Testing Techniques.
Mrs. S. S. Sant
Lecturer in Computer Engineering
Government Polytechnic Pune
Software Testing
Course Outcome
• Apply various software testing methods.
Learning Outcome
• Describe Various Testing Techniques.
Black Box Testing Techniques
Black Box Testing
Requirement Based Testing
Boundary Value Analysis
,
Equivalence Partitioning
Positive and Negative testing
Decision tables
User documentation testing
Requirement Based Testing
• In this testing test cases, conditions and data
are derived from requirements.
• It includes functional tests and also non-
functional attributes such as performance,
reliability or usability.
Stages in Requirements based Testing:
• Defining Test Completion Criteria - Testing is completed only when all the
functional and non-functional testing is complete.
• Design Test Cases - A Test case has five parameters namely the initial state or
precondition, data setup, the inputs, expected outcomes and actual outcomes.
• Execute Tests - Execute the test cases against the system under test and
document the results.
• Verify Test Results - Verify if the expected and actual results match each other.
• Verify Test Coverage - Verify if the tests cover both functional and non-
functional aspects of the requirement.
• Track and Manage Defects - Any defects detected during the testing process
goes through the defect life cycle and are tracked to resolution. Defect Statistics
are maintained which will give us the overall status of the project.
Boundary Value Analysis
• Boundary testing is the process of testing between extreme ends or
boundaries between partitions of the input values.
• So these extreme ends like Start- End, Lower- Upper, Maximum-Minimum,
Just Inside-Just Outside values are called boundary values and the testing is
called "boundary testing".
• The basic idea in boundary value testing is to select input variable values at
their:
• Minimum
• Just above the minimum
• A nominal value
• Just below the maximum
• Maximum
Boundary Value Analysis Example
Equivalence Partitioning
• Equivalence partitioning is also known as “Equivalence Class
Partitioning”.
• In this method, the input domain data is divided into different
equivalence data classes – which are generally termed as ‘Valid’
and ‘Invalid’.
• The inputs to the software or system are divided into groups
that are expected to exhibit similar behavior.
• Thus, it reduces the number of test cases to a finite list of
testable test cases covering maximum possibilities.
Equivalence Partitioning Example
Positive and Negative testing
Positive Testing is a type of testing which is performed on a software
application by providing the valid data sets as an input. It checks whether the
software application behaves as expected with positive inputs or not. Positive
testing is performed in order to check whether the software application does
exactly what it is expected to do.
For example –
There is a text box in an application which can accept only numbers. Entering
values up to 99999 will be acceptable by the system and any other values apart
from this should not be acceptable. To do positive testing, set the valid input
values from 0 to 99999 and check whether the system is accepting the values.
Negative Testing is a testing method performed on the software application by
providing invalid or improper data sets as input. It checks whether the software
application behaves as expected with the negative or unwanted user inputs. The
purpose of negative testing is to ensure that the software application does not crash
and remains stable with invalid data inputs.
Negative testing can be performed by entering characters A to Z or from a to z.
Either software system should not accept the values or else it should throw an error
message for these invalid data inputs.
In both the testing, the following needs to be considered:
•Input data
•An action which needs to be performed
•Output Result
Decision tables
A Decision Table is a tabular representation of inputs versus rules/cases/test
conditions. It is a very effective tool used for both complex software testing and
requirements management. Decision table helps to check all possible
combinations of conditions for testing and testers can also identify missed
conditions easily. The conditions are indicated as True(T) and False(F) values.
Example 1: How to make Decision Base Table for Login Screen
Let’s create a decision table for a login screen.
The condition is simple if the user provides correct username and password
the user will be redirected to the homepage. If any of the input is wrong, an
error message will be displayed.
Legend:
•T – Correct username/password
•F – Wrong username/password
•E – Error message is displayed
•H – Home screen is displayed
Conditions Rule 1 Rule 2 Rule 3 Rule 4
Username
F T F T
(T/F)
Password
F F T T
(T/F)
Output (E/H) E E E H
User documentation testing
Types of Testing Documents Description
Test policy It is a high-level document which describes principles, methods and all the important testing goals of the organization.
Test strategy A high-level document which identifies the Test Levels (types) to be executed for the project.
Test plan A test plan is a complete planning document which contains the scope, approach, resources, schedule, etc. of testing activities.
Requirements Traceability Matrix This is a document which connects the requirements to the test cases.
Test Scenario Test scenario is an item or event of a software system which could be verified by one or more Test cases.
Test case It is a group of input values, execution preconditions, expected execution postconditions and results. It is developed for a Test Scenario.
Test Data Test Data is a data which exists before a test is executed. It used to execute the test case.
Defect Report Defect report is a documented report of any flaw in a Software System which fails to perform its expected function.
Test summary report Test summary report is a high-level document which summarizes testing activities conducted as well as the test result.