How do you retrofit unit tests into a code base?

前端 未结 7 739
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-17 16:56

Do you have any strategies for retrofitting unit tests onto a code base that currently has no unit tests ?

7条回答
  •  死守一世寂寞
    2021-01-17 17:12

    If ever you are trying to add unit tests to old perl code I strongly recommend

    Perl Testing: A Developer's Notebook by Ian Langworth and chromatic.

    It has some very nice trick on testing legacy and "untestable" code.

提交回复
热议问题