summaryrefslogtreecommitdiffstats
path: root/utils/test/reporting/functest/reporting-tempest.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-06-13 07:26:01 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-13 07:26:01 +0000
commit3c539f888e8e7db4a39aa65ede339174388fe2f9 (patch)
tree2b1e8a58910e881c04e8737e32c79b7402a6b74d /utils/test/reporting/functest/reporting-tempest.py
parentdb8efbd6858867124e775a96ddc4f520fe0a772d (diff)
parent8652c7157689f524e7c25f6fd5c85ed9391cfd73 (diff)
Merge "Adapt automatic reporting to new Test API"
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"