Abstract: 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