The task: building a server that really isn’t allowed to fail, a project where the cost of error is extraordinarily high
TDD is a great methodology that works well for some, but by itself it still isn’t enough. Even worse, TDD instills false confidence in code and may make developers lazy when considering paranoid edge cases.
No part of our confidence in our code can result from a manual QA process. Humans make mistakes. Human attention to detail deteriorates after doing the same mind-numbing task a hundred times in a row.
Tests must be fast. Blazingly fast.
If a test suite takes more than a few seconds to run, developers are likely going to become lazy, pushing code without running it.
Dealing gracefully with errors in runtime is a cornerstone for bulletproof code.
Complexity is the worst enemy of bulletproof code. One of the best ways to deal with complexity is divide and conquer — split the problem into smaller problems and solve each one separately.
面向接口编程,protobuf部分
1 | package spec |
Scafford started project包含各种测试目录部分,利用它来新建相关的project