100% found this document useful (1 vote)
58 views

Black Box Testing and Important Type of Testing

The document discusses black box testing techniques including requirements analysis, positive and negative testing, boundary value analysis, and equivalence partitioning. It provides details on different types of black box testing like functional testing, non-functional testing, and regression testing.

Uploaded by

Bodhe Abhijit
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
100% found this document useful (1 vote)
58 views

Black Box Testing and Important Type of Testing

The document discusses black box testing techniques including requirements analysis, positive and negative testing, boundary value analysis, and equivalence partitioning. It provides details on different types of black box testing like functional testing, non-functional testing, and regression testing.

Uploaded by

Bodhe Abhijit
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/ 26

Sanjivani Rural Education Society’s

Sanjivani College of Engineering, Kopargaon-423 603


(An Autonomous Institute, Affiliated to Savitribai Phule Pune University, Pune)
NAAC ‘A’ Grade Accredited, ISO 9001:2015 Certified

Department of Computer Engineering


(NBA Accredited)

Subject- Software Testing And Quality Assurance(STQA) [ 314-A)]


Unit 2 :- Black-Box Testing

Examination Scheme
Prerequisite In-Sem Exam: 30 Marks Prof. Abhijit S. Bodhe
Courses: End-Sem Exam: 50 Assistant Professor
Software Marks Continuous Department of Computer Engineering
Design and Assessment: 20 Marks
Engineering Total: 100 Marks E-mail :
[email protected]
Contact No: 7709 340 570
Unit 2:-Black Box Testing
• Introduction,
• need of black box testing,
• Requirements Analysis,
• Testing Methods - Requirements based testing,
• Positive and negative testing,
• Boundary value analysis,
• Equivalence Partitioning class,
• Domain testing,
• Design of test cases,
• Case studies of Black- Box testing
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 2
Introduction
• 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.

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 3


Introduction
• Black box testing is a powerful testing technique because it exercises a
system end-to-end. Just like end-users “don’t care” how a system is
coded or architected, and expect to receive an appropriate response to
their requests,
• A tester can simulate user activity and see if the system delivers on its
promises. Along the way, a black box test evaluates all relevant
subsystems, including User interface/s, web server or application
server, database, dependencies, and integrated systems.

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 4


Need of black box testing
• Black box testing can check additional aspects of the software, beyond
features and functionality.
• A non-functional test does not check “if” the software can perform a
specific action but “how” it performs that action. Black box tests can
uncover if software is: Usable and easy to understand for its users.
• To check the application under test from the user’s perspective.
• To test the system against external factors responsible for software failures.
• Black box testing is based on the requirements and checks the system to
validate against predefined requirements.
• To check response time of the system against performance parameters.

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 5


Black Box Testing Pros and Cons
Pros/Advantages Cons/Limitations

Testers do not require technical knowledge, Difficult to automate


programming or IT skills

Testers do not need to learn implementation Requires prioritization, typically infeasible to test all
details of the system user paths

Tests can be executed by outsourced testers Difficult to calculate test coverage

Low chance of false positives If a test fails, it can be difficult to understand the root
cause of the issue

Tests have lower complexity, since they simply Tests may be conducted at low scale or on a non-
model common user behavior production-like environment
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 6
Requirements Analysis
• Requirements analysis, also called requirements engineering, It is the
process of determining user expectations for a new or modified product.
• These added or modified features, called requirements, must be quantifiable,
relevant and detailed. In software engineering, such requirements are often
called functional specifications.
• The main types of requirements analysis include business, customer,
product, functional, and non-functional requirements. Each one represents a
stakeholder or stage of the project and communicates the project needs.
• Examples of requirement analysis are writing detail user case/s and
interviews with stakeholders

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 7


Requirements (Analysis) based testing
• Black box testing can be applied to three main types of tests under
requirement testing : Functional, Non-functional, and Regression
testing.
1. Functional testing – This is a type of black box testing which is
related to the functional requirements of a system; It covers how well
the system executes its functions as per requirements.
2. Non-functional testing –Non functional testing is concerned with the
non-functional requirements and is designed specifically to evaluate
the readiness of a system according to the various criteria which are
not covered by functional testing.

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 8


