Unit Testing without Assertions

后端 未结 14 2391
夕颜
夕颜 2020-12-17 08:35

Occasionally I come accross a unit test that doesn\'t Assert anything. The particular example I came across this morning was testing that a log file got written to when a co

14条回答
  •  被撕碎了的回忆
    2020-12-17 08:58

    These are known as smoke tests and are common. They're basic sanity checks. But they shouldn't be the only kinds of tests you have. You'd still need some kind of verification in another test.

提交回复
热议问题