◦ Chapter 5 Principles of Test Automation ◦ See also: xUnit Test Patternsから学ぶ12個のユニットテストの原則 by @hgsgtk ▪ https://qiita.com/hgsgtk/items/a3186a250d36d3b224d9 • 現在は英書のみ 6 『xUnit Test Patterns』
• メンテナンスコストの高いテストに繋がりうる • いくつかの原因 ◦ Eager Test ◦ Mystery Guest ◦ General Fixture ◦ Irrelevant Information ◦ Hard-coded Test Data ◦ ...etc 10 Obscure Test
◦ Missing Assertion Message Missing Assertion Message • アサーションの失敗原因を特定するメッセージの設定がない • 参考になる考え方:Why does Go not have assertions? ◦ https://golang.org/doc/faq#assertions ◦ “thinking about proper error handling and reporting.” 18 Assertion Roulette