【Testable Code】Unit Tests, How to Write Testable Code and Why it Matters
2018-01-17 11:15
453 查看
单元测试和TDD (Test-Driven Development)的好处就不多说了。
为什么这么好的软件开发实践却往往很少有人去实践?
- 被测试的代码需要留心可测试性
- 好的单元测试也需要花时间去学习
如果Production Code不是Testable Code,那单元测试会很难实施。
今天转发一篇文章,关于Testable Code的,写得非常好!在把一些原则和最佳实践讲得浅显易懂的同时,在配上极具实践性的解决方案例子,这些也就是为什么强烈推荐此文的缘故了。
https://www.toptal.com/qa/how-to-write-testable-code-and-why-it-matters
为什么这么好的软件开发实践却往往很少有人去实践?
- 被测试的代码需要留心可测试性
- 好的单元测试也需要花时间去学习
如果Production Code不是Testable Code,那单元测试会很难实施。
今天转发一篇文章,关于Testable Code的,写得非常好!在把一些原则和最佳实践讲得浅显易懂的同时,在配上极具实践性的解决方案例子,这些也就是为什么强烈推荐此文的缘故了。
https://www.toptal.com/qa/how-to-write-testable-code-and-why-it-matters
相关文章推荐
- How to Design a Good API and Why it Matters(转)
- How to Design a Good API and Why it Matters
- how to design a good api and why it matters
- How to Design a Good API and Why it Matters
- Units Problem: How to read text size as custom attr from xml and set it to TextView in java code
- Why we made vorlon.js and how to use it to debug your JavaScript remotely
- Android: How to download the latest zip Android Source Code easily and using it in Intellij
- Why do we need smart pointer and how to implement it.
- How to write custom static code analysis rules and integrate them into Visual Studio 2010
- How to write custom static code analysis rules and integrate them into Visual Studio 2010
- (Page 1 of 3 )A walking tour of JavaBeans What JavaBeans is, how it works, and why you want to use it
- (Page 2 of 3 )A walking tour of JavaBeans 2 :What JavaBeans is, how it works, and why you want to use it
- (Page 3 of 3 )A walking tour of JavaBeans What JavaBeans is, how it works, and why you want to use it
- Units Problem: How to read text size as custom attr from xml and set it to TextView in java code
- How to write a first class paper and get it published in a scientific journal?
- Units Problem: How to read text size as custom attr from xml and set it to TextView in java code
- Why to use memory pool and how to implement it
- Why Ceph and how to use Ceph?
- EOF的定义与有效使用(Definition of EOF and how to use it effectively )
- What is xylitol and how does it help to prevent cavities?