Unit Testing: Beginner Questions

后端 未结 4 755
陌清茗
陌清茗 2021-01-31 12:14

I\'m finally starting out with unit testing, having known that I should be doing it for a while, but I have a few questions:

  • Should or shouldn\'t I retest parent c
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-31 12:47

    (Not quite in the same order as your questions)

    • If the full test suite doesn't take too long, you should always run it complete. You often don't know which side-effects may result from changes exactly.

    • If you can combine speed tests with your favorite unit testing tool, you should do it. This gives you additional information about the quality of your changes. But only do this for time-critical parts of your code.

    • From Wikipedia: "A unit is the smallest testable part of an application."

提交回复
热议问题