MohammadShahjalalKha
250 views
21 slides
Mar 09, 2023
Slide 1 of 21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
About This Presentation
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 evaluate...
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.
Size: 515.29 KB
Language: en
Added: Mar 09, 2023
Slides: 21 pages
Slide Content
BLACK BOX & WHITE BOX TESTING Presented By: Mohammad Shahjalal Khan B.Sc. Engineering in Information and Communication Technology, Comilla University, Bangladesh.
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
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.
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.
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 .
Black Box Testing Techniques Equivalence Partitioning Boundary Value Analysis Decision Table Testing State Transition Testing Error Guessing Graph-Based Testing Methods Comparison Testing
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.
Advantages of Black Box Testing The tester does not need to have more functional knowledge or programming skills to implement the Black Box Testing. It is efficient for implementing the tests in the larger system Tests are executed from the user’s or client’s point of view. Test cases are easily reproducible. It is used in finding the ambiguity and contradictions in the functional specifications.
Disadvantages of Black Box Testing There is a possibility of repeating the same tests while implementing the testing process. Without clear functional specifications, test cases are difficult to implement. Sometimes, the reason for the test failure cannot be detected. Some programs in the application are not tested. It does not reveal the errors in the control structure. Working with a large sample space of inputs can be exhaustive and consumes a lot of time.
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 and also known as transparent testing , open box testing . White Box Testing
Types of White box Testing
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.
White Box Testing T echniques Statement coverage: In this method of validating whether each and every line of the code is executed at least once. 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 . 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.
Tools required for White box Testing PyUnit Sqlmap Nmap Parasoft Jtest Nunit VeraUnit CppUnit
White Box Testing: Example READ X READ Y IF (X > Y ) PRINT “X is greater that Y” ENDIF To get 100% statement coverage only one test case is sufficient for this pseudo-code . TEST CASE 1: X=10 Y=5 However this test case won’t give you 100% decision coverage as the FALSE condition of the IF statement is not exercised . 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.
Advantages of White Box Testing White box testing is very thorough as the entire code and structures are tested. It results in the optimization of code removing error and helps in removing extra lines of code. It can start at an earlier stage as it doesn’t require any interface as in case of black box testing. Easy to automate. White box testing can be easily started in Software Development Life Cycle. Easy Code Optimization .
Disadvantages of White Box Testing It is very expensive. Redesign of code and rewriting code needs test cases to be written again. Testers are required to have in-depth knowledge of the code and programming language as opposed to black box testing. Missing functionalities cannot be detected as the code that exists is tested. Very complex and at times not realistic. Much more chances of Errors in production
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.