October 2, 2017

How I Learned About Testing

At Happy Bear Software, we have this writing series where each member on the team is asked a question and we write down our answers in approx 300words.

I really love the question prompts and my answers so I thought that I might as well share them here. Here’s my answer to “How I learned testing”:

The first time I was taught testing was in a class. It really didn’t make much sense to me because I didn’t get why I needed to write a bunch of code before I write the actual code. There were lot of terms being thrown around such as TDD, BDD, unit testing, feature testing, etc - as a n00b developer I just didn’t get the “why”? I grudgingly wrote tests but I didn’t really enjoy it and I considered it an unnecessary chore.

I think what was missing for me then was the context of the big picture and why testing matters to my thought process as a developer, how it’s even for my benefit and the benefit of the developers that will work on the code much later (catching regressions, confidence that your code meets the acceptance criteria, etc.) - a productivity win that my client and users will appreciate down the line. TDD/BDD are not just laws I have to abide by just because.

Once I understood that, my attitude towards testing changed and it’s become part of my thought process when writing software. Now I happily write tests and introduce it to codebase that don’t have tests :)

After my mental attitude was sorted out - I dug through the Rspec and Capybara GitHub repo, docs, and tons of tutorials/blogs/articles to really understand the syntaxes and techniques available. One particular resource that really stood out for me was Thoughtbot’s Upcase platform - they have lots of mini videos and in-depth tutorials on testing that helped me really got the hang of testing.

Read more about how the rest of my teammates learned testing here: How We Learned Testing