The Secrets of Effective Unit Testing

19 May 2015
09:00 - 17:00
Thon Hotel: RIo

The Secrets of Effective Unit Testing

When we’re starting to look into unit testing, we get the simple examples that work in an ideal world. When we start working on actual code we bump into reality. While unit testing is not easy, it can be easier.

In this workshop, we’ll try our hands in different techniques of unit testing. We’ll discuss naming methods, practice refactoring and techniques of Test Driven Development that work in the real world. Although we think about unit testing as a “tool thing”, it is really a set of skills that we can continue to develop over years. In this workshop we will learn how we can identify and improve those skills.

This is an advanced hands-on workshop. We don’t teach unit testing basics and assume at least basic experience in unit testing.

Target audience:

This workshop is for developers with some unit testing and/or TDD experience who want to enhance their skills. Attendees need to bring a laptop with their favorite IDE in their favorite language (it doesn’t matter which one), and testing framework.

After this workshop you will be able to:

  • Understand and design your code according to the “Four Rules of Simple Design”
  • Prepare your existing legacy code for unit testing
  • Refactor for better design with the aid of tests
  • Identify and use patterns used in TDD
  • Use the “Transformation Priority Premise” in TDD

Workshop outline:

  • Unit testing with real code
  • 4 Rules of Simple Design
  • Refactoring with tests – Code smells deodorant
  • Refactoring as preparation for Tests
  • TDD Patterns
  • Transformation Priority Premise
Main Message: Unit testing is a set of skills. This workshop gives a place to introduce and practice those skills.
Key Points: Unit testing is not a “tool”, it’s a set of skills Naming is important on so many levels. Unit testing, as other types of testing, requires planning and learning. The refactoring part is mostly not talked in regards to unit testing, but we’re going to fix that.