Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
exclude_paths:
- src/modules
- src/module_utils
- .github

skip_list:
- no-handler
- key-order[task]
- key-order[play]
- name[casing]
- no-changed-when
- role-name
- var-naming
- yaml[braces]
- yaml[colons]
- yaml[commas]
- yaml[indentation]
- yaml[line-length]
- yaml[octal-values]
- name[template]
- command-instead-of-shell
- jinja[spacing]
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/backlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Backlog Item
about: Log and track pending tasks, improvements, and enhancements
title: ''
labels: backlog, enhancement, bug, feature
assignees: ''

---

## Overview

Provide a concise summary of the issue or enhancement.

---

## Problem Statement

A clear, detailed description of the problem. Include:

- What is happening?
- What is the expected behavior?
- Any error messages or traces.

---

## Proposed Enhancement

Detail the required changes or improvements to resolve the problem. Include:

- Steps to implement the enhancement.
- Any references or research documents.
- Impact analysis if applicable.

---

## Item Type

Please select the type of item by marking the appropriate checkbox:

- [ ] Backlog
- [ ] Enhancement
- [ ] Bug
- [ ] Feature

---

## Acceptance Criteria

Define the conditions that must be met for this item to be considered complete:

- Criteria 1
- Criteria 2
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Issue
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.
title: ''
labels: ''
assignees: ''

---

## Overview

Provide a brief summary of the issue or discussion point.

---

## Description

Explain the issue or subject in detail. Include relevant background information and context.

---

## Steps to Reproduce (if applicable)

Provide a clear, step-by-step list of instructions to reproduce the issue:

1. Step one
2. Step two
3. Step three

---

## Environment

List details about your setup (e.g., operating system, version, browser, etc.):

- OS:
- Version:
- Additional details:
- Test Type

---

## Additional Context

Include any extra information, such as logs, screenshots, or links that might help in understanding or resolving the issue.
42 changes: 42 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Description
<!-- Provide a clear and concise description of the changes in this PR -->

## Problem Statement
<!-- Describe the problem this PR solves. Link to relevant issues using #issue_number -->

## Solution Details
<!-- Explain your implementation approach and design decisions -->
- [ ] Implementation changes
- [ ] Configuration updates
- [ ] Documentation updates

## Testing
<!-- Describe how you tested these changes -->
### Test Environment

- OS:
- SAP Version:
- Database Type:

### Test Cases

- [ ] Unit tests added/updated
- [ ] Manual Testing done

## Checklist
<!-- Mark completed items with [x] -->
- [ ] Code follows project style guidelines
- [ ] Documentation has been updated
- [ ] Tests are passing
- [ ] PR title follows conventional commit format
- [ ] Breaking changes are clearly marked

## Dependencies
<!-- List any dependencies or related PRs -->
- Depends on: #issue_number

## Screenshots/Logs
<!-- If applicable, add screenshots or relevant logs -->

## Additional Notes
<!-- Any other relevant information -->
49 changes: 49 additions & 0 deletions .github/workflows/github-actions-ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

name: Pull Request - Ansible Lint and Code Coverage
on: [push, pull_request]
permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit

- name: Checkout the code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Setup Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 #v5.4.0
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Install Ansible Collections
run: |
ansible-galaxy collection install ansible.windows --force
ansible-galaxy collection install ansible.posix --force
ansible-galaxy collection install ansible.utils --force
ansible-galaxy collection install ansible.netcommon:5.1.2 --force
ansible-galaxy collection install community.windows --force
ansible-galaxy collection install community.general --force
ansible-galaxy collection install microsoft.ad --force

- name: Run ansible-lint
run: |
ansible-lint src/ -c .ansible-lint

# - name: Run pytest with coverage
# run: |
# pytest --cov=src/ --cov-report=xml tests/

- name: Check code formatting with black
run: |
black --check src/ --config pyproject.toml
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,13 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml


# Python virtual environment
.venv
.vscode

# System configuration files
WORKSPACES/*
.ppk
VMWPASSWORD
64 changes: 56 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,62 @@
# Project
# SAP Testing Automation Framework

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

As the maintainer of this project, please make a few updates:
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.

- Improving this README.MD file to provide a great experience
- Updating SUPPORT.MD with content about this project's support experience
- Understanding the security reporting process in SECURITY.MD
- Remove this section from the README
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:

- **SAP HANA Database HA Configurations:** Validate SAP HANA database configurations, ensuring resilience, rapid failover, and optimal performance even in adverse conditions.
- **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.

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.

### Purpose

Testing is crucial for maintaining business continuity in SAP environments. This framework addresses several critical needs:

**Risk Mitigation**:
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.

**Compliance**:
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.

**Quality Assurance**:
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.

**Automation**:
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.

## Get Started

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:

### [Integration with SAP Deployment Automation Framework (SDAF)](./docs/SDAF_INTEGRATION.md)

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.

### [Getting Started with High Availability Testing (Standalone)](./docs/GETTING_STARTED.md)

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.


### [Architecture and Components](./docs/ARCHITECTURE.md)

## License

Copyright (c) Microsoft Corporation.
Licensed under the MIT License.

## Support

For support and questions, please:
1. Check existing issues
2. Create new issue if needed
3. Provide detailed information about the problem

## Additional Resources
- [Azure SAP Documentation](https://docs.microsoft.com/azure/sap)
- [SAP on Azure: High Availability Guide](https://docs.microsoft.com/azure/sap/workloads/sap-high-availability-guide-start)

## Contributing

Expand Down
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[tool.black]
line_length = 100

[tool.pylint.main]
load-plugins = ["pylint.extensions.docparams"]

[tool.pylint.basic]
argument-naming-style = "snake_case"
attr-naming-style = "snake_case"
bad-names = ["foo", "bar", "baz", "toto", "tutu", "tata"]
class-naming-style = "PascalCase"
docstring-min-length = 10
function-naming-style = "snake_case"
variable-naming-style = "snake_case"


[tool.pylint.format]
max-line-length = 100
max-module-lines = 1000

[tool.pylint."messages control"]
enable = [
"C0116",
"C0115",
"C0114",
"C0301",
"E1101",
"W0611",
]
disable = [
"W0702", # bare-except
"W0703", # broad-except
"W4901", # global-statement
"R0902", # too-many-instance-attributes
"R0903", # too-few-public-methods
"R1702",
"R0801",
"W0108"
]

[tool.pylint.design]
max-args = 5

[tool.pylint.docs]
docstring-min-length = 10

[tool.pylint.variables]
init-import = false
dummy-variables-rgx = "_.*|dummy"

[tool.pylint.refactoring]
max-nested-blocks = 3

[tool.pylint.errors]
enable = [
"E1101",
"W0611",
]
Loading