Test Runner - Scanners
In Blerby Test Runner land, a scanner locates files for the runner to run. The results are sent to the client's browser where javascript then takes over and queues the results in the pending tests list. The scanner architecture is fairly flexibly allowing for different types of file system scanning the following sections detail the configuration and functionality of a scanner
As of version 0.5 support for glob() style directory locating is functional. (example: /path/to/source/*/tests/)
Types
The tabs below detail each type of scanner currently distributed with the test runner.
Manual Test Scanner
This test scanner is a placeholder scanning mechanism. It does not scan files, but instead sets detection heartbeat to 0 (off). In short it disableds automatic scanning, in favor of manual scanning which is achieved by using the File scanner whenever scan requests are made.
Configuration
<config>
....
<scanners>
<scanner>
<type>Manual</type>
<options>
<path>/path/to/tests</path>
</options>
<filters>...</filters>
</scanner>
</scanners>
</config>
Source
Source for the File ModTime Scanner: TestRunner/library/Blerby/TestRunner/Scanner/Manual.php
File Scanner
Scans all configured directories and returns all found files allowed by the configured filters. This can cause extra load since there is no caching involved, and using the default front, tests will be automatically detected/added to the test queue at every interval.
Configuration
<config>
....
<scanners>
<scanner>
<type>File</type>
<options>
<path>/path/to/tests/</path>
</options>
<filters>...</filters>
</scanner>
</scanners>
</config>
Source
Source for the File Scanner: TestRunner/library/Blerby/TestRunner/Scanner/File.php
File ModTime Scanner
The File_ModTime scanner scans a directory and caches the resulting file's mod times. This makes the scanning process more efficient once it caches all of the files available in the configured directories. Once cached it will only report changes, additions, and deletions.
Configuraion
<config>
....
<scanners>
<scanner>
<type>File_ModTime</type>
<options>
<name>cacheFileName</name>
<path>/path/to/tests</path>
<cache>
<path>/path/to/cache/</path>
</cache>
</options>
<filters>...</filters>
</scanner>
</scanners>
</config>
Source
Source for the File ModTime Scanner: TestRunner/library/Blerby/TestRunner/Scanner/File/ModTime.php
Source
Source to the base scanner implementation: TestRunner/library/Blerby/TestRunner/Scanner.php
Related