High-quality automated unit tests are one of the key development practices that enable incremental development and delivery of software. xUnit is the generic name given to the family of tools/frameworks used by developers when developing automated unit tests. JUnit, NUnit, MsTest and CppUnit are some of the better-known members of the family.

This 1-day workshop provides the participants with a vocabulary of test smells and patterns with which to elevate their craft when writing or refactoring test code. These smells give them a way to reason about the quality of their test code. The reusable test code design patterns can be used to eliminate the smells. The emphasis will be on refactoring tests to make them easier to understand and maintain.

The workshop introduces a systematic way to identify the test conditions the software needs to handle and how to prepare tests that clearly describe those test conditions in a human-readable way so that the tests can act as effective documentation of what the software should do and what it’s design should be.

Learning Outcome

Write new tests that clearly describe the test condition being verified

Write tests that are easy to understand even when using Stubs, Mocks, and Spies

Improve the testability of code through refactoring

Target Audience

Software developers and test automation engineers

Prerequisites for Attendees

All participants should bring laptops with a software development environment installed. I will provide sample code in Java (Eclipse) and C# (Visual Studio + ReSharper + NUnit) to be used in the exercises. Participants may also bring their own code to improve during the exercises.