What is Unit testing, Black-box testing and White-Box testing? I googled but all the explanation I found was very technical. Can anyone answer this question in a simple way with an appropriate example?
Unit testing is simply testing every unit class of your "code". It is a whitebox testing.
Is unit testing a black box or white box testing technique? Unit testing is a white box technique. The reason for this is that you can see what the code does before it executes. This allows you to write a test case for every aspect of your code.
Also known as closed-box testing, data-driven testing, or functional testing. Also known as translucent testing, as the tester has limited knowledge of the insides of the application. Also known as clear-box testing, structural testing, or code-based testing. Performed by end-users and also by testers and developers.
Black box testing refers to any type of software test that examines an application without knowledge of the internal design, structure, or implementation of the software project. Black box testing can be performed at multiple levels, including unit testing, integration testing, system testing, or acceptance testing.
In black box testing, you don't care how the internals of the thing being tested work. You invoke the exposed API and check the result; you don't care what the thing being tested did to give you the result.
In white box testing, you do care how the internals of the thing being tested work. So instead of just checking the output of your thing, you might check that internal variables to the thing being tested are correct.
Unit testing is a way of testing software components. The "Unit" is the thing being tested. You can do both black and white box testing with unit tests; the concept is orthogonal to white/black-box testing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With