5353 - Reports will be created in {workspace_directory}/quality_assurance/
5454 type: str
5555 required: true
56+ framework_version:
57+ description:
58+ - Version of the SAP Automation QA framework
59+ type: str
60+ required: false
5661author:
5762 - Microsoft Corporation
5863notes:
7176 test_group_name: "hana_cluster_validation"
7277 report_template: "{{ lookup('file', 'templates/report_template.html') }}"
7378 workspace_directory: "/var/log/sap-automation-qa"
79+ framework_version: "1.0.0"
7480 register: report_result
7581
7682- name: Show path to generated report
@@ -115,6 +121,7 @@ def __init__(
115121 workspace_directory : str ,
116122 test_case_results : List [Dict [str , Any ]] = [],
117123 system_info : Dict [str , Any ] = {},
124+ framework_version : str = "unknown" ,
118125 ):
119126 super ().__init__ ()
120127 self .test_group_invocation_id = test_group_invocation_id
@@ -128,6 +135,7 @@ def __init__(
128135 )
129136 self .test_case_results = test_case_results or []
130137 self .system_info = system_info or {}
138+ self .framework_version = framework_version
131139
132140 def read_log_file (self ) -> List [Dict [str , Any ]]:
133141 """
@@ -184,6 +192,7 @@ def render_report(self, test_case_results: List[Dict[str, Any]]) -> None:
184192 "%m/%d/%Y, %I:%M:%S %p"
185193 ),
186194 "system_info" : self .system_info ,
195+ "framework_version" : self .framework_version ,
187196 }
188197 )
189198 )
@@ -205,6 +214,7 @@ def run_module() -> None:
205214 workspace_directory = dict (type = "str" , required = True ),
206215 test_case_results = dict (type = "list" , required = False ),
207216 system_info = dict (type = "dict" , required = False ),
217+ framework_version = dict (type = "str" , required = False ),
208218 )
209219
210220 module = AnsibleModule (argument_spec = module_args , supports_check_mode = True )
@@ -216,6 +226,7 @@ def run_module() -> None:
216226 workspace_directory = module .params ["workspace_directory" ],
217227 test_case_results = module .params .get ("test_case_results" , []),
218228 system_info = module .params .get ("system_info" , {}),
229+ framework_version = module .params .get ("framework_version" , "unknown" ),
219230 )
220231
221232 test_case_results = (
0 commit comments