X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=old-docs%2Fafb-tests-overview.md;fp=old-docs%2Fafb-tests-overview.md;h=d6f619fec5289a3678f93bbc91c9997af2428522;hb=f6bc48698587758fb764bae66302002fe148e978;hp=0000000000000000000000000000000000000000;hpb=279ac0a77b8689c71812af2e5e67ee9b6e4994ff;p=src%2Fapp-framework-binder.git diff --git a/old-docs/afb-tests-overview.md b/old-docs/afb-tests-overview.md new file mode 100644 index 00000000..d6f619fe --- /dev/null +++ b/old-docs/afb-tests-overview.md @@ -0,0 +1,89 @@ + +Overview of tests shipped with AFB-Daemon +========================================= + +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) + + +Detail of tests +--------------- + +### afb-client-demo (command-line WebSockets) + +This clients interactively calls bindings 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 [...] + + +Then run the client with : + + afb-client-demo ws://localhost:1234/api?token=123456 [ []] + +For instance, to initialize the Audio binding from the command line : + + afb-client-demo ws://localhost:1234/api?token=123456 + +The command doesn't return. You should type requests of type []. +So, try: + + auth connect + hello pingjson true + +
+ + + +### 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. + +For installing Qt5 on **Ubuntu 16.04**: + + $ apt-get install qmlscene qml-module-qtwebsockets qml-module-qtquick-controls + +For installing Qt5 on **Fedora >= 22** : + + $ dnf install qt5-qtdeclarative-devel qt5-qtwebsockets-devel qt5-qtquickcontrols + + +Then run the client with : + + qmlscene test/token-websock.qml + +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 [...] + +_("$PWD/test_" being the "test" subdirectory of the source tree)_ + + +Then open your preferred Web browser, connect to the following URL: + + http://localhost:1234 + +and interactively run the various tests. +