X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=docs%2Fcom%2Fpres%2Ftestapi.html;h=c27c21dedb6ee0c3c2d78f9aed04209fd02a9bd5;hb=8c4aa3c9cca399a804ae0f8747855819aa471430;hp=4479b93b47b904a0c22d2dcbc04b702074f8f892;hpb=3e54264eca6870e52fb8adcff06d6710d17c8c71;p=functest.git diff --git a/docs/com/pres/testapi.html b/docs/com/pres/testapi.html index 4479b93b4..c27c21ded 100755 --- a/docs/com/pres/testapi.html +++ b/docs/com/pres/testapi.html @@ -15,7 +15,7 @@ - + @@ -40,143 +40,166 @@
-
-

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 projects - * Test cases - * Test resources (Pods) - * 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 -
-
- -
-
- # API overview -
-
- ## API in Brahmaputra - * Tornado + MongoDB - * Simple data models aggreed with the testing group - * No unit tests - * Wiki and rst documentation -
- -
- ## API in Brahmaputra - ![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 -
- -
- ## Lessons learned in B. - * Wiki documentation is painful - * result modl too simple - * version used for scenario - * no version - * no overall criteria (passed/failed) - * need unit tests for data model evolution -
-
- ## Colorado refactoring - * done by Serena Feng (ZTE) - * update of the data model (based on lesson learned) - * creation of a swagger tornado framework for the doc - * creation of unit tests -
-
- -
-
- #API evolution -
-
-

Test API evolution

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldBrahmaputraColorado
datecreation_datestart_date and stop_date
versionused as scenariogit version
scenarioN.Rused for scenario
test_criteriaN.Rpassed/failed
trust_indictatorN.Rbetween 0 and 1
lastN.Rget last N results
-
-
- ## Swagger doc +
+
+ # 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,...) +
+
+ +
+ +
+ ## Help building + * Dashboards + * Automatic reporting +
+
+ +
+
+ # 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 status in Brahmaputra + * Simple data models aggreed with the testing group + * No unit tests + * Wiki and rst documentation +
+ +
+ ## 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
  • +
  • Tornado_swagger for the documentation
  • +
  • URL and MongoDB collection renaming
  • +
  • Scripts to support databse backup/restore/update
  • +
  • Support installation
  • + +
+

All done in Colorado!

+
+
+ +
+
+ # API Evoluation +
+ +
+

URI changes...

+
+

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

+ +

/test/api/v1/pods

+

/test/api/v1/projects

+

/test/api/v1/projects/qtip/cases

+

/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 | opnfv release version | +
+
+ +
+
+ ## 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
@@ -190,18 +213,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 + * Dockerize testAPI + * Automatic update of testAPI + * Command Line Interface + * Automatic update for pods/projects/testcases +
+
+ # suggestions ... +
+
+

Thank you

+ tests +
-
- +