Comment on What does it really mean to test an interface not the implementation?

asyncrosaurus@programming.dev ⁨1⁩ ⁨year⁩ ago

It’s a form of Black-Box Testing, essentially you want to validate expected behavior. Implementation can change, but your outcome should remain the same.

This is a big target for Test Driven Development, since your first step is to write the test with the expected outcome, then you write the most basic implementation, and when you can verify the behavior, then you are free to re-factor to improve implementation knowing your test will tell you if the behavior changes with each internal change.

source
Sort:hotnewtop