2 RTCBot is a framework to write tests that need to spawn multiple webrtc
6 RTCBot is a framework that allows to write tests where logic runs on a single
7 host that controls multiple endpoints ("bots"). It allows creating complex
8 scenarios that would otherwise require non-trival signalling between multiple
11 The host runs in node.js, but the test code is run in an isolated context with
12 no access to node.js specifics other than the exposed api via a test variable.
14 Part of the exposed api (test.spawnBot) allows a test to spawn a bot and
15 access its exposed API. Details are in botmanager.js.
17 == How to run the test ==
18 $ cd trunk/webrtc/tool/rtcbot
19 $ npm install express browserify ws websocket-stream dnode
20 $ node test.js <bot_type> <test_file_path>
22 <bot_type> — the type of the running bot. For example:
23 - chrome: chrome on host machine.
24 - android: android device. Details in "Android" Section.
25 - android-chrome: chrome on android device. Details in "Android" Section.
27 == Example on how to install nodejs ==
29 $ git clone https://github.com/creationix/nvm.git
30 $ export NVM_DIR=/work/tools/nvm; source $NVM_DIR/nvm.sh
35 Before running test with Android one MUST forward the device port 8080 to the
36 host machine. That is easy to achieve with chrome port forwarding tools.
37 - Visit chrome://inspect/devices on the host machine.
38 - Configure and enable port forwarding 8080 -> localhost:8080
39 - Open chrome on you Android device before running test, and leave it
40 running until the end of test.