🚀 TDD, Where Did It All Go Wrong (Ian Cooper)

Channel:DevTernity Conference · Length:1:03:55 · Published:2017-12-20 · Views:619685

Watch on YouTube

Summary

Ian Cooper's DevTernity talk revisits Kent Beck's original TDD ideas and shows where misunderstandings crept in. It argues tests should target behaviors through public interfaces rather than implementation details, so suites support refactoring instead of resisting it.

Why HN recommends it

HN repeatedly calls it the best talk on testing, and many say it changed how they approach tests, mocks and the meaning of a unit.

This excellent talk completely changed the way I approached testing. Every developer who writes tests needs to watch this now! — HN, 2021

Testing, debugging & developer tools · Software practice, open source & careers

Subtitles (excerpt)

um just a quick sort of show of hands or a couple of questions from the audience how many of you have actually seen a video of me doing this talk at any point few of you okay there are some nuances and giving it live would be a bit time bit different but you're seeing the gist of the argument how many of you are using tester from government today test first the test after okay how many of you are doing it you know test first all right and how many of you are using so mock mocking techniques and mocks okay two loads you okay very interesting okay this is me most of that is dull and uninteresting but that I usually draw attention to is the last point on that slide which is people like me come and talk at conferences to stand in front of you we're not necessarily smarter or cleverer than any of you guys and you know I'd really encourage all of you to gallop and speaker conferences if you can contribute back to the community that's all what I'm doing is I'm just a developer like you who decided to try and share some of my ideas with everybody else I kind of got forced into it because back when dotnet first started there were very few people to reverse the experts and so as such you know if you wanted to run a meet-up or a user group you had to kind of start up and

On Hacker News

This the best talk I've ever seen about testing (Ian Cooper): [VIDEO] I see he's done a much more recent follow up, which I intend to watch: [LINK] Not sure if it contains new ideas. He says the unit is not "a class" but a module. It's up to you to decide what the module does (ie. what level of abstraction it's at). More importantly, he argues against mocking and essentially "unit testing" in mos… — globular-toast, 2024-04
Ian Cooper talked about this (and more) 5 years ago: [VIDEO] Well worth listening to this talk. It completely changed the way I did testing. — globular-toast, 2022-01
> Firstly if the dependency isn't doing any io, you can test your code as a whole along with its dependency. No need to mock. This the thing. People have a tendency to overuse mocks. The point of automated testing (whether it's unit tests or something else), is to enable refactoring. That's really the only reason. Code that you don't touch doesn't suddenly change its behaviour one day. In a previ… — globular-toast, 2021-03
The best talk on this topic, IMO is Ian Cooper: "TDD, Where did it all go wrong?" [VIDEO] Couple of notes: - TDD, much like scrum, got corrupted by the "Agile Consulting Industry". Sticking to the original principles as laid out by Kent Beck results in fairly sane practices. - When people talk about "unit tests", a unit doesn't refer to the common pattern of "a single class". A unit is a piece of… — VHRanger, 2020-08
'Test Pyramid' considered harmful IMO. It discourages people from writing tests against the public interface of their system , and instead encourages testing against internals. This leads to a test pack that prevents refactoring, and can't be trusted to catch regression errors. This is partly down to the widely confused definition of a 'unit test' (which a lot of people interpret as 'one test per… — macca321, 2018-11

Related videos