A Green Test Alone Proves Nothing

Listen to this post
Subscribe

Automated tests pass by default. A red test turning green proves everything.

The red test proves the validity of the test (that it can fail).  Tests that cannot fail indicates an error in the way they are written.

The green test proves the code is accurate to the test. The code is written to pass the test, and so we know that it will forever be covered by the test going forward.

The transition from red to green proves that the test and the code are connected to each other. This is because we make failing test pass not by changing the test, but by changing the code.

TDD creates, therefore, meaningful test coverage. Nothing else can ensure this.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.