Skip to content
doubtly

1 answer

Answer: Black box testing checks what the software does (its functions) without looking at the code, while white box testing checks how it does it by testing the internal code structure, paths and logic.

BasisBlack box testingWhite box testing
MeaningTests the software from outside using inputs and expected outputs; internal code is unknown to the tester.Tests the internal structure, code and logic; the tester knows the code.
Other namesFunctional, behavioural, closed-box testingStructural, glass-box, clear-box, open-box testing
Based onRequirements / SRSDetailed design and source code
Programming knowledgeNot neededRequired
Done byMainly independent testers and end usersMainly developers
Testing levelsSystem and acceptance testing (higher levels)Unit and integration testing (lower levels)
TechniquesEquivalence partitioning, boundary value analysis, decision tables, cause-effect graphing, state transition, error guessingStatement coverage, branch/decision coverage, condition coverage, basis path testing (cyclomatic complexity), loop testing, data flow testing
FindsMissing or wrong functions, interface errors, behaviour and performance errorsLogical errors, unreachable code, wrong loops and conditions, unused variables
Time and costLess time-consumingMore time-consuming and detailed
Test case design startCan start as soon as requirements are readyStarts after the design/code is available
Suitable for algorithm testingNoYes
ExampleFor a login page, enter valid and invalid username/password combinations and check the messages.For a function with an if-else and a loop, write cases so every branch and the loop (0, 1, many times) is executed.

Note: Grey box testing combines both: the tester has partial knowledge of the internals while testing from outside.

Doubtly · 20 May 2024 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.