WeAreDevelopers LIVE Sep 21, 2022

Dirty Tests And How To Clean Them

Gil Zilberfeld

Treating test code worse than production code guarantees a maintenance nightmare. Discover how to apply clean code principles to eliminate test smells and turn fragile tests into clear documentation.

Pause
Mute Enter Fullscreen
#1 about 2 min

Introduction to keeping test code clean

An overview of maintaining software projects and the overarching need to keep automated test environments clean.

#2 about 5 min

Why developers treat test code differently than production code

How the psychological perception of disposable test code leads to neglected code reviews and lower coding standards.

#3 about 7 min

Defining the core principles of clean code

How clean code reduces future maintenance time by optimizing readability for other developers.

#4 about 7 min

Applying key software design rules to test code

How intent, focused scoping, single responsibility, and abstraction make automated tests easier to debug.

#5 about 5 min

Identifying common code smells in testing suites

Why god classes, overly communicative names, and magic numbers indicate poor test maintainability.

#6 about 10 min

Refactoring duplicated setups and API queries in tests

Extracting common fields and resource urls directly streamlines duplicate test setups into a robust configuration.

#7 about 4 min

Simplifying large data objects with the builder pattern

How deploying builders for complex test payloads drops setup redundancy by utilizing smart defaults.

#8 about 3 min

Separating network implementation details from domain logic

How moving json serialization and http requests into a wrapper class improves overall test readability.

#9 about 3 min

Replacing obscure magic numbers with meaningful test constants

Why labeling literals ensures future developers fully grasp what differentiates specialized testing scenarios.

#10 about 4 min

Reviewing the benefits of clean test refactoring

A concise testing architecture significantly lowers ongoing software development drag by removing duplicate logic.

#11 about 3 min

Understanding the impact of hierarchical test classes

How organizing tests with base and derived classes balances common setup routines against inheritance complexity.

#12 about 3 min

Why software testing builds a strong developmental foundation

How learning test-driven development shapes the way junior developers define operational success before writing raw code.

#13 about 6 min

Navigating independent consulting and tech career growth

Practical advice regarding self-employment risks, client acquisition, and overcoming introversion across the software engineering space.

Matching moments

1:42 min

Aligning testable code with clean code principles

Annelore Egger Annelore Egger · WWC 2025

44 sec

Treating unit tests as essential development tools

Annelore Egger Annelore Egger · WWC 2025

1:18 min

Reflecting on the core motivations for writing tests

Daniel Afonso Daniel Afonso · WWC 2025

1:42 min

Recommended tools and literature for effective testing

Alexandre Borges · WWC 2023

1:41 min

Major principles for writing high quality software tests

Markus Oberlehner · LIVE

4:00 min

Adopting test-driven design as a strategic development methodology

Mirjam Aulbach · WWC 2022

Upcoming sessions on this topic

Open session

World Congress 2026 North America

Reinventing Testing Practices in the AI Era

Eric Deandrea

Java Champion & Senior Principal Software Engineer, IBM

Eric Deandrea
Open session

World Congress 2026 North America

Agents Can't Iterate Against Tests That Lie

Rocky Warren

Senior Staff Software Engineer at Clipboard

Rocky Warren
Open session

World Congress 2026 North America

There's no dark factory without better software verifiers

Dexter Horthy

Co-Founder, HumanLayer

Dexter Horthy
Open session

World Congress 2026 North America

Testing React Backends Like a Pro: Mocking Databases with SQLite

David Morris

Solution Architect

David Morris
Open session

World Congress 2026 North America

Who Tests the AI? Building Trustworthy AI Systems at Enterprise Scale

Him Raj Singh

PayPal, Manager, Software Engineer

Him Raj Singh
Open session

World Congress 2026 North America

Your Evals Passed. Your Agent Just Emptied a Database.

Tejas Pravinbhai Patel

IEEE Award-Winning Researcher | Best Keynote Speaker | Sr. Software Engineer at Amazon | AI Systems & Agent Architect

Tejas Pravinbhai Patel