Test Fixture Introduction

Reduce duplication by using a test fixture. Let’s look at the basic syntax.

Session Outline

Connect: Duplication and Readability

Concept: Test Fixture

Explain what it is, ask them to google for 2 minutes to find the documentation for the language and framework you’re using. Ask them to find a good worked example.

Ask people to share the links to the resources they found and spend a few more minutes looking through each other’s links together.

Concrete: Convert duplication to fixture

In RecentlyUsedList, there are several tests which share common code. Refactor them to use a test fixture.


Note down in your own words what you learnt about a custom assert and a test fixture.