Skip to content

Commit dfd8d09

Browse files
committed
Add configuration files and templates for issue tracking and CI/CD workflows
1 parent 061f1b6 commit dfd8d09

File tree

10 files changed

+474
-8
lines changed

10 files changed

+474
-8
lines changed

.ansible-lint

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
exclude_paths:
2+
- src/modules
3+
- src/module_utils
4+
- .github
5+
6+
skip_list:
7+
- no-handler
8+
- key-order[task]
9+
- key-order[play]
10+
- name[casing]
11+
- no-changed-when
12+
- role-name
13+
- var-naming
14+
- yaml[braces]
15+
- yaml[colons]
16+
- yaml[commas]
17+
- yaml[indentation]
18+
- yaml[line-length]
19+
- yaml[octal-values]
20+
- name[template]
21+
- command-instead-of-shell
22+
- jinja[spacing]

.github/ISSUE_TEMPLATE/backlog.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name: Backlog Item
3+
about: Log and track pending tasks, improvements, and enhancements
4+
title: ''
5+
labels: backlog, enhancement, bug, feature
6+
assignees: ''
7+
8+
---
9+
10+
## Overview
11+
12+
Provide a concise summary of the issue or enhancement.
13+
14+
---
15+
16+
## Problem Statement
17+
18+
A clear, detailed description of the problem. Include:
19+
20+
- What is happening?
21+
- What is the expected behavior?
22+
- Any error messages or traces.
23+
24+
---
25+
26+
## Proposed Enhancement
27+
28+
Detail the required changes or improvements to resolve the problem. Include:
29+
30+
- Steps to implement the enhancement.
31+
- Any references or research documents.
32+
- Impact analysis if applicable.
33+
34+
---
35+
36+
## Item Type
37+
38+
Please select the type of item by marking the appropriate checkbox:
39+
40+
- [ ] Backlog
41+
- [ ] Enhancement
42+
- [ ] Bug
43+
- [ ] Feature
44+
45+
---
46+
47+
## Acceptance Criteria
48+
49+
Define the conditions that must be met for this item to be considered complete:
50+
51+
- Criteria 1
52+
- Criteria 2

.github/ISSUE_TEMPLATE/issue.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Issue
3+
about: Create a report or discussion item for any issue or thought related to the project. Consider using the Backlog Item template for tracking bugs, tasks, improvements, and enhancements.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Overview
11+
12+
Provide a brief summary of the issue or discussion point.
13+
14+
---
15+
16+
## Description
17+
18+
Explain the issue or subject in detail. Include relevant background information and context.
19+
20+
---
21+
22+
## Steps to Reproduce (if applicable)
23+
24+
Provide a clear, step-by-step list of instructions to reproduce the issue:
25+
26+
1. Step one
27+
2. Step two
28+
3. Step three
29+
30+
---
31+
32+
## Environment
33+
34+
List details about your setup (e.g., operating system, version, browser, etc.):
35+
36+
- OS:
37+
- Version:
38+
- Additional details:
39+
- Test Type
40+
41+
---
42+
43+
## Additional Context
44+
45+
Include any extra information, such as logs, screenshots, or links that might help in understanding or resolving the issue.

