Skip to main content
EuroPythonCode of ConductBuy tickets

How much time does it take to write tests? A case study

Room:
Liffey Hall 2
Start:
15:05 on 13 July 2022
Duration:
30 minutes

Abstract

Writing automated tests takes time. As developers, we are constantly pressed by management to deliver early, which means we are tempted to skip writing some of the tests. Of course, in the long term, the time needed to write tests is paid off.

But how much of our time do we spend in order to write tests? Is it half? Is it three-quarters? This can be difficult to measure, particularly if we are using test-driven development, because in that case writing tests is integrated in the process of writing code.

While I like test-driven development, I can only practice it when I have a good idea of what code I want to write. But sometimes my idea of how to approach the problem at hand is quite vague and I experiment a lot. In these cases, I write the code first and the tests after that.

In one such case I first finished the functionality I was developing and proclaimed it "beta". I then went on to write the unit tests for it. As a result, I have a clear idea how much time I spent writing documentation and main code, and how much I spent writing tests. In this talk I examine the implications of all this.

TalkTesting


The speaker

Antonis Christofides

I've been writing software for more than 30 years. I’ve written software to streamline the management of hydro/meteorological measurements; to make time series visualization and processing easy; to provide irrigation advice; and much more. I have been working with automatic meteorological stations since 1992; I’ve occasionally written programs to interface directly with meteorological loggers; I’ve dug out dusty old handwritten weather observations and keyed them in myself; I have created various web sites and web-accessible databases; I’ve administrated servers, including email and network, and high-availability databases with automatic failover. I have written the book on Django deployment (https://djangodeployment.com).

In research, I’ve worked on water-related decision making when there are conflicting objectives; on evaluation of climate models; on causation and determinism in hydrology and the climate; and more. My opinion on climate change is that there is no evidence that it is man-made.

I help scientists and engineers create software. In particular, I help them bring their models to the web.



← Back to schedule