Principles of Unit Testing

josephdpurcell@gmail.com

The proliferation of testing strategies outside of a broadly agreed set of definitions has caused confusion and a waste of effort by choosing the wrong strategy for the goals to accomplish. Let's change that.

In this session, we will cover the five types of test doubles: dummy, fake, stub, spy, and mock, showing code examples of how to use each. Using these as building blocks we will look at how code smells naturally surface from their use and strategies to mitigate them.

The key takeaway from this session will be a solid understanding of unit testing and when to apply a different testing strategy. If you are new to unit testing or are looking for ways to improve your skill, this session is for you!

Session Track

Coding and Development

Experience Level

Beginner

Drupal Version