The Multi-File Code Coverage Tool allows coverage information gathered from a single program evaluation to be displayed on multiple source files in multiple DrRacket windows.
Multi-File Code Coverage is a Planet package, however it only adds a tool rather than providing functions. To install evaluate the following program:
|(require (planet jowalsh/code-coverage))|
... and then restart DrRacket.
First ensure that you have "Syntactic Test Suite Coverage" enabled in the "Language->Choose Language..." dialog. Then run the program you wish to collect multi-file coverage information for. Finally, click the "Multi-File Coverage" button. A new dialog will apear with the list of file covered by the program you just ran.
You may then select one, or more, of the covered files to open and switch focus to. Additinaly, by clicking the "Open With Uncovered Lines Dialog", instead of just "Open", each selected file will spawn an additional dialog with a list of lines containing unevaluated expressions.
The percent in parentheses, next to each file, is the percent of covered lines in that file. So 100% indicates that every line in that file is covered. Blank lines and comments are also counted as covered lines.
An asterisk may appear next to files in the covered files dialog. This indicates that the file has been modified since multi-file coverage information was last collected, which may have invalidated its coverage info. To ensure that all coverage information is valid run the program you are collecting multi-file code coverage for again.
Whenever the "Multi-File Coverage" button is clicked the multi-file code coverage information is saved to a file. This file is named <file name>.rktcov and saved in the "compiled" directory next to the source file.
Only un-compiled files will appear in the covered files dialog. To ensure that all your covered files appear delete any "compiled" directories next to your source files. Then run your program again and click the "Multi-File Coverage" button.