A project can expect to have dozens to hundreds of files filled with specifications, explainations and associated tests. The AllFiles fixture seeks out these files and runs them all, one after another, and reports a "rolled-up" accounting of their results.
Like the ExampleTests fixture, the AllFiles fixture will take as its tabular input a list of files to be run. But here, unlike that fixture, we will expand wildcard characters in order to find all the tests in a particular place, whether we know what they are now or not.
Here are wildcard path expressions that find lots of other tests. Try runing them with http:run.cgi.
The AllFiles fixture adds rows to this table for each of the files it finds. The first column is the expanded file name, the second, the resulting counts for that run. We mark the results "wrong" if there are any wrongs or exceptions. That means the above tests will never pass because we have intentional errors in these files.
Use AllFiles when you expect all your tests to pass and only want to know when this expectation is unfounded. AllFiles does not create output files for the tests it runs unless there is a problem. Problem run results are saved and cited along with the counts in a FileFootnote that looks like , , and so on.
Test counts can sore when we start running files over and over. LessonsLearned advise us to not take big "right" counts too seriously so we don't. In fact a file with 100 right and no wrong counts as 1 right from this fixtures perspective. You can see this in the counts reported in the summary:
(Note: See more complete summary below.)
You will also note that the fixture reports total counts for the files it runs under counts run in the summary because, lessons not withstanding, we like to know.
The fixture distinguishes expandings the path specifications (doRow) from running the list of files produced (doFiles). This fixture does the files as they are expanded. The AllCombinations and AllPairs refinements expand all rows before they start doing.
The path expansion only expands one wildcard character, star (*), which means any characters here. The star can appear anywhere in a name and in any or all names that make up a path. But the expansion we've coded has the restriction that only one star is expanded in any component of the path.
The expanded file names will refer to files that may or may not use the <wiki> tag convention (See WikiRunner). This fixture is happy to run either file format and lets the presence of a <wiki> tag in the file indicate the need for its processing.
See the source.FileFootnote that is discussed on that page.
We've added some more tests to this document so the totals in the summary increase.
|Last edited April 21, 2003
Return to WelcomeVisitors