blob: 72f9f63f875174afca14ff720c9971353806b312 [file] [log] [blame]
andresp@webrtc.org468516c2014-09-02 10:52:54 +00001=== RTCBot ===
2RTCBot is a framework to write tests that need to spawn multiple webrtc
3endpoints.
4
5== Description ==
6RTCBot is a framework that allows to write tests where logic runs on a single
7host that controls multiple endpoints ("bots"). It allows creating complex
8scenarios that would otherwise require non-trival signalling between multiple
9parties.
10
11The host runs in node.js, but the test code is run in an isolated context with
12no access to node.js specifics other than the exposed api via a test variable.
13
14Part of the exposed api (test.spawnBot) allows a test to spawn a bot and
houssainy@google.comc77e4d62014-09-08 10:36:11 +000015access its exposed API. Details are in botmanager.js.
andresp@webrtc.org468516c2014-09-02 10:52:54 +000016
17== How to run the test ==
18 $ cd trunk/webrtc/tool/rtcbot
19 $ npm install express browserify ws websocket-stream dnode
houssainy@google.com3e2f8ff2014-10-15 15:01:11 +000020 $ node test.js <test_file_path>
andresp@webrtc.org468516c2014-09-02 10:52:54 +000021
22== Example on how to install nodejs ==
23 $ cd /work/tools/
24 $ git clone https://github.com/creationix/nvm.git
25 $ export NVM_DIR=/work/tools/nvm; source $NVM_DIR/nvm.sh
26 $ nvm install 0.10
27 $ nvm use 0.10
houssainy@google.comc77e4d62014-09-08 10:36:11 +000028
houssainy@google.com3e2f8ff2014-10-15 15:01:11 +000029== Supported Bot Types ==
30 - "chrome": chrome on host machine.
31 - "android-chrome": chrome on android device. Details in "Android" Section.
32
33 * Bot type is specified for each spawned bot in the test file.
34
houssainy@google.comc77e4d62014-09-08 10:36:11 +000035== Android ==
36Before running test with Android one MUST forward the device port 8080 to the
37host machine. That is easy to achieve with chrome port forwarding tools.
38 - Visit chrome://inspect/devices on the host machine.
39 - Configure and enable port forwarding 8080 -> localhost:8080
houssainy@google.com96005192014-09-08 13:01:40 +000040 - Open chrome on you Android device before running test, and leave it
41 running until the end of test.
42 - Run your test.