Can unit testing be successfully added into an existing production project? If so, how and is it worth it?

前端 未结 23 2453
遇见更好的自我
遇见更好的自我 2020-12-12 09:01

I\'m strongly considering adding unit testing to an existing project that is in production. It was started 18 months ago before I could really see any benefit of TDD

23条回答
  •  無奈伤痛
    2020-12-12 09:31

    Yes it can: Just try to make sure all code you write from now has a test in place.

    If the code that is already in place needs to be modified and can be tested, then do so, but it is better not to be too vigorous in trying to get tests in place for stable code. That sort of thing tends to have a knock-on effect and can spiral out of control.

提交回复
热议问题