From 8652c7157689f524e7c25f6fd5c85ed9391cfd73 Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Fri, 10 Jun 2016 17:15:28 +0200 Subject: Adapt automatic reporting to new Test API JIRA: FUNCTEST-303 Change-Id: Ie9cb7151301ab2c26a72746683c35305ba560bbc Signed-off-by: Morgan Richomme --- utils/test/reporting/functest/reporting-tempest.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'utils/test/reporting/functest/reporting-tempest.py') 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" -- cgit 1.2.3-korg