diff options
author | Georg Kunz <georg.kunz@ericsson.com> | 2018-09-03 23:59:54 +0200 |
---|---|---|
committer | Georg Kunz <georg.kunz@ericsson.com> | 2018-09-03 23:59:54 +0200 |
commit | 733c2f23838be6d13ff6c751faea1bfbf98b3161 (patch) | |
tree | d5be5d278a9023665ec7c3fc384f491305ad73c5 | |
parent | 321f21dee53a57b0f110dfab52bb0cd8dde240ca (diff) |
Gen-test-cases tool: Print total number of test cases
The tool for generating the testcases.json now prints the total number
of test cases per area. This is not needed by the webportal which does
the math itself but rather for updating the total numbers in the
documentation.
Change-Id: I02b8b4eba0d1046495002d32aa476b9abb45c0de
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
-rwxr-xr-x | utils/generate-testcase-list/generate-testcases-list.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/generate-testcase-list/generate-testcases-list.py b/utils/generate-testcase-list/generate-testcases-list.py index bafd329..5bfaa2f 100755 --- a/utils/generate-testcase-list/generate-testcases-list.py +++ b/utils/generate-testcase-list/generate-testcases-list.py @@ -71,6 +71,7 @@ class TestcaseList: } for area in ['mandatory', 'optional']: + total_per_area = 0 testcase_names = testsuite_data.values()[0]['testcases_list'][area] for name in testcase_names: tc = { @@ -87,8 +88,12 @@ class TestcaseList: tc['cases'] = cases tc['total'] = len(cases) + total_per_area += tc['total'] testcase_list[area][name] = tc + print "Total number of test cases in area {}: {}".format( + area, total_per_area) + output_file = os.path.join(self.output_dir, 'testcases.json') with open(output_file, 'w') as file: json.dump(testcase_list, file, indent=4, sort_keys=True) |