Which test cases are written first: white boxes or black boxes?

Which test cases are written first: white boxes or black boxes?

1 Like

Ideally white box testing should be done first, because of the following reasons:-

  1. Black-box testing is used to verify features and White-box testing is basically testing the internals of code. If all the black-box tests pass and the coverage is good, white-box testing is unnecessary as the application works fine for the user.
    But it is hardly a case where black-box testing passes without passing of white-box test (making sure all code is internally correct).
  2. Much of the white box testing is done during unit testing by developers (or SDETs). And, Black box testing is done by ‘testers’ after the development of the app.

Hence, it makes sense to do white-box testing before black-box testing.