Test maintainability: consider creating a test fixture "per method" instead of "per class"

My blog has moved. You can view this post at the following address: http://www.osherove.com/blog/2005/4/11/test-maintainability-consider-creating-a-test-fixture-quotpe.html
Published Monday, April 11, 2005 5:26 PM by RoyOsherove

Comments

Thursday, April 14, 2005 8:51 PM by Dale Emery

# re: Test maintainability: consider creating a test fixture "per method" instead of "per class"

I had an idea to write one test fixture per feature. This isn't quite the same as one fixture per method, but it's similar.

Another idea I had is to write one fixture for each of a class's interfaces. That way, the tests are written from the perspective of a particular set of clients (the ones that use that interface).

I haven't tried either of these approaches yet, so I don't know whether they help in practice.

In any case, I do like your idea because it makes fixture names more meaningful.