The Value of Unit Testing

前端 未结 12 1863
猫巷女王i
猫巷女王i 2021-01-11 16:48

Here are some typical answers(ranked in ascending order of corniness) I get from managers/bosses whenever I bring up the importance of having unit tests and code coverage as

12条回答
  •  醉梦人生
    2021-01-11 17:25

    If unit testing, I'm assuming you're talking about TDD here, is that important to you you should use your own time to write them (assuming you have time). If you do, keep a record of how much time you actually spend writing them and after they've been in place for a release cycle or two go to your managers with some data.

    If the answers you've posted are really what your managers are saying then you work for idiots and perhaps some hard data can sway them. Given the market, quitting isn't likely an option and playing office politics won't get you anywhere (or improve the quality of your code).

    Until your managers understand that TDD IS NOT solely about preventing bugs or "testing" they will NEVER get it. TDD is about design and overall code quality.

    You have to show them. If they can't be persuaded then I would start looking. Quietly ;)

提交回复
热议问题