Get Lanyrd on your mobile (iPhone, Android and more) - check it out here

Fast Test, Slow Test

A session at PyCon US 2012

Most unit tests aren't and their authors suffer for it. What is a unit test, really? How can writing them prevent classic testing problems? If you do write them, what trade-offs are you implicitly making?

Your unit test suite takes three minutes to run 500 tests. On a modern CPU, that's just shy of a billion instructions per test. Can something that takes a billion CPU instructions really be called a "unit"? What is that suite really testing?

Many (and probably most) unit testing failures are related to size. Most common are the suite that takes half an hour to run (so no one runs it), the suite whose runtime scales like lines_of_code^2 (so, again, no one runs it), and the suite that requires huge maintenance for small changes (leading to the "testing is slow" myth).

This talk is about the "unit" in "unit test": what does it really mean, why do we care, and how does it prevent the three crippling problems above? And, of course, if we do shift our focus toward unit tests, what trade-offs are we really making?

About the speaker

This person is speaking at this event.
Gary Bernhardt

hey just wondering if there's some programming language that has lazy lists and lots of monads? haven't heard of one yet (ノಥ益ಥ)ノ ┻━┻ bio from Twitter

Next session in D5

12:10pm Speedily Practical Large-Scale Tests by Erik Rose

Sign in to add slides, notes or videos to this session

Tell your friends!

When

Time 11:30am12:10pm PST

Date Fri 9th March 2012

Short URL

lanyrd.com/spbyq

Official session page

us.pycon.org/…e/presentation/429/

View the schedule

Topics

See something wrong?

Report an issue with this session