jeudi 13 août 2020

Is TDD incompatible with white-box testing

I am wondering how a team of developers might follow the TDD process and still employ white-box testing techniques like Branch Coverage. There seems to be a chicken and egg problem.

  1. TDD involves writing tests before code
  2. The Branch Coverage technique requires the existence of source code to design test cases
  3. Therefore, unit tests created using TDD cannot execute test cases designed using white-box techniques because they are written before the code

The goal is to have automated tests that are designed using white-box techniques but also follow TDD. The best option I can imagine is writing initial versions of unit tests using TDD and then later on refactoring them by adding new tests designed according to the code that has been written. But this seems a break from TDD.

Thoughts?

Aucun commentaire:

Enregistrer un commentaire