From ec667b3dfe10945dc6fa140ef5acaaf10a437db9 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Mon, 30 May 2016 15:00:57 +0200 Subject: update documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I64a28ead6a82658dd9a95c7d54742dbe018ef574 Signed-off-by: José Bollo --- doc/afb-tests-overview.md | 83 ++++++++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 37 deletions(-) (limited to 'doc/afb-tests-overview.md') diff --git a/doc/afb-tests-overview.md b/doc/afb-tests-overview.md index a4632d49..4ea25275 100644 --- a/doc/afb-tests-overview.md +++ b/doc/afb-tests-overview.md @@ -1,38 +1,44 @@ # Overview of tests shipped with AFB-Daemon Version: 1 - Date: 30 May 2016 + Date: 30 mai 2016 Author: Manuel Bachmann ## List of tests - Here are the tests shipped in the source tree: - * **afb-client-demo** (command-line WebSockets) - * **token-websock.qml** (Qt/QML WebSockets) - * ***.html** (HTML5/JS HTTP-REST & WebSockets) + +Here are the tests shipped in the source tree: + +* **afb-client-demo** (command-line WebSockets) +* **token-websock.qml** (Qt/QML WebSockets) +* ***.html** (HTML5/JS HTTP-REST & WebSockets) ## Detail of tests ### afb-client-demo (command-line WebSockets) -This clients interactively calls plugins APIs from the command line, using the binder [WebSockets](https://en.wikipedia.org/wiki/WebSocket) facility. +This clients interactively calls plugins APIs from the command line, using the binder +[WebSockets](https://en.wikipedia.org/wiki/WebSocket) facility. If _afb-daemon_ has been launched with the following parameters: -``` -$ afb-daemon --port=1234 --token=123456 [...] -``` + + + $ afb-daemon --port=1234 --token=123456 [...] + Then run the client with : -``` -afb-client-demo ws://localhost:1234/api?token=123456 -``` + + afb-client-demo ws://localhost:1234/api?token=123456 [ []] For instance, to initialize the Audio plugin from the command line : -``` -afb-client-demo ws://localhost:1234/api?token=123456 auth connect -(copy-paste the "token" field from the response) -afb-client-demo ws://localhost:1234/api?token=123456 audio init -``` + + afb-client-demo ws://localhost:1234/api?token=123456 + +The command doesn't return. You should type requests of type []. +So, try: + + auth connect + audio init
@@ -41,22 +47,24 @@ afb-client-demo ws://localhost:1234/api?token=123456 audio init ### token-websock.qml (Qt/QML WebSockets) If _afb-daemon_ has been launched with the following parameters: -``` -$ afb-daemon --port=1234 --token=123456 [...] -``` -and Qt5 is installed, on **Ubuntu 16.04**: -``` -$ apt-get install qmlscene qml-module-qtwebsockets qml-module-qtquick-controls -``` -or on **Fedora 23** : -``` -$ dnf install qt5-qtdeclarative-devel qt5-qtwebsockets-devel qt5-qtquickcontrols -``` + + $ afb-daemon --port=1234 --token=123456 [...] + +and Qt5 is installed. + +For installing Qt5 on **Ubuntu 16.04**: + + $ apt-get install qmlscene qml-module-qtwebsockets qml-module-qtquick-controls + +For installing Qt5 on **Fedora 23** : + + $ dnf install qt5-qtdeclarative-devel qt5-qtwebsockets-devel qt5-qtquickcontrols + Then run the client with : -``` -qmlscene test/token-websock.qml -``` + + qmlscene test/token-websock.qml + and interactively press the buttons, "Connect", "Refresh", "Logout".
@@ -65,14 +73,15 @@ and interactively press the buttons, "Connect", "Refresh", "Logout". ### *.html (HTML5/JS HTTP-REST & WebSockets) If _afb-daemon_ has been launched with the following parameters: -``` -$ afb-daemon --port=1234 --rootdir=$PWD/test [...] -``` + + $ afb-daemon --port=1234 --rootdir=$PWD/test [...] + _("$PWD/test_" being the "test" subdirectory of the source tree)_ Then open your preferred Web browser, connect to the following URL: -``` -http://localhost:1234 -``` + + http://localhost:1234 + and interactively run the various tests. + -- cgit 1.2.3-korg