houssainy@google.com 24f62e1a28 Adding getStats function to the exposed PeerConnection in RtcBot
Exposed Peerconnection object has new function "getStats". This function
returns the stats as array of reports, and each report is RTCStatReport
with additional attributes names and stats.

names: array of all the stat names in current report.
Stats: dictionary and the key is the stat name, and value is the value
of this stat.

R=andresp@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/23779004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7319 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-09-29 09:36:28 +00:00
..
2014-09-22 13:52:39 +00:00

=== RTCBot ===
RTCBot is a framework to write tests that need to spawn multiple webrtc
endpoints.

== Description ==
RTCBot is a framework that allows to write tests where logic runs on a single
host that controls multiple endpoints ("bots"). It allows creating complex
scenarios that would otherwise require non-trival signalling between multiple
parties.

The host runs in node.js, but the test code is run in an isolated context with
no access to node.js specifics other than the exposed api via a test variable.

Part of the exposed api (test.spawnBot) allows a test to spawn a bot and
access its exposed API. Details are in botmanager.js.

== How to run the test ==
 $ cd trunk/webrtc/tool/rtcbot
 $ npm install express browserify ws websocket-stream dnode
 $ node test.js <bot_type> <test_file_path>

 <bot_type> — the type of the running bot. For example:
  - chrome: chrome on host machine.
  - android: android device. Details in "Android" Section.
  - android-chrome: chrome on android device. Details in "Android" Section.

== Example on how to install nodejs ==
 $ cd /work/tools/
 $ git clone https://github.com/creationix/nvm.git
 $ export NVM_DIR=/work/tools/nvm; source $NVM_DIR/nvm.sh
 $ nvm install 0.10
 $ nvm use 0.10

== Android ==
Before running test with Android one MUST forward the device port 8080 to the
host machine. That is easy to achieve with chrome port forwarding tools.
 - Visit chrome://inspect/devices on the host machine.
 - Configure and enable port forwarding 8080 -> localhost:8080
 - Open chrome on you Android device before running test, and leave it
   running until the end of test.
 - Run your test.