My friends and family are under attack in Ukraine. Donate to protect them directly or help international organizations.

Unit Testing by Example @ ConFoo

March 2nd, 2014

I gave a talk last week at ConFoo. It was very well received and I had some amazing feedback.

One person told me that he has been trying to write tests for two years but never had any success. With the advice gathered in my talk, he was able to write a few tests and now has the confidence to write a lot more. Another person told me that he liked my step-by-step approach that allowed less experienced developers to learn and advance, rather than being thrown straight into Test-Driven Development (TDD) and then fail.

This was exactly my intention. Most  testing talks and blogs that I saw until now are not beginner-friendly. They are inflexible, preaching only 100% coverage, "TDD or go home" and being perfect from day one. They completely ignore the human factor. Beginners are turned off by that, which means that instead of having some tests, certain projects have absolutely none. Also, too many talks focus on the testing API rather than on how to approach testing in a project.

I taught people to start writing tests where they are easy to write. Once people wrap their heads around the basics, I show the next steps until I eventually get them to TDD. I want people to feel that it's ok to practice, that they can't be perfect from the beginning. I want them to have the confidence to start, or to try once again if they were previously unsuccessful. I want more people to write tests. I definitely convinced the 100 or so people who came to my talk.

I will definitely be giving this talk again at other events.

Previous: Raise the red flag Next: How to kill creativity, part 1