Pro's and Con's of unit testing after the fact

后端 未结 12 804
轻奢々
轻奢々 2021-02-03 18:43

I have a largish complex app around 27k lines. Its essentially a rule drive multithreaded processing engine, without giving too much away Its been partially tested as it\'s been

12条回答
  •  逝去的感伤
    2021-02-03 19:02

    Here's a few of each to my mind:

    Pro:

    • Time is saved in not having to test methods that have been removed as the design evolved over time. What is left is what really has to get tested.
    • By adding tests, this allows an opportunity to review all the aspects in the app and determine what other optimizations one could add now that a working prototype is ready.

    Con:

    • Large time investment to get the tests written, new functionality may be delayed for some time to generate all the tests.
    • Bugs may have been introduced that the tests will discover that may cause this to be longer than initially planned.

    The main point would be that adding unit tests allows for refactoring and putting more polish on the application.

提交回复
热议问题