.github/pull_request_template.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Description
2+
<!-- Provide a clear and concise description of the changes in this PR -->
3+
4+
## Problem Statement
5+
<!-- Describe the problem this PR solves. Link to relevant issues using #issue_number -->
6+
7+
## Solution Details
8+
<!-- Explain your implementation approach and design decisions -->
9+
- [ ] Implementation changes
10+
- [ ] Configuration updates
11+
- [ ] Documentation updates
12+
13+
## Testing
14+
<!-- Describe how you tested these changes -->
15+
### Test Environment
16+
17+
- OS:
18+
- SAP Version:
19+
- Database Type:
20+
21+
### Test Cases
22+
23+
- [ ] Unit tests added/updated
24+
- [ ] Manual Testing done
25+
26+
## Checklist
27+
<!-- Mark completed items with [x] -->
28+
- [ ] Code follows project style guidelines
29+
- [ ] Documentation has been updated
30+
- [ ] Tests are passing
31+
- [ ] PR title follows conventional commit format
32+
- [ ] Breaking changes are clearly marked
33+
34+
## Dependencies
35+
<!-- List any dependencies or related PRs -->
36+
- Depends on: #issue_number
37+
38+
## Screenshots/Logs
39+
<!-- If applicable, add screenshots or relevant logs -->
40+
41+
## Additional Notes
42+
<!-- Any other relevant information -->
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
2+
name: Pull Request - Ansible Lint and Code Coverage
3+
on: [push, pull_request]
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Harden Runner
12+
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
13+
with:
14+
egress-policy: audit
15+
16+
- name: Checkout the code
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 #v5.4.0
21+
with:
22+
python-version: '3.x'
23+
24+
- name: Install Ansible and Ansible-Lint
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
29+
- name: Install Ansible Collections
30+
run: |
31+
ansible-galaxy collection install ansible.windows --force
32+
ansible-galaxy collection install ansible.posix --force
33+
ansible-galaxy collection install ansible.utils --force
34+
ansible-galaxy collection install ansible.netcommon:5.1.2 --force
35+
ansible-galaxy collection install community.windows --force
36+
ansible-galaxy collection install community.general --force
37+
ansible-galaxy collection install microsoft.ad --force
38+
39+
- name: Run ansible-lint
40+
run: |
41+
ansible-lint src/ -c .ansible-lint
42+
43+
- name: Run pytest with coverage
44+
run: |
45+
pytest --cov=src/ --cov-report=xml
46+
47+
- name: Check code formatting with black
48+
run: |
49+
black --check src/ --config pyproject.toml
50+
51+
- name: Validate PR Description
52+
uses: actions/github-script@v6
53+
with:
54+
script: |
55+
const core = require('@actions/core');
56+
const pr = await github.rest.pulls.get({
57+
owner: context.repo.owner,
58+
repo: context.repo.repo,
59+
pull_number: context.payload.pull_request.number,
60+
});
61+
const body = pr.data.body || "";
62+
const requiredSections = [
63+
"Description",
64+
"Test Cases",
65+
"Checklist",
66+
];
67+
const missingSections = requiredSections.filter(section => !body.includes(section));
68+
if(missingSections.length > 0) {
69+
core.setFailed(`PR Description is missing the following sections: ${missingSections.join(", ")}`);
70+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Pull Request Checks
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize]
6+
7+
jobs:
8+
pr_checks:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v3
13+
14+
- name: Setup Python 3.10
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.10"
18+
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install ansible-lint pytest pytest-cov black
23+
24+
- name: Run Ansible Lint on playbooks, tasks, and roles
25+
run: ansible-lint .
26+
27+
- name: Run Pytest with Coverage Check
28+
run: |
29+
pytest --cov=. --cov-fail-under=85
30+
31+
- name: Check Code Formatting with Black
32+
run: black --check .
33+
34+
- name: Validate PR Description
35+
uses: actions/github-script@v6
36+
with:
37+
script: |
38+
const core = require('@actions/core');
39+
const pr = await github.rest.pulls.get({
40+
owner: context.repo.owner,
41+
repo: context.repo.repo,
42+
pull_number: context.payload.pull_request.number,
43+
});
44+
const body = pr.data.body || "";
45+
const requiredSections = [
46+
"Description",
47+
"Test Cases",
48+
"Checklist",
49+
];
50+
const missingSections = requiredSections.filter(section => !body.includes(section));
51+
if(missingSections.length > 0) {
52+
core.setFailed(`PR Description is missing the following sections: ${missingSections.join(", ")}`);
53+
}

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,3 +396,13 @@ FodyWeavers.xsd
396396

