This presentation is based on the excellent book "Growing Object-Oriented Software, Guided by Tests". The key points in this deck discuss the importance of tests as related to software design.
Mocks Do our objects do the right thing, are they “easy” to use? Integration Testing Stubs, Fakes Does our code work against code we can’t change? End to End Testing Live systems Database level Functional Testing Acceptance Exercise system logic Does the whole system work?
behaviour at the level of a shared language Use matchers to build up the domain language Testing has its own “language” assertThat(theCookie, is(myCookie); Programs must be written for people to read, and only incidentally for machines to execute. - Abelson & Sussman
brittleness “Test Smells” are symptoms of design flaws Too many mock objects Lengthy, vague expectations Needing to mock out private functions Excessively complex matchers If a test is difficult to write, it is sometimes good to ask why is it difficult