||This is the most generic of our ExampleTests. Here we shows how fixtures can expand the capabilities of the framework. We follow a progression. Read this whole page for the overview then look at each fixture in turn.
We introduce three "macroscopic" fixtures. These find and run other tests. We start with wildcard directory searches that produce all files, lists of tests which are run in order.
An extenion of all files is to run all combinations where tests from each list are run in all possible arangements. But be careful. Even medium sized lists generate a huge number of combinations. We address this explosion with the tester's secret weapon, a variation on combinations called all pairs where cases are constructed such that all posible pairs of files are run. With two lists this is the same as combinations. But with three or more lists we save by only promising to run all pairs, not all possible tripples, quads and so on. This way we look for a great dead of (pairwise) feature interaction in a modest number of tests.
These are general purpose fixtures that you can use as is. We've packaged them as examples because we think they suggest even more exotic fixtures and that makes them worthy of study. We suspect that these fixtures, or fixtures like them, will join the core framework once we understand their strengths and limitations.
See LessonsLearned for more discussion of the all pairs algorithm (pp 52-60). Although combinations can be worked up with nested loops, all pairs requires a search similar to the classic bin packing algorithms. We use an algorithm modeled after JamesBach's perl implementation which he generously distributes.