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