How to Untangle Your Spaghetti Test Code

Keep your automated test suites maintainable

Automated tests are part of the product. Let’s treat them like that!

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.


Related Sessions


  • Tutorial
  • Keynote
  • Talk
  • Workshop
  • Combo
  • Bonus
  • Active
  • Social
  • Virtual Pass icon
    Virtual Pass Session

25-minute New Voice Talk

Virtual Pass session
1:15 p.m. – 1:45 p.m. Track 4

120-minute Workshop

2:45 p.m. – 4:45 p.m. Room D3+D4 - Track 7: Workshops

25-minute Talk

Virtual Pass session
10:45 a.m. – 11:30 a.m. Room F1 - Track 1: Talks

25-minute Talk

Virtual Pass session
11:45 a.m. – 12:30 p.m. Room F3 - Track 3: Talks

If you like the Agile Testing Days Conference you might also like: