summaryrefslogtreecommitdiffstats
path: root/utils/test/reporting/functest/reporting-tempest.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-06-10 17:15:28 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2016-06-10 17:53:56 +0200
commit8652c7157689f524e7c25f6fd5c85ed9391cfd73 (patch)
tree6d5c7442f10d8e20cb3e3a9e4d856e9db827275a /utils/test/reporting/functest/reporting-tempest.py
parentcdff7d8d41693971f4c5dc8dd18d6907a5e31937 (diff)
Adapt automatic reporting to new Test API
JIRA: FUNCTEST-303 Change-Id: Ie9cb7151301ab2c26a72746683c35305ba560bbc Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/reporting/functest/reporting-tempest.py')
-rw-r--r--utils/test/reporting/functest/reporting-tempest.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/test/reporting/functest/reporting-tempest.py b/utils/test/reporting/functest/reporting-tempest.py
index 70fb57702..e9662d5c2 100644
--- a/utils/test/reporting/functest/reporting-tempest.py
+++ b/utils/test/reporting/functest/reporting-tempest.py
@@ -7,10 +7,10 @@ installers = ["apex", "compass", "fuel", "joid"]
items = ["tests", "Success rate", "duration"]
PERIOD = 7
-
+print "Generate Tempest automatic reporting"
for installer in installers:
# we consider the Tempest results of the last PERIOD days
- url = "http://testresults.opnfv.org/testapi/results?case=Tempest"
+ url = "http://testresults.opnfv.org/test/api/v1/results?case=Tempest"
request = Request(url + '&period=' + str(PERIOD)
+ '&installer=' + installer + '&version=master')
@@ -21,7 +21,7 @@ for installer in installers:
except URLError, e:
print 'No kittez. Got an error code:', e
- test_results = results['test_results']
+ test_results = results['results']
test_results.reverse()
scenario_results = {}
@@ -41,7 +41,7 @@ for installer in installers:
# For each scenario, we build a result object to deal with
# results, criteria and error handling
for result in scenario_results[s]:
- result["creation_date"] = result["creation_date"].split(".")[0]
+ result["start_date"] = result["start_date"].split(".")[0]
# retrieve results
# ****************
@@ -96,5 +96,7 @@ for installer in installers:
items=items,
installer=installer)
- with open("./release/index-tempest-" + installer + ".html", "wb") as fh:
+ with open("./release/master/index-tempest-" +
+ installer + ".html", "wb") as fh:
fh.write(outputText)
+print "Tempest automatic reporting Done"