How do you introduce unit testing into a large, legacy (C/C++) codebase?

前端 未结 13 1537
鱼传尺愫
鱼传尺愫 2020-12-07 07:39

We have a large, multi-platform application written in C. (with a small but growing amount of C++) It has evolved over the years with many features you would expect in a lar

13条回答
  •  [愿得一人]
    2020-12-07 08:28

    I think, basically you have two of separate Problems:

    1. Large Code base to refactor
    2. Work with a team

    Modularization, refactoring, inserting Unit tests and alike is a difficult task, and i doubt that any tool could take over larger parts of that work. Its a rare skill. Some Programmers can do that very well. Most hate it.

    Doing such a task with a team is tedious. I strongly doubt that '"forcing" developers' ever will work. Iains thoughts are very well, but I would consider finding one or two programmers who are able to and who want to "clean up" the sources: Refactor, Modualrize, introduce Unit Tests etc. Let these people do the job and the others introduce new bugs, aehm functions. Only people who like that kind of work will succeed with that job.

提交回复
热议问题