How to know if your Unit Test Fixture is “right-sized”?
- by leeand00
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.