Skip to content

Commit 8ad5276

Browse files
Add framework version tracking and update reports (#149)
1 parent 3e5cdd7 commit 8ad5276

File tree

7 files changed

+36
-2
lines changed

7 files changed

+36
-2
lines changed

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.0

docs/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
# Changelog
22

33
All notable changes to this project will be documented in this file.
4+
5+
6+
## 1.0.0
7+
Release Date: 11-04-2025
8+
9+
1. High Availability Functional Tests:
10+
- Added comprehensive functional tests for High Availability (HA) configurations for SAP HANA Database with scale-up architecture.
11+
- Added functional tests for HA configurations for SAP Central Services (ASCS) with Primary and Secondary nodes for ENSA1 and ENSA2 system types.
12+
- Support for running HA functional tests for systems with new HANA topology - SAP HANA SR-angi.
13+
- Offline Validation for HA configurations for SAP HANA Database and Central Services.
14+
2. Configuration Checks (preview release):
15+
- Initial implementation of configuration checks for SAP systems.
16+
- Support for validating SAP systems with HANA and IBM Db2 databases.

src/modules/render_html_report.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
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
5661
author:
5762
- Microsoft Corporation
5863
notes:
@@ -71,6 +76,7 @@
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 = (

src/roles/misc/tasks/render-html-report.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
ansible.builtin.set_fact:
1515
html_report_template: "{{ lookup('file', html_template_name | default('./templates/report.html')) }}"
1616

17+
- name: "Get framework version"
18+
no_log: true
19+
ansible.builtin.set_fact:
20+
framework_version: "{{ lookup('file', '../../../../VERSION') | default('unknown') }}"
21+
1722
- name: "Read the log file and create a HTML report"
1823
render_html_report:
1924
test_group_invocation_id: "{{ test_group_invocation_id }}"
@@ -22,4 +27,5 @@
2227
workspace_directory: "{{ _workspace_directory }}"
2328
test_case_results: "{{ all_results | default([]) }}"
2429
system_info: "{{ system_info | default({}) }}"
30+
framework_version: "{{ framework_version | default('unknown') }}"
2531
register: report_file_path

src/templates/config_checks_report.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ <h4 class="section-header" onclick="toggleSection('section-{{ check.hostname }}-
13911391
</div>
13921392
</div>
13931393
</div>
1394-
<div class="footer">Report generated on: {{ report_generation_time }}</div>
1394+
<div class="footer">Report generated on: {{ report_generation_time }} with framework version: {{ framework_version }}</div>
13951395
<script>
13961396
function toggleDetails(checkId) {
13971397
const detailsRow = document.getElementById('details-' + checkId)

src/templates/report.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ <h2 class="system-info-heading">System Information</h2>
432432
</div>
433433
</div>
434434
</div>
435-
<div class="footer">Report generated on: {{ report_generation_time }}</div>
435+
<div class="footer">Report generated on: {{ report_generation_time }} with framework version: {{ framework_version }}</div>
436436
<script>
437437
// Function to beautify JSON objects
438438
function formatJsonObjects() {

tests/modules/render_html_report_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def module_params(self):
2727
"test_group_name": "test_group",
2828
"report_template": "report_template.html",
2929
"workspace_directory": "/tmp",
30+
"framework_version": "1.0.0",
3031
}
3132

3233
@pytest.fixture
@@ -44,6 +45,7 @@ def html_report_renderer(self, module_params):
4445
module_params["test_group_name"],
4546
module_params["report_template"],
4647
module_params["workspace_directory"],
48+
module_params["framework_version"],
4749
)
4850

4951
def test_render_report(self, mocker, html_report_renderer):
@@ -115,6 +117,7 @@ def __init__(self, argument_spec, supports_check_mode):
115117
"test_group_name": "test_group",
116118
"report_template": "report_template.html",
117119
"workspace_directory": "/tmp",
120+
"framework_version": "1.0.0",
118121
}
119122
self.check_mode = False
120123

0 commit comments

Comments
 (0)