diff options
author | 2016-07-05 17:02:55 +0200 | |
---|---|---|
committer | 2016-07-05 17:32:18 +0200 | |
commit | 85b8b5b1fd02971f7d011ddab146185f63f270f7 (patch) | |
tree | a1c4405dde729fec1f7f58e22a6deb9db6f5cdd3 /utils/test/reporting/functest/reportingUtils.py | |
parent | c4dadaf61cc5593110a23a56117138aa06b722bb (diff) |
fix bug + introduction of blacklist for scenario scoring
Change-Id: Ib1a99cbeeb66d4c51eedb56d25d317b92602d51d
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'utils/test/reporting/functest/reportingUtils.py')
-rw-r--r-- | utils/test/reporting/functest/reportingUtils.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/test/reporting/functest/reportingUtils.py b/utils/test/reporting/functest/reportingUtils.py index 0db570f32..2f06b8449 100644 --- a/utils/test/reporting/functest/reportingUtils.py +++ b/utils/test/reporting/functest/reportingUtils.py @@ -21,7 +21,8 @@ def getApiResults(case, installer, scenario, version): # "&period=30&installer=" + installer url = (reportingConf.URL_BASE + "?case=" + case + "&period=" + str(reportingConf.PERIOD) + "&installer=" + installer + - "&scenario=" + scenario + "&version=" + version) + "&scenario=" + scenario + "&version=" + version + + "&last=" + str(reportingConf.NB_TESTS)) request = Request(url) try: @@ -104,7 +105,7 @@ def getResult(testCase, installer, scenario, version): # print "nb of results:" + str(len(test_results)) for r in test_results: - # print r["creation_date"] + # print r["start_date"] # print r["criteria"] scenario_results.append({r["start_date"]: r["criteria"]}) # sort results @@ -116,7 +117,7 @@ def getResult(testCase, installer, scenario, version): # 0: 0% success, not passing test_result_indicator = 0 nbTestOk = getNbtestOk(scenario_results) - # print "Nb test OK:"+ str(nbTestOk) + # print "Nb test OK (last 10 days):"+ str(nbTestOk) # check that we have at least 4 runs if nbTestOk < 1: test_result_indicator = 0 @@ -126,7 +127,9 @@ def getResult(testCase, installer, scenario, version): # Test the last 4 run if (len(scenario_results) > 3): last4runResults = scenario_results[-4:] - if getNbtestOk(last4runResults): + nbTestOkLast4 = getNbtestOk(last4runResults) + # print "Nb test OK (last 4 run):"+ str(nbTestOkLast4) + if nbTestOkLast4 > 3: test_result_indicator = 3 else: test_result_indicator = 2 |