单元测试的7个阶段,你属于哪个阶段?

2010-01-30  王恩建 

1 - Refuse to unit test because "you don't have enough time"
2 - Start unit testing and immediately start blogging about unit testing and TDD and how great they are and how everyone should do it
3 - Unit test everything - make private methods internal and abuse the InternalsVisibleTo attribute. Test getters and setters or else you won't get 100% code coverage
4 - Get fed with how brittle your unit tests are and start writing integration tests without realizing it.
5 - Discover a mocking framework and make heavy use of strict semantics
6 - Mock absolutely everything that can possibly be mocked
7 - Start writing effective unit tests

“哥没时间”,听得太多了,我相信属于第一阶段的人不在少数。

英文原文
633°/6283 人阅读/5 条评论 发表评论

李军  2010-01-30

哥有时间,但哥不会单元测试。


王波  2010-01-30

哥没有时间,哥也不会测试。


曹一富  2010-02-01

单元测试一般都软件开发人员做的,测试人员做单元测试的情况很少吧


王进  2010-02-01

凡事都一个过程,着7个阶段是成长中的一个个脚印。


袁帅  2010-06-09

没测,


登录 后发表评论