Testing

Topic

Overview

An Introduction to Simpletest A hello world example of writing tests using Simpletest. You should give this a try.
In-depth Overview of Simpletest Covers the basics and then goes into strategies for actually using Simpltest in production.
An Introduction to PHPUnit PHPUnit has the entire framework documented pretty well. Start with this guide.
Mocking Global PHP Functions Some black magic with namespaces to mock global functions
Unit Testing Complex Classes Learn how to unit test some of the more complex D8 classes, including classes dependant on the container.
Why Your Test Suits Sucks Great talk on TDD by Ciaran McNulty
Prophecy in Drupal Intro to using Prophecy for mocking in Drupal 8
BDD Intro An introduction to BDD, plenty of other resources at the bottom of the page
BDD & Code coverage Thoughtful stackoverflow post that demostrates my feeling on code coverage.