0% found this document useful (0 votes)
3 views6 pages

Black Box Testing 1

Black Box Testing is a software testing technique that evaluates functionality without knowledge of internal code, focusing on functional requirements and system responses to inputs. Techniques include Equivalence Partitioning, Boundary Value Analysis, Decision Table Testing, State Transition Testing, Exploratory Testing, and Random Testing, each with specific methodologies for designing test cases. The primary goal is to ensure the software behaves according to specified requirements while identifying defects and unexpected behaviors.

Uploaded by

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

Black Box Testing 1

Black Box Testing is a software testing technique that evaluates functionality without knowledge of internal code, focusing on functional requirements and system responses to inputs. Techniques include Equivalence Partitioning, Boundary Value Analysis, Decision Table Testing, State Transition Testing, Exploratory Testing, and Random Testing, each with specific methodologies for designing test cases. The primary goal is to ensure the software behaves according to specified requirements while identifying defects and unexpected behaviors.

Uploaded by

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

Black Box Testing

Black Box Testing is a software testing technique in which the tester evaluates the functionality of
the software without knowing the internal code or program structure.
The system is treated as a “black box”, meaning the tester can only see the inputs given to the system and
the outputs produced by it.
The main objective is to verify whether the software behaves according to the specified
requirements.
In this testing method, the tester focuses on:
 Functional requirements
 Input and output behavior
 System responses to different inputs
Characteristics of Black Box Testing
 The tester does not have access to the source code.
 Testing is done from the user’s perspective.
 Test cases are designed based on software specifications and requirements.
 It verifies what the system does, not how it works internally.
Example: Online Login System
A login page requires users to enter:
 Username
 Password
Requirement
 If the username and password are correct → Login Successful
 Otherwise → Login Failed
Test Cases
Test Case Username Password Expected Output

TC1 correct correct Login Successful

TC2 incorrect correct Login Failed

TC3 correct incorrect Login Failed

TC4 blank blank Error message


Here, the tester only checks input and output behavior without knowing the internal login validation code.
Black Box Testing Techniques
Most common black box testing techniques:
1. Equivalence Partitioning: This technique involves dividing the input domain of the software into
equivalent classes based on similar characteristics. Test cases are then designed to test each class,
ensuring that the software behaves consistently for inputs in each class.
Equivalence Partitioning divides the input data into valid and invalid partitions so that testing can
be done efficiently.
Instead of testing every input value, one value from each group is selected.
Example
Suppose a system accepts marks between 0 and 100.
Partitions:
Partition Type Input Range
Valid Partition 0 – 100
Invalid Partition Less than 0
Invalid Partition Greater than 100
Test Cases
Test Case Input Marks Expected Result
TC1 50 Accepted
TC2 -5 Invalid input
TC3 120 Invalid input
This reduces the number of test cases.
2. Boundary Value Analysis: This technique involves testing the boundary values of input variables.
Test cases are designed to test values at or near the minimum and maximum boundaries of each input
variable, since these values are more likely to cause errors or issues.
Many errors occur at the boundaries of input ranges, so testing focuses on boundary values.
Example
If a system accepts age between 18 and 60.
Boundary test cases:
Test Case Input Age Result
TC1 17 Invalid
TC2 18 Valid
Test Case Input Age Result

TC3 19 Valid
TC4 59 Valid
TC5 60 Valid
TC6 61 Invalid
Testing values just below, at, and just above the boundary helps detect errors.
3. Decision Table Testing: This technique involves creating a decision table to represent different
combinations of input conditions and their corresponding output actions. Test cases are designed to
test each combination, ensuring that the software behaves as expected for each input condition.
This technique is used when multiple conditions affect system behavior.
It represents combinations of conditions and actions in a table format.
Example: Online Shopping Discount
Conditions:
 Customer is a member
 Purchase amount greater than 5000
Decision Table:
Member Purchase > 5000 Discount
Yes Yes 20%
Yes No 10%
No Yes 5%
No No 0%
Each combination is tested.
4. State Transition Testing
This technique is used for software that has a state-based behavior. Test cases are designed to test the
software as it transitions from one state to another, ensuring that the software behaves consistently in each
state.
Used when the system behavior changes based on different states.
Example: ATM Machine
States:
1. Insert card
2. Enter PIN
3. Select transaction
4. Withdraw money
Test cases verify that the system moves correctly from one state to another.
Example:
Test Case Action Result
TC1 Insert card + correct PIN Access granted
TC2 Insert card + wrong PIN Error message
TC3 Wrong PIN 3 times Card blocked
Exploratory Testing: This technique involves testing the software without any predefined test cases. Testers
explore the software and test its functionality based on their own understanding and intuition, identifying
defects and issues as they go.
Exploratory Testing is a testing technique where test cases are not prepared in advance.
The tester explores the software, learns its behavior, designs tests, and executes them simultaneously.
It mainly depends on the tester’s experience, intuition, and understanding of the system.
In this method:
 Testing
 Learning
 Test case design happen at the same time.
Characteristics of Exploratory Testing
 No predefined test scripts
 Tester actively explores the application
 Flexible and creative testing approach
 Useful for finding unexpected defects
Example
Consider an online shopping website.
A tester starts exploring the system by performing different actions such as:
1. Login to the website
2. Search for a product
3. Add product to cart
4. Remove product from cart
5. Proceed to checkout
During testing, the tester may try unexpected actions such as:
 Adding the same product multiple times
 Clicking checkout without logging in
 Entering special characters in the search box
Through this exploration, the tester may discover defects such as:
 Cart not updating properly
 Error messages not displayed correctly
 Application crashing during checkout
Advantages of Exploratory Testing
 Helps discover hidden defects
 Requires less documentation
 Encourages creative testing
 Useful when requirements are not clearly defined
Disadvantages
 Difficult to reproduce defects
 Depends heavily on tester skill
 Hard to measure test coverage

Random Testing: This technique involves randomly generating input values and testing the software with
those values. It is useful for identifying unexpected behaviors or errors in the software.
Random Testing is a technique where input values are randomly generated and given to the
system to test its behavior.
The objective is to check how the system behaves when it receives unexpected or unusual inputs.
Example
Consider a program that calculates the square of a number.
Read number n
result = n * n
print(result)
In random testing, the tester may provide random inputs such as:
Test Case Random Input Output

TC1 5 25
Test Case Random Input Output

TC2 -3 9

TC3 0 0

TC4 99999 Large value

TC5 -1000 Large positive result


These random inputs help identify:
 Overflow errors
 Unexpected program behavior
 System crashes
Real-Life Example
In a mobile app registration form, random testing may include:
 Random numbers in the name field
 Special characters in email field
 Extremely long passwords
This helps detect input validation errors.
Advantages of Random Testing
 Simple and easy to perform
 Helps detect unexpected system failures
 Useful for stress and robustness testing
Disadvantages
 Some important cases may not be tested
 Random inputs may not represent real user behavior
 Difficult to measure coverage

You might also like