26.2. Running Fit on FoldersThe simplest approach to running Fit on the .XLS and .HTML files in a folder is to use the following command in that folder[1]:
java -cp javafit1.1.jar fitlibrary.jar;poi.jar;code fit.runner.FolderRunner This example command assumes that the JAR files are in the current folder and that the code for all the fixtures and the system under test are in the code folder. The FolderRunner runs Fit over all .XLS and .HTML files in the folder, and all subfolders, producing a test suite report in the file reportIndex.html. To specify other folder locations for the test files and for where the reports are to be written, include the two file names in the command: java -cp javafit1.1.jar fitlibrary.jar;poi.jar;code fit.runner.FolderRunner Tests Reports As it runs the tests in a folder, FolderRunner looks for SetUp.xls and then SetUp.html files in that folder, in that order, to prepend to the start of each test file. Likewise, FolderRunner looks for TearDown.xls and then TearDown.html files in that folder, in that order, to append to the end of each test file. Note FolderRunner depends on Poi, an open source system for reading and writing Excel files. Poi is available from jakarta.apache.org/poi. As Poi is still under development, you may find that it cannot read some Excel files. |