Clone this wiki locally
A slave is an application which connects to the server instance and executes commands send by the server. Each slave provides the required execution environment, runs the commands sent by the server and reports back results. What commands the server can send and the client to execute depends on what modules have been loaded - for example by default the TestManager module is loaded which allows QUnit tests to be run on the client.
There are two types of slaves that the server is currently able to connect to:
forked node.js processes
Communication with the slave goes through the built-in messaging channel provided by node.js
web browsers - using a Socket.IO instance serves as the communication channel
To turn a browser into a slave it must load a special HTML page which can be found as BrowserDriver.html in the "client" folder of the package. When testing given website, to avoid cross-domain issues, it is important to copy this page to the same server where the site will be loaded from and specify its url in the browserDriverUrl option in the configuration file. If for example performancehorizon.com needs to be tested then BrowserDriver.html can be copied as http://performancehorizon.com/BrowserDriver.html and in this url shall be set for "browserDriverUrl" in the configuration file. When all resources that the tests will need will be loaded from the BrowserDriver's server then BrowserDriver.html can be used from the "client" folder and "browserDriverUrl" should only be adjusted if the host option is specified.