From 1ec549e52d80bcda3b0fc8bec17139d331c3bf78 Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Mon, 20 Jun 2016 07:51:19 +0200 Subject: Serena's presentation review Change-Id: Iea8958a3a64d0a0f53bbbd1d43aca9d27c4d6523 Signed-off-by: Morgan Richomme --- docs/com/pres/testapi.html | 316 ++++++++++++++++++++++----------------------- 1 file changed, 152 insertions(+), 164 deletions(-) (limited to 'docs/com') diff --git a/docs/com/pres/testapi.html b/docs/com/pres/testapi.html index a0e266a19..0f51251d3 100755 --- a/docs/com/pres/testapi.html +++ b/docs/com/pres/testapi.html @@ -15,7 +15,7 @@ - + @@ -40,176 +40,149 @@
-
-

Test API

-

Clean, Easy, Complete

-
-

OPNFV testing community

-
OPNFV Design Summit, 20/6/2016, Berlin
-
+
+




+

Test API

+

Clean, Easy, Complete

+
+

OPNFV testing community

+
OPNFV Design Summit, 20/6/2016, Berlin
+
# Agenda - * A test API: what for? + * testAPI: what for? * API overview * API evolution + * Roadmap
-
-
- # A test API: what for? -
-
- ## Give a consistant view for - * Test resources (Pods) - * Test projects - * Test cases - * Test results -
- -
- ## Unify result display - * From many projects - * Many formats (log, html, json, ..) - * Many locations (in VM, Jumphost, external DB,...) -
- -
- ## Help building - * Dashboards - * Automatic reporting -
-
+
+
+ # test API: what for? +
+
+ ## Consistant view for + * Resources (Pods) + * Projects + * Test cases + * Results +
+ +
+ ## Status Currently + * From many projects + * Many formats (log, html, json, ..) + * Many locations (in VM, Jumphost, external DB,...) +
+
+ ## Achieve using testAPI + * Uniform API: testAPI + * Uniform format: JSON + * Universal Location: http://testresults.opnfv.org +
+ +
+ ## Help building + * Dashboards + * Automatic reporting +
+
-
-
- # API overview -
-
- ## API storage structure - ![testapi](https://wiki.opnfv.org/download/attachments/2926452/results_collection_structure.png?version=1&modificationDate=1459196347000&api=v2 "OPNFV API page") -
-
- ## API in Brahmaputra - ![testapi](../img/testapi0.png) - https://wiki.opnfv.org/display/functest/Collection+Of+Test+Results -
+
+
+ # API overview +
+
+ ## Storage structure + ![testapi](https://wiki.opnfv.org/download/attachments/2926452/results_collection_structure.png?version=1&modificationDate=1459196347000&api=v2 "OPNFV API page") +
+
+ ## API in Brahmaputra + ![testapi](../img/testapi0.png) + https://wiki.opnfv.org/display/functest/Collection+Of+Test+Results +
-
- ## API in Brahmaputra - * Tornado + MongoDB - * Simple data models aggreed with the testing group - * No unit tests - * Wiki and rst documentation -
+
+ ## API status in Brahmaputra + * Simple data models aggreed with the testing group + * No unit tests + * Wiki and rst documentation +
-
- ## Lessons learned in B. - * Wiki documentation is painful - * Result model too simple - * version used instead of scenario - * no version - * no overall criteria (PASS/FAIL) - * need unit tests for data model evolution -
-
- ## Colorado refactoring - * Done by Serena Feng (ZTE) - * Update of the data model (based on lessons learned) - * New swagger tornado framework for the doc - * URL and Mongo collection renaming - * Scripts to manage backup/restore/DB update - * Setup scripts - * Unit tests -
-
+
+ ## Lessons learned in B. + * Painful wiki documentation + * Simple result model + * Misuse version as scenario + * No version actually + * No overall criteria (PASS/FAIL) + * Difficult refactoring +
+
+

Colorado refactoring

+
    Unit tests +
  • Update of the data model
  • +
  • Swagger tornado framework for the doc
  • +
  • URL and MongoDB collection renaming
  • +
  • Scripts to support backup/restore/update DB
  • +
  • Support installation
  • +
+

All done in Colorado!

+
+
-
-
- # Result management changes -
- -
- ## main changes - An URI change... - - testresults.opnfv.org/test/testapi => testresults.opnfv.org/test/api/v1 - - http://testresults.opnfv.org/test/api/v1/projects - http://testresults.opnfv.org/test/api/v1/projects/qtip/cases - http://testresults.opnfv.org/test/api/v1/results?case=Tempest&period=1 -
-
-

One new field for pods

- - - - - - - - - - - - - - - -
FieldBrahmaputraColorado
roleN.Rcommunity_pod, ci_pod, ..
-
-
-

New fields and filters for results

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ItemBrahmaputraColorado
datecreation_datestart_date and stop_date
versionused as scenariogit version
scenarioN.Rused for scenario
criteriaN.RPASS/FAILED
trust_indicatorN.Rbetween 0 and 1
lastN.Rget last N results
+
+
+ # API Evoluation +
+ +
+

URI changes...

+
+

testresults.opnfv.org/test/testapi =>
testresults.opnfv.org/test/api/v1

+ +

http://testresults.opnfv.org/test/api/v1/pods

+

http://testresults.opnfv.org/test/api/v1/projects

+

http://testresults.opnfv.org/test/api/v1/projects/qtip/cases

+

http://testresults.opnfv.org/test/api/v1/results

+
+
+
+ ## One new field for pods + | Field | Colorado | + | :--- | :--- | + | role | community_pod, ci_pod, .. | +
+
+ ## Changed fields for results + | Item | Brahmaputra | Colorado | + | :--- | :--- | :--- | + | date | creation_date | start_date and stop_date | + | version | used as scenario | git version |
-
+
+ ## New fields for results + | Item | Colorado | + | :--- | :--- | + | scenario | used for scenario | + | criteria | Pass/Failed | + | trust_indicator | between 0 and 1| +
+
+ ## One new filter for results + | Item | Colorado | + | :--- | :--- | + | last | get last N results| +
+
http://testresults.opnfv.org/test/swagger/spec.html ![alt text](../img/testapi1.png "Test API swagger interface") -
-
-

unit tests

-

+					
+
+

unit tests

+

 umry8364@umry8364-Latitude-E6400:~/Dev/OPNFV/releng/utils/test/result_collection_api$ ./run_test.sh 
 Tests running...
 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
@@ -223,18 +196,33 @@ WARNING:tornado.access:404 PUT /api/v1/projects/functest/cases/notFound (127.0.0
 
 Ran 74 tests in 1.848s
 OK
-					
+
+
-
+
-

Thank you

- tests +
+ # Roadmap +
+
+ ## Roadmap + * Dockerized testAPI + * Integration with Kibana + * Command Line Interface + * Automatic update for pods/projects/testcases +
+
+ # suggestions ... +
+
+

Thank you

+ tests +
-
- + -- cgit 1.2.3-korg