|There's more than one way to do things|
Re: (OT) Help with test designby t'mo (Pilgrim)
|on Sep 11, 2003 at 17:41 UTC||Need Help??|
Consider a design that has not only inheritance but composition, maybe like:
Is part of your question how to write tests for D that will cover all the stuff in the included packages? That's a good question...I'm curious to find out The Answer™, but I think halley was on the right track.
From my own experience, this is simply one of those areas where you have to work from bottom to top: write the tests for A (including its subclasses), then those for B, and on up.
My insight, shallow as it might be, is based on a toy program (an "address book") I'm experimenting with. Substitute the following:
The tests require some thought and planning. I have separate test cases for the simplest cases (A::a), and slowly work up to the bigger ones (so far up to the C level).
To me it seems test design gets more complex if you want to "automate" testing. For example, lots of things in my toy app depend on the data available in backend database. I anticipate (unless The Answer™ proves otherwise) that I'll have to include in any automatic test scripts the creation and population of a test database.
So, I don't think I've really answered your question; it seems to be my question also (unless they're not really the same question and I'm projecting mine onto yours :-)).
Update: Another post has given me some more things to think about with respect to the question.