Sobes.tech
Middle

What is black box testing and white box testing?

sobes.tech AI

Answer from AI

Black Box Testing is a testing method where the tester does not know the internal structure or code of the application. Tests are based on requirements and functionality, verifying the correctness of the system from the user's perspective.

White Box Testing is a method where the tester has access to the source code and internal logic of the program. Tests are aimed at checking specific parts of the code, condition coverage, branching, etc.

Example:

  • Black Box: checking that the system outputs an error when an incorrect password is entered.
  • White Box: writing a test that verifies that the condition if (password == correct) works correctly.