Back To Schedule
Thursday, April 20 • 15:20 - 16:50
Unit Test Abstraction: Crafting Sustainable Tests (Jeff Langr)

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Don't end up twirling down the bad-test death spiral! Coding unit tests is an investment, and if you're not careful, it will all be for naught: Many teams quickly built a significant number of unit tests, only to find out that their low quality pushes them into disuse, then to disrepair/dysfunction, and ultimately to discarded.
Part of sustaining TDD or "test-after development" (TAD) unit testing is recognizing that the tests must play a role as documentation on the behaviors of the system under test. In this hands-on workshop, we'll focus on applying the notion of abstraction--amplifying essential elements and suppressing irrelevant details--to unit tests. You'll learn to sniff out a couple hands-ful of test smells that relate to poor test abstraction. You'll work on eliminating these smells to create tests that are literary and emphasize immediacy of understanding. (And you'll hear a bit about why this pays off.)
You'll find codebases for this workshop in Java and C#. Download before the session from https://github.com/jlangr/utabstraction and get ready to clean up!

Learning Outcomes:
  • the concept and value of emphasizing abstraction in tests
  • how to recognize smells in tests
  • how to eliminate smells from tests
  • how to use tests as entry points for understanding system behaviors
  • how to negotiate test readability by pairing

avatar for Jeff Langr

Jeff Langr

Owner, Langr Software Solutions, Inc.
Jeff Langr has been professionally building software for over a third century. He is a contributor to Clean Code and the author of 5 books on software development: Pragmatic Unit Testing in Java 8 with JUnit, Modern C++ Programming with Test-Driven Development, Agile in a Flash, Agile... Read More →

Thursday April 20, 2017 15:20 - 16:50 EDT