afb-api-so: adds verbosity on dlopen error
[src/app-framework-binder.git] / doc / afb-tests-overview.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta charset="utf-8">
5   <meta name="generator" content="pandoc">
6   <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
7   <meta name="author" content="Manuel Bachmann">
8   <meta name="author" content="José Bollo">
9   <title>Overview of tests shipped with AFB-Daemon</title>
10   <style type="text/css">code{white-space: pre;}</style>
11   <link rel="stylesheet" href="doc.css">
12   <!--[if lt IE 9]>
13     <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
14   <![endif]-->
15 </head>
16 <body>
17 <header>
18 <h1 class="title">Overview of tests shipped with AFB-Daemon</h1>
19 <h2 class="author">Manuel Bachmann</h2>
20 <h2 class="author">José Bollo</h2>
21 <h3 class="date">24 juin 2016</h3>
22 </header>
23 <nav id="TOC">
24 <ul>
25 <li><a href="#overview-of-tests-shipped-with-afb-daemon">Overview of tests shipped with AFB-Daemon</a><ul>
26 <li><a href="#list-of-tests">List of tests</a></li>
27 <li><a href="#detail-of-tests">Detail of tests</a><ul>
28 <li><a href="#afb-client-demo-command-line-websockets">afb-client-demo (command-line WebSockets)</a></li>
29 <li><a href="#token-websock.qml-qtqml-websockets">token-websock.qml (Qt/QML WebSockets)</a></li>
30 <li><a href="#html-html5js-http-rest-websockets">*.html (HTML5/JS HTTP-REST &amp; WebSockets)</a></li>
31 </ul></li>
32 </ul></li>
33 </ul>
34 </nav>
35 <h1 id="overview-of-tests-shipped-with-afb-daemon">Overview of tests shipped with AFB-Daemon</h1>
36 <h2 id="list-of-tests">List of tests</h2>
37 <p>Here are the tests shipped in the source tree:</p>
38 <ul>
39 <li><p><strong>afb-client-demo</strong> (command-line WebSockets)</p></li>
40 <li><p><strong>token-websock.qml</strong> (Qt/QML WebSockets)</p></li>
41 <li><p>*<strong>.html</strong> (HTML5/JS HTTP-REST &amp; WebSockets)</p></li>
42 </ul>
43 <h2 id="detail-of-tests">Detail of tests</h2>
44 <h3 id="afb-client-demo-command-line-websockets">afb-client-demo (command-line WebSockets)</h3>
45 <p>This clients interactively calls bindings APIs from the command line, using the binder <a href="https://en.wikipedia.org/wiki/WebSocket">WebSockets</a> facility.</p>
46 <p>If <em>afb-daemon</em> has been launched with the following parameters:</p>
47 <pre><code>$ afb-daemon --port=1234 --token=123456 [...]</code></pre>
48 <p>Then run the client with :</p>
49 <pre><code>afb-client-demo ws://localhost:1234/api?token=123456 [&lt;api&gt; &lt;verb&gt; [&lt;json-data&gt;]]</code></pre>
50 <p>For instance, to initialize the Audio binding from the command line :</p>
51 <pre><code>afb-client-demo ws://localhost:1234/api?token=123456</code></pre>
52 <p>The command doesn't return. You should type requests of type <api> <verb> [<json-data>]. So, try:</p>
53 <pre><code>auth connect
54 hello pingjson true</code></pre>
55 <p><br /></p>
56 <h3 id="token-websock.qml-qtqml-websockets">token-websock.qml (Qt/QML WebSockets)</h3>
57 <p>If <em>afb-daemon</em> has been launched with the following parameters:</p>
58 <pre><code>$ afb-daemon --port=1234 --token=123456 [...]</code></pre>
59 <p>and Qt5 is installed.</p>
60 <p>For installing Qt5 on <strong>Ubuntu 16.04</strong>:</p>
61 <pre><code>$ apt-get install qmlscene qml-module-qtwebsockets qml-module-qtquick-controls</code></pre>
62 <p>For installing Qt5 on <strong>Fedora 23</strong> :</p>
63 <pre><code>$ dnf install qt5-qtdeclarative-devel qt5-qtwebsockets-devel qt5-qtquickcontrols</code></pre>
64 <p>Then run the client with :</p>
65 <pre><code>qmlscene test/token-websock.qml</code></pre>
66 <p>and interactively press the buttons, &quot;Connect&quot;, &quot;Refresh&quot;, &quot;Logout&quot;.</p>
67 <p><br /></p>
68 <h3 id="html-html5js-http-rest-websockets">*.html (HTML5/JS HTTP-REST &amp; WebSockets)</h3>
69 <p>If <em>afb-daemon</em> has been launched with the following parameters:</p>
70 <pre><code>$ afb-daemon --port=1234 --rootdir=$PWD/test [...]</code></pre>
71 <p><em>(&quot;$PWD/test</em>&quot; being the &quot;test&quot; subdirectory of the source tree)_</p>
72 <p>Then open your preferred Web browser, connect to the following URL:</p>
73 <pre><code>http://localhost:1234</code></pre>
74 <p>and interactively run the various tests.</p>
75 </body>
76 </html>