Software Testing
 Assessing / Measuring the software to determine its
“Quality”.
 One of the KPA of project life cycle in ensuring quality
of software.
What is Quality?
 Bug-free product.
 Fit to use on-spot.
 Produced as per the pre-defined specifications.
Testing Techniques
 Structural & Functional
 V&V
 Static & Dynamic
 White-Box & Black-Box
Structural and Functional Testing
 Structural testing is a type of software testing which
uses the internal design of the software for
testing or in other words the software testing which is
performed by the team which knows the development
phase of the software, is known as structural testing.
 Functional testing is a quality assurance process and a
type of black-box testing that bases its test cases on
the specifications of the software component under
test. Functions are tested by feeding them input and
examining the output, and internal program structure
is rarely considered.
V & V Testing
Static and Dynamic testing
 Static Testing is a software testing technique which
is used to check defects in software application
without executing the code. Static testing is done to
avoid errors at an early stage of development as it is
easier to identify the errors and solve the errors.
 Dynamic testing is a term used in software
engineering to describe the testing of the dynamic
behavior of code. That is, dynamic analysis refers to
the examination of the physical response from the
system to variables that are not constant and change
with time.
Black – Box Testing
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.
 Mainly focuses on input and output of software
applications.
 Also known as Behavioral Testing.
Types of Black-Box Testing
 Functional testing – This black box testing type is related
to the functional requirements of a system; it is done by
software testers.
 Non-functional testing – This type of black box testing is
not related to testing of specific functionality, but non-
functional requirements such as performance, scalability,
usability.
 Regression testing – Regression Testing is done after code
fixes, upgrades or any other system maintenance to check
the new code has not affected the existing code.
Goal of Black-Box Testing
 “We do not code to determine a test suite, rather
knowing the problem that we try to solve.”
Black-Box Testing Techniques
 Random Testing
 Equivalence Partitioning
 Decision tables
 State-based testing
 Boundary Value Analysis
 Error Guessing
 Compatibility testing
Random Testing
 Random testing is a black-box software testing
technique where programs are tested by
generating random, independent inputs. Results
of the output are compared against software
specifications to verify that the test output is pass or
fail.
Equivalence Partitioning
 Equivalence partitioning or equivalence class
partitioning (ECP) 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.
Decision Table
 Decision Table Testing is a software testing
methodology used to test system behavior for
various input combinations. In this systematic
approach, the several input combinations and their
corresponding system behavior are represented in
tabular form.
State Based Testing
 State-based testing validates the expected
transformations that can occur within a class. Classes
are modeled using physical values assigned to the
attributes of the class.
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. Given that we have a set of test vectors
to test the system, a topology can be defined on that
set.
Error Guessing
 Error guessing is a type of testing method in which
prior experience in testing is used to uncover the
defects in software. It is an experience based test
technique in which the tester uses his/her past
experience or intuition to gauge the problematic areas
of a software application.
Compatibility Testing
 Compatibility Testing is a type of Software testing to
check whether your software is capable of
running on different hardware, operating systems,
applications, network environments or Mobile devices.
Compatibility Testing is a type of Non-functional
testing.
Procedure
 The foremost step is to understand the requirement specification of an
application. Properly documented SRS (Software Requirement
Specification) should be in place.
 Using the above mentioned Black Box Testing techniques such as
Boundary Value Analysis, Equivalence partitioning etc, sets of valid and
invalid inputs are identified with their desired outputs and test cases
are designed based on that.
 The designed test cases are executed to check if they Pass or Fail by
verifying the actual results with the expected results.
 Failed test cases are raised as Defects/Bugs and addressed to the
development team to get it Fixed.
 Further, based on the defects being fixed, the tester retests the defects
to verify if they are recurring or not.
Advantages of Black box Testing
 More effective on larger units of code than Glass Box
testing (White box testing).
 Tester needs no knowledge of implementation including
specific programming languages.
 Tester can be non technical
 This testing helps us to find and identify vagueness and
contradictions in functional specifications.
 Tests are done from user’s point of view.
Disadvantages of Black Box testing
 Test cases are challenging to design without having clear
functional specifications.
 There is a chance that program paths may left unchecked.
 More error prone as the tests cannot be directed towards specific
segments of code.
 There might be a chance that programmer might have already
