"Refactoring" Reading Notes----Constructing a Testing System

        Writing code is actually a very small part of it. Some time is spent deciding what to do next, other time is spent on design, and the most time is spent debugging.

        Classes should contain their own test cases.

        Make sure all tests are fully automated and let them check the test results themselves.

        When you need to add new features, write the corresponding test code first.

        Frequent testing is an important part of Extreme Programming.

        Run tests frequently. Please take the tests into account every time you compile, and execute each test at least once a day.

        Whenever you receive a bug report, please first write a unit test to expose the bug.

        Only test the parts you are most worried about going wrong.

        Consider boundary conditions that could go wrong. Concentrate your testing fire there.

        Don't stop writing tests just because tests can't catch all bugs, because tests can catch most bugs.

Guess you like

Origin blog.csdn.net/qq_38650944/article/details/124375510