How to know if your Unit Test Fixture is “right-sized”?

Posted by leeand00 on Stack Overflow See other posts from Stack Overflow or by leeand00
Published on 2010-05-13T19:54:34Z Indexed on 2010/05/14 20:34 UTC
Read the original article Hit count: 176

How do you know if you "Test Fixture" is right-sized. And by "Test Fixture" I mean a class with a bunch of tests in it.

One thing that I've always noticed with my test fixtures is that they get to be kind of verbose; seeing as they could also be not verbose enough, how do you get a sense of when your unit tests are the right size?

My assumption is that (at least in the context of web development) you should have one test fixture class per page.

I know of a good quote for this and it's:

"Perfection is achieved, not when there is nothing left to add, but when there is nothing left to remove." - Antoine de Saint-Exupery.

© Stack Overflow or respective owner

Related posts about unit-testing

Related posts about verbose