2 Overview of tests shipped with AFB-Daemon
3 =========================================
8 Here are the tests shipped in the source tree:
10 * **afb-client-demo** (command-line WebSockets)
12 * **token-websock.qml** (Qt/QML WebSockets)
14 * ***.html** (HTML5/JS HTTP-REST & WebSockets)
20 ### afb-client-demo (command-line WebSockets)
22 This clients interactively calls bindings APIs from the command line, using the binder
23 [WebSockets](https://en.wikipedia.org/wiki/WebSocket) facility.
25 If _afb-daemon_ has been launched with the following parameters:
28 $ afb-daemon --port=1234 --token=123456 [...]
31 Then run the client with :
33 afb-client-demo ws://localhost:1234/api?token=123456 [<api> <verb> [<json-data>]]
35 For instance, to initialize the Audio binding from the command line :
37 afb-client-demo ws://localhost:1234/api?token=123456
39 The command doesn't return. You should type requests of type <api> <verb> [<json-data>].
49 ### token-websock.qml (Qt/QML WebSockets)
51 If _afb-daemon_ has been launched with the following parameters:
53 $ afb-daemon --port=1234 --token=123456 [...]
57 For installing Qt5 on **Ubuntu 16.04**:
59 $ apt-get install qmlscene qml-module-qtwebsockets qml-module-qtquick-controls
61 For installing Qt5 on **Fedora >= 22** :
63 $ dnf install qt5-qtdeclarative-devel qt5-qtwebsockets-devel qt5-qtquickcontrols
66 Then run the client with :
68 qmlscene test/token-websock.qml
70 and interactively press the buttons, "Connect", "Refresh", "Logout".
75 ### *.html (HTML5/JS HTTP-REST & WebSockets)
77 If _afb-daemon_ has been launched with the following parameters:
79 $ afb-daemon --port=1234 --rootdir=$PWD/test [...]
81 _("$PWD/test_" being the "test" subdirectory of the source tree)_
84 Then open your preferred Web browser, connect to the following URL:
88 and interactively run the various tests.