35:43Structure and Interpretation of Test Cases • Kevlin Henney • GOTO 2022
From the creator
This presentation was recorded at GOTO Amsterdam 2022. #GOTOcon #GOTOams http://gotoams.nl Kevlin Henney - Consultant, Programmer, Keynote Speaker, Technologist, Trainer & Writer @KevlinHenney ABSTRACT Throw a line of code into many codebases and it's sure to hit one or more testing frameworks. There's no shortage of frameworks for testing, each with their particular spin and set of conventions, but that glut is not always matched by a clear vision of how to structure and use tests — a framework is a vehicle, but you still need to know how to drive. The computer science classic, Structure and Interpretation of Computer Programs, points out that "programs must be written for people to read, and only incidentally for machines to execute". The same is true of test code. This talk takes a deep dive into unit testing, looking at examples and counterexamples across a range of languages and frameworks, from naming to nesting, exploring the benefits of data-driven testing, the trade-offs between example-based and property-based testing, how to get the most out of the common given-when-then refrain and knowing how far to follow it. [...] TIMECODES 00:00 Intro 04:09 Quote Structure & Interpretation of Computer Programs 05:27 Quotes Marit van Dijk 10:56 Testing approaches today 13:24 Continuous testing 14:52 Case: Leap year 28:55 Quote Nat Pryce & Steve Freeman 29:44 Case: Leap year continued 37:33 FizzBuzz 39:00 Quote Brian Marick 39:36 FizzBuzz continued 43:15 Quote Richard Feynman
Published 2022-09-07 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





