Why Test?

Reading

TDD with XUnit Frameworks

Reading

Examples

  • Using tests to explore third party code

Labs:

  • TDD: TDD for Pizza shop

BDD

Reading

  • North, Dan Introducing BDD. Words matter, and the difference between "behavior" and "test" is important. BDD evolved from TDD, but it has become something quite different, and can drive the way you think about software.

Examples

Coverage

Reading

Examples

  • Anything that isn't covered!
  • Build script: Cobertura tasks

Labs

Refactoring

Reading

  • Shore, James. Red-Green-Refactor: simple and powerful.
  • Wikipedia. Refactor Mercilessly: works espeically well if you test relentlessly, integrate continuously, and do the simplest thing that could possibly work.

Examples

Labs

Mocking

Reading

  • Fowler, Martin. Mocks Aren't Stubs. Mocks are part of a larger family of test objects, that can be used to support testing both state and behavior.

Examples

Labs

Groovy

Reading

Refactotum

Reading

Additional Reading

  • Beust, Cedric. Don't Call Super. It can be difficult to reuse code across JUnit test cases. Inheritance more than one-deep from TestCase is fragile and error-prone.
  • Beust, Cedric. Using annotation inheritance for testing. You might want to explicitly state dependencies between tests, and how to do it in TestNG.
  • Jeffries, Ron. (Software Download Page). Descriptions and download links for testing tools in a variety of languages.