Getting Started Testing, by Ned Batchelder
This PyCon talk is a great introduction to unit tests and mocking. It starts from having a common position – having no tests – and steps you through gradual improvements until you have a proper unit test framework. The second half is a clear, concise explanation of mocking.
If you’ve never done any testing, this is a really good place to start. If you already know how to test, it’s a good opportunity to revisit the fundamentals.
And even though this is a PyCon talk, it applies to all programming languages. The examples are Python, but the ideas apply everywhere.
[If you were at last week’s CamPUG meeting, this is the talk I mentioned.]