Re:Who Will Test the Tests Themselves? (2017)
by divbzero on Monday September 07, 2020 @05:32PM
(#24403102)
Approaches I take to reduce errors in tests include:
– Keeping tests as short, simple, and few in number as possible. Focus on integration tests for overall input/output, and limit unit tests to the most critical components only.
– Getting extra eyes on the tests. In some cases, this can include product managers who help to define the expected behavior.
– Writing code without continually running the tests. This deviates from strict TDD but allows for a second independent effort at specifying the desired functionality. There are times when writing the code correctly reveals that the tests were written wrong.
– Keeping tests as short, simple, and few in number as possible. Focus on integration tests for overall input/output, and limit unit tests to the most critical components only.
– Getting extra eyes on the tests. In some cases, this can include product managers who help to define the expected behavior.
– Writing code without continually running the tests. This deviates from strict TDD but allows for a second independent effort at specifying the desired functionality. There are times when writing the code correctly reveals that the tests were written wrong.