397397
# JetBrains Rider
398398
*.sln.iml
399+
400+
401+
# Python virtual environment
402+
.venv
403+
.vscode
404+
405+
# System configuration files
406+
WORKSPACES/*
407+
.ppk
408+
VMWPASSWORD

README.md

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,62 @@
1-
# Project
1+
# SAP Testing Automation Framework
22

3-
> This repo has been populated by an initial template to help get you started. Please
4-
> make sure to update the content to build a great experience for community-building.
3+
## Overview
54

6-
As the maintainer of this project, please make a few updates:
5+
The SAP Testing Automation Framework is a automation solution designed to validate the configuration and performance of SAP systems on Azure under a wide array of scenarios. This framework not only streamlines the testing of SAP environments but also brings confidence and assurance by simulating real-world conditions.
76

8-
- Improving this README.MD file to provide a great experience
9-
- Updating SUPPORT.MD with content about this project's support experience
10-
- Understanding the security reporting process in SECURITY.MD
11-
- Remove this section from the README
7+
Currently, the framework offers test scenarios focusing on high availability functional testing and configuration checks. Under the high availability category, we address critical components including:
8+
9+
- **SAP HANA Database HA Configurations:** Validate SAP HANA database configurations, ensuring resilience, rapid failover, and optimal performance even in adverse conditions.
10+
- **SAP Central Services (SCS/ERS) HA Setups:** Test and verify the configuration integrity and robustness of SAP Central Services, including load balancing, failover mechanisms, and component interoperability.
11+
12+
By integrating comprehensive monitoring, detailed logging, and automated evaluation, our framework transforms how organizations maintain and enhance the reliability of their SAP landscapes on Azure.
13+
14+
### Purpose
15+
16+
Testing is crucial for maintaining business continuity in SAP environments. This framework addresses several critical needs:
17+
18+
**Risk Mitigation**:
19+
The framework provides systematic testing of failure scenarios, helping organizations identify and address potential issues before they impact production systems. It simulates various failure modes, including node failures, network interruptions, and storage issues, ensuring that recovery mechanisms function as designed.
20+
21+
**Compliance**:
22+
Organizations must often demonstrate that their SAP systems meet specific availability requirements. This framework provides documented evidence of HA testing, including detailed logs and reports that can be used for audit purposes. It helps ensure that HA implementations align with organizational standards and regulatory requirements.
23+
24+
**Quality Assurance**:
25+
Through automated and consistent testing procedures, the framework helps maintain high quality standards across SAP infrastructure components. It validates that all HA mechanisms, including clustering software, storage replication, and application-level failover, work together seamlessly.
26+
27+
**Automation**:
28+
Manual testing of HA configurations is time-consuming and prone to human error. This framework automates the entire testing process, from setup to execution and reporting, significantly reducing the operational overhead of HA testing while improving accuracy and consistency.
29+
30+
## Get Started
31+
32+
There are two primary ways to get started with the SAP Testing Automated Framework. Choose the path that best fits your current environment and objectives:
33+
34+
### [Integration with SAP Deployment Automation Framework (SDAF)](./docs/SDAF_INTEGRATION.md)
35+
36+
If you already have [SDAF](https://github.com/Azure/sap-automation) environment set up, integrating the SAP Testing Automation Framework is a natural extension that allows you to leverage existing deployment pipelines and configurations.
37+
38+
### [Getting Started with High Availability Testing (Standalone)](./docs/GETTING_STARTED.md)
39+
40+
For users focused solely on validating SAP functionality and configurations, the standalone approach offers a streamlined process to test critical SAP components without the complexity of full deployment integration.
41+
42+
43+
### [Architecture and Components](./docs/ARCHITECTURE.md)
44+
45+
## License
46+
47+
Copyright (c) Microsoft Corporation.
48+
Licensed under the MIT License.
49+
50+
## Support
51+
52+
For support and questions, please:
53+
1. Check existing issues
54+
2. Create new issue if needed
55+
3. Provide detailed information about the problem
56+
57+
## Additional Resources
58+
- [Azure SAP Documentation](https://docs.microsoft.com/azure/sap)
59+
- [SAP on Azure: High Availability Guide](https://docs.microsoft.com/azure/sap/workloads/sap-high-availability-guide-start)
1260

1361
## Contributing
1462

0 commit comments

Comments
 (0)