Serena's presentation review
[functest.git] / docs / com / pres / testapi.html
1 <!doctype html>
2 <html lang="en">
3
4         <head>
5                 <meta charset="utf-8">
6
7                 <title>OPNFV presentation</title>
8
9                 <meta name="description" content="Test API">
10                 <meta name="author" content="Serena Feng">
11
12                 <meta name="apple-mobile-web-app-capable" content="yes" />
13                 <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
14
15                 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
16
17                 <link rel="stylesheet" href="../css/reveal.css">
18                 <link rel="stylesheet" href="../css/theme/OPNFV-Berlin.css" id="theme">
19
20                 <!-- Code syntax highlighting -->
21                 <link rel="stylesheet" href="../lib/css/zenburn.css">
22
23                 <!-- Printing and PDF exports -->
24                 <script>
25                         var link = document.createElement( 'link' );
26                         link.rel = 'stylesheet';
27                         link.type = 'text/css';
28                         link.href = window.location.search.match( /print-pdf/gi ) ? '../css/print/pdf.css' : '../css/print/paper.css';
29                         document.getElementsByTagName( 'head' )[0].appendChild( link );
30                 </script>
31
32                 <!--[if lt IE 9]>
33                 <script src="lib/js/html5shiv.js"></script>
34                 <![endif]-->
35         </head>
36
37         <body>
38
39                 <div class="reveal">
40                         <!-- Any section element inside of this container is displayed as a slide -->
41                         <div class="slides">
42
43                                 <section data-background="../img/title-bg-berlin.png" data-background-transition="none">
44                                         <br><br><br><br><br>
45                                         <h1>Test API</h1>
46                                         <h3>Clean, Easy, Complete</h3>
47                                         <br>
48                                                 <h4>OPNFV testing community</h4>
49                                                 <h5>OPNFV Design Summit, 20/6/2016, Berlin</h5>
50                                         <br>
51                                 </section>
52
53                                 <section data-markdown>
54                                         # Agenda
55                                         * testAPI: what for?
56                                         * API overview
57                                         * API evolution
58                                         * Roadmap
59                                 </section>
60
61                                 <section>
62                                         <section data-markdown>
63                                                 # test API: what for?
64                                         </section>
65                                         <section data-markdown>
66                                                 ## Consistant view for
67                                                 * Resources (Pods)
68                                                 * Projects
69                                                 * Test cases
70                                                 * Results
71                                         </section>
72         
73                                         <section data-markdown>
74                                                 ## Status Currently
75                                                 * From many projects
76                                                 * Many formats (log, html, json, ..)
77                                                 * Many locations (in VM, Jumphost, external DB,...)
78                                         </section>
79                                         <section data-markdown>
80                                                 ## Achieve using testAPI
81                                                 * Uniform API: testAPI
82                                                 * Uniform format: JSON
83                                                 * Universal Location: http://testresults.opnfv.org
84                                         </section>
85         
86                                         <section data-markdown>
87                                                 ## Help building
88                                                 * Dashboards
89                                                 * Automatic reporting
90                                         </section>
91                                 </section>
92
93                                 <section>
94                                         <section data-markdown>
95                                                 # API overview
96                                         </section>
97                                         <section data-markdown>
98                                                 ## Storage structure
99                                                 ![testapi](https://wiki.opnfv.org/download/attachments/2926452/results_collection_structure.png?version=1&modificationDate=1459196347000&api=v2 "OPNFV API page")
100                                         </section>
101                                         <section data-markdown>
102                                                 ## API in Brahmaputra
103                                                 ![testapi](../img/testapi0.png)
104                                                 https://wiki.opnfv.org/display/functest/Collection+Of+Test+Results
105                                         </section>
106
107                                         <section data-markdown>
108                                                 ## API status in Brahmaputra
109                                                 * Simple data models aggreed with the testing group
110                                                 * No unit tests
111                                                 * Wiki and rst documentation
112                                         </section>
113
114                                         <section data-markdown>
115                                                 ## Lessons learned in B.
116                                                 * Painful wiki documentation
117                                                 * Simple result model
118                                                  * Misuse version as scenario
119                                                  * No version actually
120                                                  * No overall criteria (PASS/FAIL)
121                                                 * Difficult refactoring
122                                         </section>
123                                         <section>
124                                                 <h2>Colorado refactoring</h2>
125                                                 <ul>Unit tests
126                                                 <li>Update of the data model</li>
127                                                 <li>Swagger tornado framework for the doc</li>
128                                                 <li>URL and MongoDB collection renaming</li>
129                                                 <li>Scripts to support backup/restore/update DB</li>
130                                                 <li>Support installation</li>
131                         </ul>
132                         <p class="fragment fade-up"><b>All done in Colorado!</b></p>
133                                         </section>                                              
134                                 </section>
135
136                                 <section>
137                                         <section data-markdown>
138                                                 # API Evoluation
139                                         </section>
140                                         
141                                         <section>
142                                                 <h2> URI changes...</h2>
143                                                 <div style="text-align:left""> 
144                                                         <p> testresults.opnfv.org/test/testapi => <br>testresults.opnfv.org/test/api/v1 </p>
145                         
146                                                         <p> http://testresults.opnfv.org/test/api/v1/<b>pods</b></p>
147                                                         <p> http://testresults.opnfv.org/test/api/v1/<b>projects</b></p>
148                                                         <p> http://testresults.opnfv.org/test/api/v1/projects/qtip/<b>cases</b></p>
149                                                         <p> http://testresults.opnfv.org/test/api/v1/<b>results</b></p>
150                                                 </div>
151                                         </section>
152                                         <section data-markdown>
153                                                 ## One new field for pods
154                                                 | Field | Colorado |
155                                                 | :--- | :--- |
156                                                 | role | community_pod, ci_pod, .. |
157                                         </section>
158                                         <section data-markdown>
159                                                 ## Changed fields for results
160                                                 | Item | Brahmaputra | Colorado |
161                                                 | :--- | :--- | :--- |
162                                                 | date | creation_date | start_date and stop_date |
163                                                 | version | used as scenario | git version |
164                                         </section>
165                                         <section data-markdown>
166                                                 ## New fields for results
167                                                 | Item | Colorado |
168                                                 | :--- | :--- |
169                                                 | scenario | used for scenario |
170                                                 | criteria | Pass/Failed |
171                                                 | trust_indicator | between 0 and 1|
172                                         </section>
173                                         <section data-markdown>
174                                                 ## One new filter for results
175                                                 | Item | Colorado |
176                                                 | :--- | :--- |
177                                                 | last | get last N results|
178                                         </section>
179                                         <section data-markdown>
180                                                 http://testresults.opnfv.org/test/swagger/spec.html
181                                                 ![alt text](../img/testapi1.png "Test API swagger interface")
182                                         </section>
183                                         <section>
184                                                 <h2>unit tests</h2>
185                                                 <pre><code class="hljs" data-trim contenteditable>
186 umry8364@umry8364-Latitude-E6400:~/Dev/OPNFV/releng/utils/test/result_collection_api$ ./run_test.sh 
187 Tests running...
188 WARNING:tornado.general:404 GET /dashboard/v1/results?case=vPing&pod=zte-pod1&version=C&installer=fuel&period=5 (127.0.0.1): Project name missing
189 WARNING:tornado.access:404 GET /dashboard/v1/results?case=vPing&pod=zte-pod1&version=C&installer=fuel&period=5 (127.0.0.1) 2.30ms
190 WARNING:tornado.general:400 POST /api/v1/projects (127.0.0.1): name missing
191 ............
192 WARNING:tornado.access:400 POST /api/v1/projects (127.0.0.1) 1.13ms
193 WARNING:tornado.access:403 PUT /api/v1/projects/functest/cases/vping_1 (127.0.0.1) 2.95ms
194 WARNING:tornado.general:404 PUT /api/v1/projects/functest/cases/notFound (127.0.0.1): {'project_name': u'functest', 'name': u'notFound'} could not be found in table [testcases]
195 WARNING:tornado.access:404 PUT /api/v1/projects/functest/cases/notFound (127.0.0.1) 2.85ms
196
197 Ran 74 tests in 1.848s
198 OK
199                                                 </code></pre>
200                                         </section>
201                                 </section>
202
203                                 <section>
204                                         <section data-markdown>
205                                                 # Roadmap
206                                         </section>
207                                         <section data-markdown>
208                                                 ## Roadmap
209                                                 * Dockerized testAPI
210                                                 * Integration with Kibana
211                                                 * Command Line Interface
212                                                 * Automatic update for pods/projects/testcases
213                                         </section>
214                                         <section data-markdown>
215                                                 # suggestions ...
216                                         </section>
217                                         <section>
218                                                 <h3>Thank you</h3>
219                                                 <img width="600"  data-src="../img/colorado.png" alt="tests">
220                                         </section>
221                                 </section>
222                         </div>
223                         <div class='footer'>
224                                  <img src="../img/logo-OPNFV-Berlin.png" alt="OPNFV logo">
225                         </div>
226                 </div>
227
228                 <script src="../lib/js/head.min.js"></script>
229                 <script src="../js/reveal.js"></script>
230
231                 <script>
232
233                         // Full list of configuration options available at:
234                         // https://github.com/hakimel/reveal.js#configuration
235                         Reveal.initialize({
236                                 controls: true,
237                                 progress: true,
238                                 history: true,
239                                 center: true,
240
241                                 transition: 'slide', // none/fade/slide/convex/concave/zoom
242
243                                 // Optional reveal.js plugins
244                                 dependencies: [
245                                         { src: '../lib/js/classList.js', condition: function() { return !document.body.classList; } },
246                                         { src: '../plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
247                                         { src: '../plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
248                                         { src: '../plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
249                                         { src: '../plugin/zoom-js/zoom.js', async: true },
250                                         { src: '../plugin/notes/notes.js', async: true }
251                                 ]
252                         });
253
254                 </script>
255
256         </body>
257 </html>