7 <title>OPNFV presentation</title>
9 <meta name="description" content="Test API">
10 <meta name="author" content="Serena Feng">
12 <meta name="apple-mobile-web-app-capable" content="yes" />
13 <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
15 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
17 <link rel="stylesheet" href="../css/reveal.css">
18 <link rel="stylesheet" href="../css/theme/OPNFV.css" id="theme">
20 <!-- Code syntax highlighting -->
21 <link rel="stylesheet" href="../lib/css/zenburn.css">
23 <!-- Printing and PDF exports -->
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 );
33 <script src="lib/js/html5shiv.js"></script>
40 <!-- Any section element inside of this container is displayed as a slide -->
43 <section data-background="../img/title-bg.png" data-background-transition="none">
45 <h3>Clean, Easy, Complete</h3>
47 <h4>OPNFV testing community</h4>
48 <h5>OPNFV Design Summit, 20/6/2016, Berlin</h5>
52 <section data-markdown>
54 * A test API: what for?
60 <section data-markdown>
61 # A test API: what for?
63 <section data-markdown>
64 ## Give a consistant view for
65 * Test resources (Pods)
71 <section data-markdown>
72 ## Unify result display
74 * Many formats (log, html, json, ..)
75 * Many locations (in VM, Jumphost, external DB,...)
78 <section data-markdown>
86 <section data-markdown>
89 <section data-markdown>
90 ## API storage structure
91 ![testapi](https://wiki.opnfv.org/download/attachments/2926452/results_collection_structure.png?version=1&modificationDate=1459196347000&api=v2 "OPNFV API page")
93 <section data-markdown>
95 ![testapi](../img/testapi0.png)
96 https://wiki.opnfv.org/display/functest/Collection+Of+Test+Results
99 <section data-markdown>
100 ## API in Brahmaputra
102 * Simple data models aggreed with the testing group
104 * Wiki and rst documentation
107 <section data-markdown>
108 ## Lessons learned in B.
109 * Wiki documentation is painful
110 * Result model too simple
111 * version used instead of scenario
113 * no overall criteria (PASS/FAIL)
114 * need unit tests for data model evolution
116 <section data-markdown>
117 ## Colorado refactoring
118 * Done by Serena Feng (ZTE)
119 * Update of the data model (based on lessons learned)
120 * New swagger tornado framework for the doc
121 * URL and Mongo collection renaming
122 * Scripts to manage backup/restore/DB update
129 <section data-markdown>
130 # Result management changes
133 <section data-markdown>
137 testresults.opnfv.org/test/testapi => testresults.opnfv.org/test/api/v1
139 http://testresults.opnfv.org/test/api/v1/projects
140 http://testresults.opnfv.org/test/api/v1/projects/qtip/cases
141 http://testresults.opnfv.org/test/api/v1/results?case=Tempest&period=1
144 <h3>One new field for pods</h3>
157 <td>community_pod, ci_pod, ..</td>
163 <h3>New fields and filters for results</h3>
175 <td>creation_date</td>
176 <td>start_date and stop_date</td>
180 <td>used as scenario</td>
186 <td>used for scenario</td>
194 <td>trust_indicator</td>
196 <td>between 0 and 1</td>
201 <td>get last N results</td>
206 <section data-markdown>
207 http://testresults.opnfv.org/test/swagger/spec.html
208 ![alt text](../img/testapi1.png "Test API swagger interface")
212 <pre><code class="hljs" data-trim contenteditable>
213 umry8364@umry8364-Latitude-E6400:~/Dev/OPNFV/releng/utils/test/result_collection_api$ ./run_test.sh
215 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
216 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
217 WARNING:tornado.general:400 POST /api/v1/projects (127.0.0.1): name missing
219 WARNING:tornado.access:400 POST /api/v1/projects (127.0.0.1) 1.13ms
220 WARNING:tornado.access:403 PUT /api/v1/projects/functest/cases/vping_1 (127.0.0.1) 2.95ms
221 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]
222 WARNING:tornado.access:404 PUT /api/v1/projects/functest/cases/notFound (127.0.0.1) 2.85ms
224 Ran 74 tests in 1.848s
231 <img width="600" data-src="../img/colorado.png" alt="tests">
236 <img src="../img/logo-OPNFV.png" alt="OPNFV logo">
240 <script src="../lib/js/head.min.js"></script>
241 <script src="../js/reveal.js"></script>
245 // Full list of configuration options available at:
246 // https://github.com/hakimel/reveal.js#configuration
253 transition: 'slide', // none/fade/slide/convex/concave/zoom
255 // Optional reveal.js plugins
257 { src: '../lib/js/classList.js', condition: function() { return !document.body.classList; } },
258 { src: '../plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
259 { src: '../plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
260 { src: '../plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
261 { src: '../plugin/zoom-js/zoom.js', async: true },
262 { src: '../plugin/notes/notes.js', async: true }