Another example is TDD for fixing bugs.<p><pre><code>    Reproduce the bug
    Capture reproduction steps in a test
    Fix the bug
    Deploy
</code></pre>
It&#x27;s a similar process. If you are going through all the effort of reproducing the test, you might as well automate it. If you are going through all the effort of design, you might as well capture it programmatically.<p>That said, I have two main principles I follow: 1) Black box test at the interface level. 2) Be willing to delete tests if they become bothersome.