DjangoCon US 2023

Empathetic testing: Developing with compassion and humility.
2023-10-17 , Grand Ballroom II-III

Have you ever encountered a codebase where modifying code seemed impossible due to the constraints of the test suite? Are the tests that you write today inadvertently restricting future improvements? In this talk, we will uncover how placing empathy at the forefront of test suite development can empower rather than hinder future developers, including your future self.


Tests can be a powerful tool used to increase our development speed and empower us with the confidence to refactor and improve codebases. Writing tests with these goals in mind requires empathy and compassion toward other developers and even our future selves. Conversely, tests written with different objectives, such as achieving an arbitrary coverage score, can have the opposite effect and cause suffering.

Together, we will explore the following ideas:

  • How writing tests beforehand is an act of compassion.
  • Testing outcomes, rather than implementation choices, takes humility.
  • Empathizing with cognitive overwhelm: how isolating and minimizing test setup can make your code easier to understand and extend.
  • Do you really need that mock? Balancing the needs of now with those of the future.

This talk aims to provide valuable insights for beginners embarking on their testing journeys and challenge experienced developers to contemplate their philosophy toward testing. While a basic familiarity with testing in Django is beneficial for understanding practical examples, it is not a prerequisite.

Marc is a full stack developer and consultant based in the Greater Toronto Area. He has been working with Django since version 1.4 was released over a decade ago. He specializes in API development and is passionate about developer quality of life.

Marc is a recovered musician who played the oboe professionally with symphony orchestras across Ontario and Québec. He authored Django REST Swagger, a once popular but now deprecated library used to generate documentation for APIs written with Django REST Framework.

In his spare time, Marc enjoys gravel biking, a hobby he picked up following his first successful battle with cancer in 2020. He founded Port Perry Pedals, an annual cycling event which has raised over CA$ 60,000 for charity since 2021.