O'Reilly logo

Lean-Agile Acceptance Test-Driven Development: Better Software Through Collaboration by Ken Pugh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 31. Test Setup

“It’s not what I do, but the way I do it. It’s not what I say, but the way I say it.”

Mae West

This chapter discusses the trade-offs between using an individual setup for tests and using a common setup. It also explores concerns about test order and persistent storage.

A Common Setup

You may have noticed that the setup for several of the triad’s tests started to be repetitious. All the tests need customers and CDs to rent or return. It is tempting to place the repetitive setup into a common setup. There is a classic trade-off between decreasing duplication by the common setup and increasing the possibility that altering the common setup causes failing tests.1 A common setup for all tests might be as follows.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required