Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does "Unit Testing" falls under white box or black box testing?

Does "Unit Testing" fall under white box or black box testing? Or is it totally a separate type of testing than the other two?

like image 577
Manish Avatar asked Mar 27 '12 15:03

Manish


People also ask

Is unit testing part of white box testing?

White box testing can take several forms: Unit testing — tests written as part of the application code, which test that each component is working as expected.

Can unit tests be black-box?

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.

What type of testing is unit testing?

Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. This testing methodology is done during the development process by the software developers and sometimes QA staff.

What comes under white box testing?

White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) is a method of software testing that tests internal structures or workings of an application, as opposed to its functionality (i.e. black-box testing).


1 Answers

I think this article by Kent Beck referring more to TDD and unit-testing sums this up fairly well. Basically, it depends on how you actually write the tests*. Here is another article on the subject that might help clarify things.

*If you are testing from within your application, then it is whitebox. If you are testing it just like an outsider would make the calls to only your public facing API, then it is blackbox.

like image 115
Justin Pihony Avatar answered Oct 04 '22 05:10

Justin Pihony