0% found this document useful (0 votes)
25 views18 pages

Lecture 3

Uploaded by

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

Lecture 3

Uploaded by

Armaan Armaan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

University Institute of Engineering

DEPARTMENT OF COMPUTER SCIENCE


& ENGINEERING
Bachelor of Engineering (Computer Science & Engineering)
Subject Name: Software Engineering
Subject Code: 22CST-313
Prepared by:
Er. Puneet Kaur(E6913)

Software Testing DISCOVER . LEARN . EMPOWER


1
Chapter-7
Software Testing
• Black Box Testing

2
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.
• It is also known as Behavioral Testing.

3
Black Box Testing

• The above Black-Box can be any software system you want to test.
• For Example, an operating system like Windows, a website like Google, a
database like Oracle or even your own custom application.
• Under Black Box Testing, you can test these applications by just focusing
on the inputs and outputs without knowing their internal code
implementation.
4
How to do Black Box Testing

• Initially, the requirements and specifications of the system are


examined.
• Tester chooses valid inputs (positive test scenario) to check whether SUT
processes them correctly. Also, some invalid inputs (negative test
scenario) are chosen to verify that the SUT is able to detect them.
• Tester determines expected outputs for all those inputs.
• Software tester constructs test cases with the selected inputs.
• The test cases are executed.
• Software tester compares the actual outputs with the expected outputs.
• Defects if any are fixed and re-tested.
5
Types of Black Box Testing

• There are many types of Black Box Testing but the following are the
prominent ones -
• 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.
6
Advantages

• Tests are done from a user’s point of view and will help in exposing
discrepancies in the specifications.
• Tester need not know programming languages or how the software
has been implemented.
• Tests can be conducted by a body independent from the developers,
allowing for an objective perspective and the avoidance of developer-
bias.
• Test cases can be designed as soon as the specifications are complete.

7
Disadvantages

• Only a small number of possible inputs can be tested and many


program paths will be left untested.
• Without clear specifications, which is the situation in many projects,
test cases will be difficult to design.
• Tests can be redundant if the software designer/developer has
already run a test case.

8
Testing Techniques
• Black box testing can be done in following ways:
• 1. Syntax Driven Testing – This type of testing is applied to systems
that can be syntactically represented by some language. For example-
compilers, language that can be represented by context free grammar.
In this, the test cases are generated so that each grammar rule is used
at least once.

9
Testing Techniques
• 2. Equivalence partitioning – It is often seen that many type of inputs
work similarly so instead of giving all of them separately we can group
them together and test only one input of each group.
• The idea is to partition the input domain of the system into a number
of equivalence classes such that each member of class works in a
similar way, i.e., if a test case in one class results in some error, other
members of class would also result into same error.

10
Testing Techniques
• The technique involves two steps:
• Identification of equivalence class – Partition any input domain into
minimum two sets: valid values and invalid values. For example, if
the valid range is 0 to 100 then select one valid input like 49 and one
invalid like 104.
• Generating test cases –(i) To each valid and invalid class of input
assign unique identification number.
(ii) Write test case covering all valid and invalid test case considering
that no two invalid inputs mask each other.

11
Testing Techniques
• To calculate the square root of a number, the equivalence classes will be:
(a) Valid inputs:
• Whole number which is a perfect square- output will be an integer.
• Whole number which is not a perfect square- output will be decimal
number.
• Positive decimals
• (b) Invalid inputs:
• Negative numbers(integer or decimal).
• Characters other that numbers like “a”,”!”,”;”,etc.

12
Testing Techniques
3. Boundary value analysis – Boundaries are very good places for
errors to occur. Hence if test cases are designed for boundary values of
input domain then the efficiency of testing improves and probability of
finding errors also increase. For example – If valid range is 10 to 100
then test for 10,100 also apart from valid and invalid inputs.

13
Testing Techniques
4. Cause effect Graphing – This technique establishes relationship
between logical input called causes with corresponding actions called
effect. The causes and effects are represented using Boolean graphs.
The following steps are followed:
• Identify inputs (causes) and outputs (effect).
• Develop cause effect graph.
• Transform the graph into decision table.
• Convert decision table rules to test cases.

14
15
Testing Techniques
• 5. Requirement based testing – It includes validating the requirements
given in SRS of software system.
• 6. Compatibility testing – The test case result not only depend on product
but also infrastructure for delivering functionality. When the
infrastructure parameters are changed it is still expected to work properly.
Some parameters that generally affect compatibility of software are:
• Processor (Pentium 3,Pentium 4) and number of processors.
• Architecture and characteristic of machine (32 bit or 64 bit).
• Back-end components such as database servers.
• Operating System (Windows, Linux, etc).
16
References

• https://www.guru99.com/black-box-testing.html
• https://softwaretestingfundamentals.com/black-box-testing/
• https://www.geeksforgeeks.org/software-engineering-black-box-testi
ng/
• https://www.geeksforgeeks.org/differences-between-black-box-testin
g-vs-white-box-testing/

17
THANK YOU

18

You might also like