BLACK BOX & WHITE BOX TESTING in Software Engineering:
Black Box Testing:
Black Box Testing is the method that does not consider the internal structure, design, and product implementation to be tested. In other words, the tester does not know its internal functioning. The Black Box only evaluates the external behavior of the system. The inputs received by the system and the outputs or responses it produces are tested.
White Box Testing:
White box testing techniques analyze the internal structures the used data structures, internal design, code structure, and the working of the software rather than just the functionality as in black box testing. It is also called glass box testing or clear box testing or structural testing. White Box Testing is also known as transparent testing, open box testing.
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
BLACK BOX & WHITE BOX TESTING.pptx
1. BLACK BOX &WHITEBOX
TESTING
Presented By:
Mohammad Shahjalal Khan
B.Sc. Engineering in Information and Communication Technology,
Comilla University, Bangladesh.
2. Black box testing is a type of software testing in which
the functionality of the software is not known. The
testing is done without the internal knowledge of the
products.
Black Box Testing
3. In Black Box Testing, we just focus on inputs and output of the
software system without bothering about internal knowledge of the
software program.
The above Black Box executable program can be any software system you want to test.
4. Types of Black Box Testing
Functional Testing: It determines the system’s software
functional requirements.
Regression Testing: It ensures that the newly added
code is compatible with the existing code
Non functional: Nonfunctional testing is also known as NFT.
This testing is not functional testing of software. It focuses on
the software’s performance, usability, and scalability.
5. Black Box Testing Tools
Black Box Testing tools are mainly record and playback
tools. These tools are used for Regression Testing to check
whether a new build has created any bugs in the previous
working application functionality.
Appium
Selenium
Microsoft Coded UI
Applitools
HP QTP.
6. Black Box Testing Techniques
1. Equivalence Partitioning
2. Boundary Value Analysis
3. Decision Table Testing
4. State Transition Testing
5. Error Guessing
6. Graph-Based Testing Methods
7. Comparison Testing
7. Example of Black Box Testing
As present in the above image, the “AGE” text field accepts only
numbers from 18 to 60. There will be three sets of classes or groups.
8. Advantages of Black Box Testing
i. The tester does not need to have more functional knowledge or
programming skills to implement the Black Box Testing.
ii. It is efficient for implementing the tests in the larger system
iii. Tests are executed from the user’s or client’s point of view.
iv. Test cases are easily reproducible.
v. It is used in finding the ambiguity and contradictions in the
functional specifications.
9. Disadvantages of Black Box Testing
i. There is a possibility of repeating the same tests while
implementing the testing process.
ii. Without clear functional specifications, test cases are difficult
to implement.
iii.Sometimes, the reason for the test failure cannot be detected.
iv.Some programs in the application are not tested.
v. It does not reveal the errors in the control structure.
vi.Working with a large sample space of inputs can be
exhaustive and consumes a lot of time.
11. White box testing techniques analyze the internal structures
the used data structures, internal design, code structure, and
the working of the software rather than just the functionality
as in black box testing.
It is also called glass box testing or clear box testing or
structural testing and also known as transparent testing, open
box testing.
White Box Testing
14. Working process of white box testing
Input: Requirements, Functional specifications, design documents,
source code.
Processing: Performing risk analysis for guiding through the entire
process.
Proper test planning: Designing test cases so as to cover the entire
code. Execute rinse-repeat until error-free software is reached. Also, the
results are communicated.
Output: Preparing final report of the entire testing process.
15. White Box Testing Techniques
1. Statement coverage: In this method of validating whether
each and every line of the code is executed at least once.
2. Branch Coverage: In this technique, test cases are designed
so that each branch from all decision points are traversed at
least once true or false.
3. Basis Path Testing: In this technique, tests all the paths of
the program. This is a comprehensive technique which
ensures that all the paths of the program are traversed at least
once.
16. Tools required for White box Testing
o PyUnit
o Sqlmap
o Nmap
o Parasoft Jtest
o Nunit
o VeraUnit
o CppUnit
17. White Box Testing: Example
o READ X
o READ Y
o IF (X > Y)
o PRINT “X is greater that Y”
o ENDIF
o To get 100% statement coverage only one test case is sufficient for this
pseudo-code.
o TEST CASE 1: X=10 Y=5
o However this test case won’t give you 100% decision coverage as the
FALSE condition of the IF statement is not exercised.
o In order to achieve 100% decision coverage we need to exercise the FALSE
condition of the IF statement which will be covered when X is less than Y.
18. Advantages of White Box Testing
i. White box testing is very thorough as the entire code and
structures are tested.
ii. It results in the optimization of code removing error and helps in
removing extra lines of code.
iii. It can start at an earlier stage as it doesn’t require any interface
as in case of black box testing.
iv. Easy to automate.
v. White box testing can be easily started in Software
Development Life Cycle.
vi. Easy Code Optimization.
19. Disadvantages of White Box Testing
i. It is very expensive.
ii. Redesign of code and rewriting code needs test cases to be
written again.
iii. Testers are required to have in-depth knowledge of the code and
programming language as opposed to black box testing.
iv. Missing functionalities cannot be detected as the code that exists
is tested.
v. Very complex and at times not realistic.
vi. Much more chances of Errors in production
20. Difference Between White Box Testing and Black Box
Testing
Black Box Testing
• Used to evaluate the software without
understanding how it works on the inside.
• Testers are in charge of this.
• It is not necessary to know how to
program.
• Testing at the next level.
• It takes less time
• Black box testing comes in a variety of
shapes and sizes: Functional evaluation,
Regression analysis, Testing that is not
functional.
• Not appropriate for testing algorithms.
White Box Testing
• Executed after understanding the
software's fundamental structure.
• Developers worked on it.
• Knowledge of programming is required.
• Testing at a lower level.
• It takes a lot of time.
• White box testing comes in a variety of
shapes and sizes: Path testing, Testing
loops, Evaluation of the environment.
• Appropriate for algorithm testing.