Test your tests The dos and don'ts of testing
summary
A catalogue of concrete testing failures and fixes: a proposed ERC‑721A optimization hides an ERC‑721A boundary bug (using >= instead of >), a wad conversion fuzzer run with Foundry fuzzer at 10,000 cases misses a static-boundary value, and a multiplication test copied an OR where an AND belongs. Recommendations are specific: split tests to one assertion each, assert explicit revert reasons, bound inputs, use differential fuzzing and run persistent offensive fuzzing for weeks; try Necessist test mutator to validate tests themselves.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:18The role of testing
- 3:01Motivation
- 3:39Example
- 4:55My testing approach
- 6:20Lack of systematic testing approach
- 7:30Good testing is hard
- 11:25Testing W multiplication
- 14:30Offensive fuzzing
- 18:58Conclusions
- 19:37Key takeaways
- 21:41Questions
related talks
01h 19mYou Can't Test This? Hammertime!
59m.NET Testing Techniques You Didn’t Know You Needed
21mTests That Help you Find Defects Faster
37mClean Test Code
01h 26mEqual Rights for Tests
26mTesting the Tricky Stuff
41mTesting that the code does what the code does
28mTesting Isn't Enough: Fighting Bugs with Hacks
