diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/test/dashboard/dashboard/mongo2elastic/format.py | 204 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/.gitignore (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/.gitignore) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/css/highlight.default.css (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/css/highlight.default.css) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/css/hightlight.default.css (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/css/hightlight.default.css) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/css/screen.css (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/css/screen.css) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/endpoint.html (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/endpoint.html) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/images/explorer_icons.png (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/explorer_icons.png) | bin | 5763 -> 5763 bytes | |||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/images/logo_small.png (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/logo_small.png) | bin | 770 -> 770 bytes | |||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/images/pet_store_api.png (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/pet_store_api.png) | bin | 824 -> 824 bytes | |||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/images/throbber.gif (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/throbber.gif) | bin | 9257 -> 9257 bytes | |||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/images/wordnik_api.png (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/wordnik_api.png) | bin | 980 -> 980 bytes | |||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/index.html (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/index.html) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/backbone-min.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/backbone-min.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/handlebars-1.0.0.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/handlebars-1.0.0.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/highlight.7.3.pack.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/highlight.7.3.pack.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/jquery-1.8.0.min.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery-1.8.0.min.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/jquery.ba-bbq.min.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery.ba-bbq.min.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/jquery.slideto.min.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery.slideto.min.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/jquery.wiggle.min.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery.wiggle.min.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/shred.bundle.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/shred.bundle.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/shred/content.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/shred/content.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/swagger-oauth.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/swagger-oauth.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/swagger.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/swagger.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/lib/underscore-min.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/underscore-min.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/o2c.html (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/o2c.html) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/swagger-ui.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/swagger-ui.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/3rd_party/static/swagger-ui.min.js (renamed from utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/swagger-ui.min.js) | 0 | ||||
-rw-r--r-- | utils/test/result_collection_api/README.rst | 2 | ||||
-rwxr-xr-x | utils/test/result_collection_api/install.sh | 20 |
29 files changed, 21 insertions, 205 deletions
diff --git a/utils/test/dashboard/dashboard/mongo2elastic/format.py b/utils/test/dashboard/dashboard/mongo2elastic/format.py deleted file mode 100644 index 0bbde1746..000000000 --- a/utils/test/dashboard/dashboard/mongo2elastic/format.py +++ /dev/null @@ -1,204 +0,0 @@ -#! /usr/bin/env python - - -def _convert_value(value): - return value if value != '' else 0 - - -def _convert_duration(duration): - if (isinstance(duration, str) or isinstance(duration, unicode)) and ':' in duration: - hours, minutes, seconds = duration.split(":") - hours = _convert_value(hours) - minutes = _convert_value(minutes) - seconds = _convert_value(seconds) - int_duration = 3600 * int(hours) + 60 * int(minutes) + float(seconds) - else: - int_duration = duration - return int_duration - - -def format_normal(testcase): - """ - Look for these and leave any of those: - details.duration - details.tests - details.failures - - If none are present, then return False - """ - found = False - testcase_details = testcase['details'] - fields = ['duration', 'tests', 'failures'] - if isinstance(testcase_details, dict): - for key, value in testcase_details.items(): - if key in fields: - found = True - if key == 'duration': - testcase_details[key] = _convert_duration(value) - else: - del testcase_details[key] - - if 'tests' in testcase_details and 'failures' in testcase_details: - testcase_tests = float(testcase_details['tests']) - testcase_failures = float(testcase_details['failures']) - if testcase_tests != 0: - testcase_details['success_percentage'] = 100 * (testcase_tests - testcase_failures) / testcase_tests - else: - testcase_details['success_percentage'] = 0 - - - return found - - -def format_rally(testcase): - """ - Structure: - details.[{summary.duration}] - details.[{summary.nb success}] - details.[{summary.nb tests}] - - Find data for these fields - -> details.duration - -> details.tests - -> details.success_percentage - """ - details = testcase['details'] - summary = None - for item in details: - if 'summary' in item: - summary = item['summary'] - - if not summary: - return False - - testcase['details'] = { - 'duration': summary['duration'], - 'tests': summary['nb tests'], - 'success_percentage': summary['nb success'] - } - return True - - -def _get_statistics(orig_data, stat_fields, stat_values=None): - test_results = {} - for stat_data in orig_data: - for field in stat_fields: - stat_value = stat_data[field] - if stat_value in test_results: - test_results[stat_value] += 1 - else: - test_results[stat_value] = 1 - - if stat_values is not None: - for stat_value in stat_values: - if stat_value not in test_results: - test_results[stat_value] = 0 - - return test_results - - -def format_onos(testcase): - """ - Structure: - details.FUNCvirNet.duration - details.FUNCvirNet.status.[{Case result}] - details.FUNCvirNetL3.duration - details.FUNCvirNetL3.status.[{Case result}] - - Find data for these fields - -> details.FUNCvirNet.duration - -> details.FUNCvirNet.tests - -> details.FUNCvirNet.failures - -> details.FUNCvirNetL3.duration - -> details.FUNCvirNetL3.tests - -> details.FUNCvirNetL3.failures - """ - testcase_details = testcase['details'] - - if 'FUNCvirNet' not in testcase_details or 'FUNCvirNetL3' not in testcase_details: - return False - - funcvirnet_details = testcase_details['FUNCvirNet']['status'] - funcvirnet_stats = _get_statistics(funcvirnet_details, ('Case result',), ('PASS', 'FAIL')) - funcvirnet_passed = funcvirnet_stats['PASS'] - funcvirnet_failed = funcvirnet_stats['FAIL'] - funcvirnet_all = funcvirnet_passed + funcvirnet_failed - - funcvirnetl3_details = testcase_details['FUNCvirNetL3']['status'] - funcvirnetl3_stats = _get_statistics(funcvirnetl3_details, ('Case result',), ('PASS', 'FAIL')) - funcvirnetl3_passed = funcvirnetl3_stats['PASS'] - funcvirnetl3_failed = funcvirnetl3_stats['FAIL'] - funcvirnetl3_all = funcvirnetl3_passed + funcvirnetl3_failed - - testcase_details['FUNCvirNet'] = { - 'duration': _convert_duration(testcase_details['FUNCvirNet']['duration']), - 'tests': funcvirnet_all, - 'failures': funcvirnet_failed - } - testcase_details['FUNCvirNetL3'] = { - 'duration': _convert_duration(testcase_details['FUNCvirNetL3']['duration']), - 'tests': funcvirnetl3_all, - 'failures': funcvirnetl3_failed - } - return True - - -def format_vims(testcase): - """ - Structure: - details.sig_test.result.[{result}] - details.sig_test.duration - details.vIMS.duration - details.orchestrator.duration - - Find data for these fields - -> details.sig_test.duration - -> details.sig_test.tests - -> details.sig_test.failures - -> details.sig_test.passed - -> details.sig_test.skipped - -> details.vIMS.duration - -> details.orchestrator.duration - """ - testcase_details = testcase['details'] - test_results = _get_statistics(testcase_details['sig_test']['result'], - ('result',), - ('Passed', 'Skipped', 'Failed')) - passed = test_results['Passed'] - skipped = test_results['Skipped'] - failures = test_results['Failed'] - all_tests = passed + skipped + failures - testcase['details'] = { - 'sig_test': { - 'duration': testcase_details['sig_test']['duration'], - 'tests': all_tests, - 'failures': failures, - 'passed': passed, - 'skipped': skipped - }, - 'vIMS': { - 'duration': testcase_details['vIMS']['duration'] - }, - 'orchestrator': { - 'duration': testcase_details['orchestrator']['duration'] - } - } - return True - - -def format_qpi(testcase): - """ - Look for these and leave any of those: - details.index - - If none are present, then return False - """ - details = testcase['details'] - if 'index' not in details: - return False - - for key, value in details.items(): - if key != 'index': - del details[key] - - return True diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/.gitignore b/utils/test/result_collection_api/3rd_party/static/.gitignore index ebf4281dc..ebf4281dc 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/.gitignore +++ b/utils/test/result_collection_api/3rd_party/static/.gitignore diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/css/highlight.default.css b/utils/test/result_collection_api/3rd_party/static/css/highlight.default.css index e417fc179..e417fc179 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/css/highlight.default.css +++ b/utils/test/result_collection_api/3rd_party/static/css/highlight.default.css diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/css/hightlight.default.css b/utils/test/result_collection_api/3rd_party/static/css/hightlight.default.css index e417fc179..e417fc179 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/css/hightlight.default.css +++ b/utils/test/result_collection_api/3rd_party/static/css/hightlight.default.css diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/css/screen.css b/utils/test/result_collection_api/3rd_party/static/css/screen.css index 2882b8d66..2882b8d66 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/css/screen.css +++ b/utils/test/result_collection_api/3rd_party/static/css/screen.css diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/endpoint.html b/utils/test/result_collection_api/3rd_party/static/endpoint.html index 4ae3bde0c..4ae3bde0c 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/endpoint.html +++ b/utils/test/result_collection_api/3rd_party/static/endpoint.html diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/explorer_icons.png b/utils/test/result_collection_api/3rd_party/static/images/explorer_icons.png Binary files differindex ed9d2fffb..ed9d2fffb 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/explorer_icons.png +++ b/utils/test/result_collection_api/3rd_party/static/images/explorer_icons.png diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/logo_small.png b/utils/test/result_collection_api/3rd_party/static/images/logo_small.png Binary files differindex 5496a6557..5496a6557 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/logo_small.png +++ b/utils/test/result_collection_api/3rd_party/static/images/logo_small.png diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/pet_store_api.png b/utils/test/result_collection_api/3rd_party/static/images/pet_store_api.png Binary files differindex f9f9cd4ae..f9f9cd4ae 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/pet_store_api.png +++ b/utils/test/result_collection_api/3rd_party/static/images/pet_store_api.png diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/throbber.gif b/utils/test/result_collection_api/3rd_party/static/images/throbber.gif Binary files differindex 063938892..063938892 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/throbber.gif +++ b/utils/test/result_collection_api/3rd_party/static/images/throbber.gif diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/wordnik_api.png b/utils/test/result_collection_api/3rd_party/static/images/wordnik_api.png Binary files differindex dca4f1455..dca4f1455 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/images/wordnik_api.png +++ b/utils/test/result_collection_api/3rd_party/static/images/wordnik_api.png diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/index.html b/utils/test/result_collection_api/3rd_party/static/index.html index db209f4a8..db209f4a8 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/index.html +++ b/utils/test/result_collection_api/3rd_party/static/index.html diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/backbone-min.js b/utils/test/result_collection_api/3rd_party/static/lib/backbone-min.js index c1c0d4fff..c1c0d4fff 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/backbone-min.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/backbone-min.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/handlebars-1.0.0.js b/utils/test/result_collection_api/3rd_party/static/lib/handlebars-1.0.0.js index c70f09d1d..c70f09d1d 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/handlebars-1.0.0.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/handlebars-1.0.0.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/highlight.7.3.pack.js b/utils/test/result_collection_api/3rd_party/static/lib/highlight.7.3.pack.js index 9a95a75ea..9a95a75ea 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/highlight.7.3.pack.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/highlight.7.3.pack.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery-1.8.0.min.js b/utils/test/result_collection_api/3rd_party/static/lib/jquery-1.8.0.min.js index 066d72c7e..066d72c7e 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery-1.8.0.min.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/jquery-1.8.0.min.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery.ba-bbq.min.js b/utils/test/result_collection_api/3rd_party/static/lib/jquery.ba-bbq.min.js index bcbf24834..bcbf24834 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery.ba-bbq.min.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/jquery.ba-bbq.min.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery.slideto.min.js b/utils/test/result_collection_api/3rd_party/static/lib/jquery.slideto.min.js index ba32cff36..ba32cff36 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery.slideto.min.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/jquery.slideto.min.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery.wiggle.min.js b/utils/test/result_collection_api/3rd_party/static/lib/jquery.wiggle.min.js index 2adb0d6d5..2adb0d6d5 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/jquery.wiggle.min.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/jquery.wiggle.min.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/shred.bundle.js b/utils/test/result_collection_api/3rd_party/static/lib/shred.bundle.js index 74d081689..74d081689 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/shred.bundle.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/shred.bundle.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/shred/content.js b/utils/test/result_collection_api/3rd_party/static/lib/shred/content.js index b8051fedd..b8051fedd 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/shred/content.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/shred/content.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/swagger-oauth.js b/utils/test/result_collection_api/3rd_party/static/lib/swagger-oauth.js index 7c8839a95..7c8839a95 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/swagger-oauth.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/swagger-oauth.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/swagger.js b/utils/test/result_collection_api/3rd_party/static/lib/swagger.js index 78e8b2949..78e8b2949 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/swagger.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/swagger.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/underscore-min.js b/utils/test/result_collection_api/3rd_party/static/lib/underscore-min.js index 5a0cb3b00..5a0cb3b00 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/lib/underscore-min.js +++ b/utils/test/result_collection_api/3rd_party/static/lib/underscore-min.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/o2c.html b/utils/test/result_collection_api/3rd_party/static/o2c.html index d32d130ec..d32d130ec 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/o2c.html +++ b/utils/test/result_collection_api/3rd_party/static/o2c.html diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/swagger-ui.js b/utils/test/result_collection_api/3rd_party/static/swagger-ui.js index 4c9922642..4c9922642 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/swagger-ui.js +++ b/utils/test/result_collection_api/3rd_party/static/swagger-ui.js diff --git a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/swagger-ui.min.js b/utils/test/result_collection_api/3rd_party/static/swagger-ui.min.js index 28cb9e6a4..28cb9e6a4 100644 --- a/utils/test/result_collection_api/opnfv_testapi/tornado_swagger/static/swagger-ui.min.js +++ b/utils/test/result_collection_api/3rd_party/static/swagger-ui.min.js diff --git a/utils/test/result_collection_api/README.rst b/utils/test/result_collection_api/README.rst index c0075bc76..44ab2a475 100644 --- a/utils/test/result_collection_api/README.rst +++ b/utils/test/result_collection_api/README.rst @@ -25,7 +25,7 @@ How to install From within your environment, just run: - python setup.py install + ./install.sh How to run ^^^^^^^^^^ diff --git a/utils/test/result_collection_api/install.sh b/utils/test/result_collection_api/install.sh new file mode 100755 index 000000000..43229eabb --- /dev/null +++ b/utils/test/result_collection_api/install.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +usage=" +Script to install opnfv_tesgtapi automatically. +This script should be run under root. + +usage: + bash $(basename "$0") [-h|--help] [-t <test_name>] + +where: + -h|--help show this help text" + +if [[ $(whoami) != "root" ]]; then + echo "Error: This script must be run as root!" + exit 1 +fi + +cp -fr 3rd_party/static opnfv_testapi/tornado_swagger +python setup.py install +rm -fr opnfv_testapi/tornado_swagger/static |