Requirements (Analysis) based testing
3. Regression testing – It is performed after code fixes, upgrades or
any other system maintenance to check the new changes has not
affected any existing functionality.
• Ensures that a software application works as intended after any code
changes, updates, revisions, improvements, or optimizations.
• Functional Testing (Example-calculator) :- Verify the spacing between
the two buttons of calculator(H/W). Check if the calculator is a
normal calculator or a scientific calculator (S/W).
• Non functional (Example-DB) :- (security testing) validates the safety
of customer information, (usability testing) assesse navigation and
flow control.
• Regression testing:- Search. .
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 9
Positive and Negative testing
• Positive testing determines that your application works as expected. If an error
is encountered during positive testing, the test fails.
• Negative testing ensures that your application can gracefully handle invalid
input or unexpected user behavior.
• Positive testing examines a software program's response with the help of a
valid input data set.
• Checking the software program's response using the invalid/incorrect input
data set is known as Negative testing.

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 10


Positive and Negative Testing
S.No. Positive Testing Negative Testing
1. Checking the application response with the help of Checking the application response by using the
valid input data is known as positive testing. invalid input data set is known as negative testing.
2. Positive testing is implemented only for the expected Negative testing is implemented only for unexpected
conditions. conditions.
3. Positive testing doesn't guarantee a good quality of Negative testing guarantees to deliver a good quality
software product. of software product.
4. The execution of positive testing takes less time as The execution of positive testing takes more time as
compared to negative testing. compared to positive testing.
5. To validate the available set of test conditions, we will To break the project and product with an
consistently implement the Positive testing. unidentified set of test conditions, we will
consistently implement Negative testing.
6. The primary purpose of executing Positive testing is to The primary purpose of executing the negative
guarantee that the software application always meets testing is to test a web application's constancy in
the developer's requirements and specifications. contradiction to inaccurate validation data sets.

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 11


Positive and Negative Testing
S.No. Positive Testing Negative Testing
7. Positive testing doesn't encompass all the possible Negative testing encompasses all the possible cases.
cases.
8. It is a process where the system is validated in It is a testing process which contain the validation in
contradiction of the valid input data. contrast to invalid input data.
9. Positive testing is less significant than Negative Negative testing is more vital than Positive testing.
testing.
10. Positive testing can be implemented on every Negative testing can be implemented when the
application. possibilities of unpredicted conditions.
11. The people having less knowledge can execute the The testing professionals can execute the negative
positive testing. testing.
12. It makes sure that the software is standard. Negative testing makes sure to deliver 100 percent
bug-free software.
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 12
Boundary Value Analysis (BVA)
• Boundary-value analysis (BVA) is a software testing technique in which, tests
are designed to include representatives of boundary values in a range.
• It is used to test boundary values, because the input values near the boundary
have higher chances of error.
• The tester focuses on, while entering boundary value whether the software is
producing correct output or not.
• basic assumption of BVA is, the test cases that are created using boundary
values are most likely to cause an error.
• Testing of boundary values is done by making valid and invalid partitions.
Invalid partitions are tested because testing of output in adverse condition
(invalid input) is also essential.
• Reference :- https://www.geeksforgeeks.org/software-testing-boundary-value-analysis/
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 13
BVA Example
• There is a function that accepts a number between 18 to 30, where 18 is the
minimum and 30 is the maximum value of valid partition, the other values of this
partition are 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 and 29. The invalid partition
consists of the numbers which are less than 18 such as 12, 14, 15, 16 and 17, and
more than 30 such as 31, 32, 34, 36 and 40. Tester develops test cases for both
valid and invalid partitions to capture the behavior of the system on different input
conditions.

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 14


