diff options
author | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2023-06-06 12:20:00 +0000 |
---|---|---|
committer | Lukasz Rajewski <lukasz.rajewski@t-mobile.pl> | 2023-06-06 12:32:30 +0000 |
commit | c458ace517bb640de7ec05cd2a26e33cfcac21e2 (patch) | |
tree | fa33046b361bd69280b52d3ed180db4c22f3de3d /src/onaptests/steps/reports_collection.py | |
parent | 74fa2a41627e8f2e807bb1c80d928dec3ccf8d85 (diff) |
Add component name to the JSON report format
Issue-ID: INT-2235
Signed-off-by: Lukasz Rajewski <lukasz.rajewski@t-mobile.pl>
Change-Id: I81274e0cca45ef86490e8004c594d7e85bf3c539
Diffstat (limited to 'src/onaptests/steps/reports_collection.py')
-rw-r--r-- | src/onaptests/steps/reports_collection.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/onaptests/steps/reports_collection.py b/src/onaptests/steps/reports_collection.py index 0e5076f..be06151 100644 --- a/src/onaptests/steps/reports_collection.py +++ b/src/onaptests/steps/reports_collection.py @@ -15,13 +15,13 @@ class ReportStepStatus(Enum): FAIL = "FAIL" NOT_EXECUTED = "NOT EXECUTED" - @dataclass class Report: """Step execution report.""" step_description: str step_execution_status: ReportStepStatus step_execution_duration: float + step_component: str class ReportsCollection: @@ -95,10 +95,11 @@ class ReportsCollection: { 'description': step_report.step_description, 'status': step_report.step_execution_status.value, - 'duration': step_report.step_execution_duration + 'duration': step_report.step_execution_duration, + 'component': step_report.step_component } for step_report in reversed(self.report) ] } with (Path(settings.REPORTING_FILE_DIRECTORY).joinpath(settings.JSON_REPORTING_FILE_NAME)).open('w') as file: - json.dump(report_dict, file, indent=4)
\ No newline at end of file + json.dump(report_dict, file, indent=4) |