Does the code we develop work the way we think it does? To what extent do we have confidence in the accuracy of results that we publish? When you or your group extends your code, does all the existing functionality carry on working as before? Can we automate testing so we’re not reliant on remembering to run tests?
This course will provide a hands-on introduction to an important aspect of verifying software correctness: unit testing. We will use a small Python project to introduce concepts and to get some hands-on experience writing unit tests, and we will use GitHub to automate the process of running them. By the end of the course, we hope you will be convinced that writing tests will save you time in the long run.
Participants should have a GitHub account and have a basic familiarity with Python or a similar programming language.
This course will cover:
- what is software testing
- using a unit testing framework
- writing unit tests
- testing for errors
- parameterising tests to run with multiple inputs
- automating the running of unit tests
Any graduate student or researcher at the University of Oxford who writes code and would like greater confidence that their code is correct.
Participants should have:
- a GitHub account
- a basic familiarity with Python or a similar programming language