开发者

What are the advantages of doing unit testing over plain "assertions"?

I am currently building an application with one of the models be开发者_Go百科ing fairly complex. I am currently using assertions

raise "error message" if "settings failed"

question is - what are the advantages of using the Unit:testing frameworks over these assertions?


One of the biggest advantages is that unit tests can be automated. You can run all your unit tests after every build, and you immediately find problems. With assertions, bugs might hang around for weeks (or more) before someone happens to exercise that portion of the code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