Testing complex compositions
Posted
by
phlipsy
on Programmers
See other posts from Programmers
or by phlipsy
Published on 2014-06-13T04:30:23Z
Indexed on
2014/06/13
9:40 UTC
Read the original article
Hit count: 161
I have a rather large collection of classes which check and mutate a given data structure. They can be composed via the composition pattern into arbitrarily complex tree-like structures. The final product contains a lot of these composed structures.
My question is now: How can I test those? Albeit it is easy to test every single unit of these compositions, it is rather expensive to test the whole compositions in the following sense:
- Testing the correct layout of the composition-tree results in a huge number of test cases
- Changes in the compositions result in a very laborious review of every single test case
What is the general guideline here?
© Programmers or respective owner