committed certain amount of tests from his side, therefore,
unnecessary repetition of tests occurring.
 Suitable for small amount of test cases.
White Box Testing
White Box Testing
 White-box testing is a method of software testing that
tests internal structures or workings of an application,
as opposed to its functionality.
 In white-box testing an internal perspective of the
system, as well as programming skills, are used to
design test cases.
 Also known as Glass Box testing
White Box Testing (Contd.)
 Assumes that path of logic in a unit of the program is
already known to the user.
 Consists of testing paths, branch by branch and
produce predictable results.
 Focuses on internal knowledge of software to guide the
selection of test data.
White Box Testing Techniques
 Statement Coverage - Involves execution of all
statements of the source code at least once. It is
used to calculate the total number of executed
statements in the source code, out of total
statements present in the source code.
 Decision Coverage - This technique reports true
and false outcomes of Boolean expressions.
 Branch Coverage - Used to cover all branches of the
control flow graph.
White Box Testing Techniques
(Cont.)
 Data Flow Testing - Group of testing strategies that
examines the control flow of programs in order to
explore the sequence of variables according to the
sequence of events.
 Control Flow Testing - In this technique, a
particular part of a large program is selected by the
tester to set the testing path.
“Choose the combinations of techniques
appropriate for different types of
applications!!!”
Steps to perform
 UNDERSTAND THE SOURCE CODE
 CREATE TEST CASES AND EXECUTE
Goal
 The goal of White Box testing in software engineering
is to verify all the decision branches, loops, statements
in the code.
Advantages of White Box Testing
 Code optimization by finding hidden errors.
 White box tests cases can be easily automated.
 Testing is more thorough as all code paths are usually
covered.
 Testing can start early in SDLC even if GUI is not
available.
Disadvantages of White Box Testing
 White box testing can be quite complex and expensive.
 Developers who usually execute white box test cases detest
it. The white box testing by developers is not detailed can
lead to production errors.
 White box testing requires professional resources, with a
detailed understanding of programming and
implementation.
 White-box testing is time-consuming, bigger programming
applications take the time to test fully.
Difference
Difference (contd.)

