» How to untangle your Spaghetti test code «

Michael Kutz


Abstract

In many teams we worked in, test code was treated much less carefully than production code. It was expected to just work. Mindless copy and paste of setup code from one test case to another was never seen problematic, duplications widely accepted, and things were named randomly.

This always leads to problems: gaps in assertions become pretty non-obvious; consolidating long running test suites becomes a cumbersome task; magic numbers need to be changed all across the suite, when they become outdated. All of this affects the overall maintainability of our code base.

Over the years we identified several good practices to prevent these problems and keep test code maintainable. Some borrowed from general good code quality standards, some specific for test code.

In this workshop, we are going to briefly discuss the properties of good test code. Then we’ll present our good practices and let you apply these to a prepared test suite. Lastly you will discuss action items in your day job.

Bio

I have been working in professional software development for more than 12 years. I love writing working software and I hate having to fix bugs. Therefore, I developed a strong focus on test automation, continuous delivery/deployment and agile principles.

Later I came to the realisation that the most sustainable way to fix code is to optimise those who code. For this reason, I have worked more intensively on psychological safety, cognitive biases and ways to spread knowledge in software-producing organisations.

Since 2014, I work at REWE digital as a software engineer and internal coach for quality assurance and testing. My main goal is to support our development teams in the areas of quality assurance and test automation so that they are able to write great, bug-free software quickly.