Experiments with test setup
Speaker: Iwan Vosloo
Room: Tugela Room
Time: Oct 06 (Thu), 15:30
Ever since test driven development took hold, people have been experimenting with different ways to deal with setting up and tearing down test objects and data (amongst other things).
Focussing on this particular concern (set up and tear down of test objects), this talk provides an overview of how the mainstream python tools have developed over time in this regard: unittest, nose and py.test. A bit of a wider context is also given in terms of two ideas pioneered by tools in other languages: the annotations of TestNG and resources of Smalltalk's SUnit. Two ideas that address problems beyond the reach of the tools themselves are also introduced, namely the "object mother" and "builder pattern".
Against the backdrop of this overview, I also show some of our own experiments (as part of the Reahl project) to translate a combination of the object mother and the builder pattern into Python -- with surprising results.
The talk is aimed at people interested in improving the ways we can do set up for tests and people who are generally interested in how tests can be made easier to write and more useful. I hope to stimulate more thoughts around the topic against the backdrop of a slight overview. The talk is accessible to newcomers to this topic as well.