White box & black box testing

  • 2.
    Software Testing  Assessing/ Measuring the software to determine its “Quality”.  One of the KPA of project life cycle in ensuring quality of software.
  • 3.
    What is Quality? Bug-free product.  Fit to use on-spot.  Produced as per the pre-defined specifications.
  • 4.
    Testing Techniques  Structural& Functional  V&V  Static & Dynamic  White-Box & Black-Box
  • 5.
    Structural and FunctionalTesting  Structural testing is a type of software testing which uses the internal design of the software for testing or in other words the software testing which is performed by the team which knows the development phase of the software, is known as structural testing.  Functional testing is a quality assurance process and a type of black-box testing that bases its test cases on the specifications of the software component under test. Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered.
  • 6.
    V & VTesting
  • 7.
    Static and Dynamictesting  Static Testing is a software testing technique which is used to check defects in software application without executing the code. Static testing is done to avoid errors at an early stage of development as it is easier to identify the errors and solve the errors.  Dynamic testing is a term used in software engineering to describe the testing of the dynamic behavior of code. That is, dynamic analysis refers to the examination of the physical response from the system to variables that are not constant and change with time.
  • 8.
  • 9.
    Black – BoxTesting  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.  Mainly focuses on input and output of software applications.  Also known as Behavioral Testing.
  • 10.
    Types of Black-BoxTesting  Functional testing – This black box testing type is related to the functional requirements of a system; it is done by software testers.  Non-functional testing – This type of black box testing is not related to testing of specific functionality, but non- functional requirements such as performance, scalability, usability.  Regression testing – Regression Testing is done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code.
  • 11.
    Goal of Black-BoxTesting  “We do not code to determine a test suite, rather knowing the problem that we try to solve.”
  • 12.
    Black-Box Testing Techniques Random Testing  Equivalence Partitioning  Decision tables  State-based testing  Boundary Value Analysis  Error Guessing  Compatibility testing
  • 13.
    Random Testing  Randomtesting is a black-box software testing technique where programs are tested by generating random, independent inputs. Results of the output are compared against software specifications to verify that the test output is pass or fail.
  • 14.
    Equivalence Partitioning  Equivalencepartitioning or equivalence class partitioning (ECP) 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.
  • 15.
    Decision Table  DecisionTable Testing is a software testing methodology used to test system behavior for various input combinations. In this systematic approach, the several input combinations and their corresponding system behavior are represented in tabular form.
  • 16.
    State Based Testing State-based testing validates the expected transformations that can occur within a class. Classes are modeled using physical values assigned to the attributes of the class.
  • 17.
    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. Given that we have a set of test vectors to test the system, a topology can be defined on that set.
  • 18.
    Error Guessing  Errorguessing is a type of testing method in which prior experience in testing is used to uncover the defects in software. It is an experience based test technique in which the tester uses his/her past experience or intuition to gauge the problematic areas of a software application.
  • 19.
    Compatibility Testing  CompatibilityTesting is a type of Software testing to check whether your software is capable of running on different hardware, operating systems, applications, network environments or Mobile devices. Compatibility Testing is a type of Non-functional testing.
  • 20.
    Procedure  The foremoststep is to understand the requirement specification of an application. Properly documented SRS (Software Requirement Specification) should be in place.  Using the above mentioned Black Box Testing techniques such as Boundary Value Analysis, Equivalence partitioning etc, sets of valid and invalid inputs are identified with their desired outputs and test cases are designed based on that.  The designed test cases are executed to check if they Pass or Fail by verifying the actual results with the expected results.  Failed test cases are raised as Defects/Bugs and addressed to the development team to get it Fixed.  Further, based on the defects being fixed, the tester retests the defects to verify if they are recurring or not.
  • 21.
    Advantages of Blackbox Testing  More effective on larger units of code than Glass Box testing (White box testing).  Tester needs no knowledge of implementation including specific programming languages.  Tester can be non technical  This testing helps us to find and identify vagueness and contradictions in functional specifications.  Tests are done from user’s point of view.
  • 22.
    Disadvantages of BlackBox testing  Test cases are challenging to design without having clear functional specifications.  There is a chance that program paths may left unchecked.  More error prone as the tests cannot be directed towards specific segments of code.  There might be a chance that programmer might have already committed certain amount of tests from his side, therefore, unnecessary repetition of tests occurring.  Suitable for small amount of test cases.
  • 23.
  • 24.
    White Box Testing White-box testing is a method of software testing that tests internal structures or workings of an application, as opposed to its functionality.  In white-box testing an internal perspective of the system, as well as programming skills, are used to design test cases.  Also known as Glass Box testing
  • 25.
    White Box Testing(Contd.)  Assumes that path of logic in a unit of the program is already known to the user.  Consists of testing paths, branch by branch and produce predictable results.  Focuses on internal knowledge of software to guide the selection of test data.
  • 26.
    White Box TestingTechniques  Statement Coverage - Involves execution of all statements of the source code at least once. It is used to calculate the total number of executed statements in the source code, out of total statements present in the source code.  Decision Coverage - This technique reports true and false outcomes of Boolean expressions.  Branch Coverage - Used to cover all branches of the control flow graph.
  • 27.
    White Box TestingTechniques (Cont.)  Data Flow Testing - Group of testing strategies that examines the control flow of programs in order to explore the sequence of variables according to the sequence of events.  Control Flow Testing - In this technique, a particular part of a large program is selected by the tester to set the testing path. “Choose the combinations of techniques appropriate for different types of applications!!!”
  • 28.
    Steps to perform UNDERSTAND THE SOURCE CODE  CREATE TEST CASES AND EXECUTE
  • 29.
    Goal  The goalof White Box testing in software engineering is to verify all the decision branches, loops, statements in the code.
  • 30.
    Advantages of WhiteBox Testing  Code optimization by finding hidden errors.  White box tests cases can be easily automated.  Testing is more thorough as all code paths are usually covered.  Testing can start early in SDLC even if GUI is not available.
  • 31.
    Disadvantages of WhiteBox Testing  White box testing can be quite complex and expensive.  Developers who usually execute white box test cases detest it. The white box testing by developers is not detailed can lead to production errors.  White box testing requires professional resources, with a detailed understanding of programming and implementation.  White-box testing is time-consuming, bigger programming applications take the time to test fully.
  • 32.
  • 33.