Test Runner - Connectors
The term connector referes to a connection between tests and their associated source file(s). Connectors are executed during the running process and their calculated results are cached in a file to be compared with the filesystem upon detection.
Note: as dependencies are calculated and stored during the test running process, you must have a <dependencyCache></dependencyCache> the the root <config> section for the connectors to work properly.
Types
The tabs below detail each type of scanner currently distributed with the test runner.
Dependency Connector
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>
<dependencyCache>
<file>/path/to/resolvedDependency.cache</file>
</dependencyCache>
<scanners>
<scanner>
...
<connectors>
<connector>
<type>Dependency</type>
<options>
<pathToCode>/path/to/library/sources/</pathToCode>
</options>
</connector>
</connectors>
<filters></filters>
</scanner>
</scanners>
<runner></runner>
</config>
Source
Source for the Dependency Connector: TestRunner/library/Blerby/TestRunner/Connectorr/Dependency.php
One To One Connector
This connector is useful in the case where your test directory mirrors your source directory. A picture is worth a thousand words, so here is a simple example:

As you can see, both the test and source directories are identical. This is the only type of circumstance in which this connector is useful.
The Dependency Connector is favored over this one as it provides a more inclusive method of resolving dependencies between tests and their sources.
Configuration
<config>
<dependencyCache>
<file>/path/to/resolvedDependency.cache</file>
</dependencyCache>
<scanners>
<scanner>
...
<connectors>
<connector>
<type>OneToOne</type>
<options>
<pathToCode>/path/to/library/sources/</pathToCode>
</options>
</connector>
</connectors>
<filters></filters>
</scanner>
</scanners>
<runner></runner>
</config>
Source
Source for the OneToOne Connector: TestRunner/library/Blerby/TestRunner/Connector/OneToOne.php
Source
Source to the base connector implementation: TestRunner/library/Blerby/TestRunner/Connector.php
Related