How to Untangle Your Spaghetti Test Code

120-minute Workshop

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

Timetable

2:45 p.m. – 4:45 p.m. Wednesday 15th

Room

Room D1+D2

Audience

Coding Tester, Testing Coder

Required

Notebook, IDE/Editor e.g. VS Code, IntelliJ IDEA

Key-Learnings

  • Learn code quality criteria that apply to test code.
  • Recognize anti-patterns in your test code.
  • Apply some simple good practices that help to keep your test code maintainable.
  • Take away concrete action items for your day job.

Keep your automated test suites maintainable

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.

https://github.com/mkutz/untangle-your-spaghetti-test-code/

Related Sessions

Mon, Nov 13 • 8:30 a.m. – 4:30 p.m.
F-,E- & D-Rooms

Full-Day Tutorial (6 hours)

Mon, Nov 13 • 8:30 a.m. – 4:30 p.m.
F-,E- & D-Rooms

Full-Day Tutorial (6 hours)

Virtual Pass session
Wed, Nov 15 • 4:00 p.m. – 4:45 p.m.
Room F2 - Track 2: Talks

25-minute Talk

Tue, Nov 14 • 10:45 a.m. – 12:30 p.m.
Room D3+D4 - Track 8: Workshops

105-minute Workshop