原則
Having unit tests without integration tests:只有單元測試,沒有整合測試
Having integration tests without unit tests: 只有整合測試,沒有單元測試
Having the wrong kind of tests: 測試的種類分佈不符合專案特性有個通則但不是絕對, 重點是將心力放在能為專案帶來更多價值的測試上command line app: unit > integration
web app: UI > integration > unit
API: integration > unit
Testing the wrong functionality: 花太多時間在測試非核心功能(思考是否要寫測試)
Testing internal implementation: 測試綁定在功能的內部實作上(意思是針對行為去測試, 不是那些未公開的方法)