Black Box Testing:
* It is a way of software testing in which the internal structure or the program or the code is hidden and nothing is known about it.
* It also known as data-driven, box testing, data-, and functional testing.
* This type of testing is ideal for higher levels of testing like System Testing, Acceptance testing.
* It is mostly done by software testers.
* No knowledge of implementation is needed.
* It is functional test of the software.
* Testing can start after preparing requirement specification document.
* Techniques used:
o Equivalence partitioning: Equivalence partitioning divides input values into valid and invalid partitions and selecting corresponding values from each partition of the test data.
o Boundary value analysis:
checks boundaries for input values.
* Advantages of Black Box Testing
* Efficient when used on large systems.
* Since the tester and developer are independent of each other, testing is balanced and unprejudiced.
* Tester can be non-technical.
* There is no need for the tester to have detailed functional knowledge of system.
* Tests will be done from an end user's point of view, because the end user should accept the system. (This testing technique is sometimes also called Acceptance testing.)
* Testing helps to identify vagueness and contradictions in functional specifications.
* Test cases can be designed as soon as the functional specifications are complete.
* Disadvantages of Black Box Testing
* Test cases are challenging to design without having clear functional specifications.
* It is difficult to identify tricky inputs if the test cases are not developed based on specifications.
* It is difficult to identify all possible inputs in limited testing time. As a result, writing test cases may be slow and difficult.
* There are chances of having unidentified paths during the testing process.
* There is a high probability of repeating tests already performed by the programmer.
White Box Testing:
* It is a way of testing the software in which the tester has knowledge about the internal structure r the code or the program of the software.
* It is also called structural testing, clear box testing, code-based testing, or glass box testing.
* Testing is best suited for a lower level of testing like Unit
Testing, Integration testing.
* It is mostly done by software developers.
* Knowledge of implementation is required.
* It is structural test of the software.
* Testing can start after preparing for Detail design document.
* Techniques Used:
o Statement Coverage, Branch coverage, and Path coverage are White Box testing technique.
o Statement Coverage validates whether every line of the code is executed at least once.
o Branch coverage validates whether each branch is executed at least once.
o Path coverage method tests all the paths of the program.
* Advantages of White Box Testing
* Code optimization by finding hidden errors.
* White box tests cases can be easily automated.
* Testing is more thorough as all code paths are usually covered.
* Testing can start early in SDLC even if GUI is not available.
* Disadvantages of White Box Testing
White box testing can be quite complex and expensive.
* Developers who usually execute white box test cases detest it. The white box testing by developers is not detailed can lead to production errors.
* White box testing requires professional resources, with a detailed understanding of programming and implementation.
* White-box testing is time-consuming, bigger programming applications take the time to test fully.