Equivalence Partitioning class (ECP)
• Equivalence Partitioning also called as Equivalence Class Partitioning. It is
abbreviated as ECP.
• ECP is a test case design technique that involves dividing input test data into
separate partitions with similar elements.
• The equivalence partitions are derived from requirements and specifications
of the software,
• advantage of this approach is, it helps to reduce the time of testing due to a
smaller number of test cases from infinite to finite.
• It is applicable at all levels of the testing process.

• https://www.javatpoint.com/equivalence-partitioning-technique-in-black-box-testing

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 15


Equivalence Partitioning class (ECP)
Example:- Assume that there is a function of a software application that accepts a particular number
of digits, not greater and less than that particular number. For example, an OTP number which
contains only six digits, less or more than six digits will not be accepted, and the application will
redirect the user to the error page. OTP Number = 6 digits

Advantages Disadvantages

It is process-oriented All necessary inputs may not cover.


We can achieve the Minimum test coverage This technique will not consider the condition for
boundary value analysis.
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 16
Domain Testing
• It is a software testing technique where minimum numbers of inputs are used
to access appropriate output of a system, to ensure the system does not accept
invalid input values.
• The system is expected to give required outputs blocking the invalid inputs.
• It is difficult for someone to perform effectively in a field where the person is
not familiar. So a domain tester must have basic domain knowledge.
• Online banking: A tester must have to be a expert in the online banking
activities like login, bill payment, transfers.
• Healthcare : A tester with proper understanding of domain knowledge should
handle a healthcare system. It is a huge risk to someone’s life when someone
with zero knowledge handles the system.

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 17


Structure of Domain Testing
• The process is quite similar everywhere when it comes to build the
strategy, where the following step-by-structure is used that suits most
of the scenarios:
1. Think what can go wrong.
2. Find a solution to handle each case.
3. Pick several points to test each error.
4. Take one test point to examine adjacent domains
5. Then start running the test.
6. Check if the boundaries are faulty in nature.
7. Inspect boundaries of all domains.
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 18
Design of test cases
• Test case is defined as a group of conditions under which a tester
determines whether a software application is working as per the
customer's requirements or not.
• Test case designing includes mostly preconditions, case name, input
conditions, and expected result. A test case is a first level action and
derived from test scenarios.
• It is an in-details document that contains all possible inputs (positive as
well as negative) and the navigation steps, which are used for the test
execution process.
• Writing of test cases is a one-time attempt that can be used in the future at
the time of regression testing.
• https://www.javatpoint.com/test-case
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 19
Test Cases
• Generally, we will write the test case whenever the developer is busy in
writing the code.
• The primary purpose of writing a test case is to achieve the efficiency of
the application.
• When writing the test case, the actual result should never be written as the
product is still being in the development process. That?s why the actual
result should be written only after the execution of the test cases.
• NOTE:- when the developers are developing the first product for the First
release, the test engineer writes the test cases. And in the second release,
when the new features are added, the test engineer writes the test cases for
that also, and in the next release, when the elements are modified, the test
engineer will change the test cases or writes the new test cases as well.
Which makes designing test cases a continuous process
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 20
Process for writing test cases

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 21


Test case template

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 22


Test case temple for checking user name and Password

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 23


Case studies of Black- Box testing

• Open Pdf for detail case study on BANKING SYSTEM. .. !!

• https://www.diva-
portal.org/smash/get/diva2:830538/FULLTEXT01.pdf

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 24


Unit 2:-Black Box Testing
• Introduction,
• need of black box testing,
• Requirements Analysis,
• Testing Methods - Requirements based testing,
• Positive and negative testing,
• Boundary value analysis,
• Equivalence Partitioning class,
• Domain testing,
• Design of test cases,
• Case studies of Black- Box testing
DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 25
Unit 3:-White Box Testing
• Introduction, Need of white box testing,
• Testing types,
• Static testing by humans,
• Structural Testing – Control flow testing, Loop Testing,
• Design of test cases,
• Challenges in White box testing,
• Case-studies of White-Box testing.

DEPARTMENT OF COMPUTER ENGINEERING, Sanjivani COE, Kopargaon 26

You might also like