Building a Culture of Testing
// This post by Tim Rosenblatt originally appeared on the Ship.io Blog.
I love this blog post from Lou Kosak on the testing culture at AirBnB. It’s not so much a description of what they do now, but more a story of how they built testing into their culture. It’s a story full of hard work and grit.
Talking about culture is very popular these days. In my opinion, the most important part of a company culture is the ability to find and stick with the important parts, while changing others. Sticking with an existing habit is easy — it’s the change that is usually hard. We know from neuroscience that our brains like to establish routine habits and then put them on autopilot. Groups of people can also resist change in interesting ways. It’s not that our brains are bad, or that groups of people are bad. This is simply how these things work.This is why I love this post so much. It is a powerful mindset to believe that improvement is possible but difficult, and to push forward anyways.
Back in 2013, AirBnB basically had no testing and a giant monolithic app that wasn’t going to make it easy to add tests for:
“The suite was slow and error-prone, our CI server was barely limping along, and most people had no idea how to run tests locally. New hires were told that testing was important, but when they saw that nobody was paying any attention to tests they quickly forgot about them.”
I definitely remember when I started writing automated tests (a very, very long time ago). The thing about testing is that it is a compound habit — it’s not a single thing that you do. It’s a combination of 10 or 20 things you do that build up to what we know as “testing”. Bad habits in one area make it impossible to develop good habits in other areas, but good habits build upon each other. Before I had this realization, I felt stuck, and I felt like I was constantly fighting the testing tools and the process. Lou’s comment about new hires dropping the testing habit reminds me of this complexity.
On a personal note, this is something that I like about Ship.io. We are building a CI system, and the team has an incredible background, having produced other CI, build, and deployment systems. When we talk about the importance of all of these habits, the team understands them intuitively and it helps us continually grow. Plus, helping other developers run their tests is a great feeling. It makes life wonderful!
Another aspect of this is when Lou talks about how they started using pull requests — a change to the team’s core habits. They used to merge everything into controller, but mature projects cannot be run this way. His explanation of how they changed this, by patiently being good role models, is a textbook example for anyone trying to improve habits:
“Eventually, a few people decided to do something about it and started submitting pull requests for their changes. This was never introduced as a mandatory policy; we never disabled pushing to controller or shamed people for doing so. But as those few, then a team, then several teams started doing this…it became clear that this process of peer review lead to less bad code hitting production, and therefore fewer outages.”
These are just a few of the highlights from a really thorough write up. Give it a read !
Stay up to date
We'll never share your email address and you can opt out at any time, we promise.