Skip to main content

Collection of test utilities for the Solution Application Framework.

Project description

Python PyPI GH-CI Codecov Apache Ruff

Overview

SAF SDK Testing provides a suite of reusable testing utilities, fixtures, and helper methods designed to standardize and streamline testing across the SAF landscape.

This package serves two primary objectives:

  1. Centralizing testing utilities for SAF development: Provides a unified testing infrastructure shared across all SAF-SDK repositories, ensuring consistency and reducing duplication in the development of SAF platform components such as the Desktop Orchestrator, Web Portal, Data Management services, and other core modules.

  2. Empowering solution developers: Delivers ready-to-use testing tools for solution developers—consumers of the SAF platform—enabling them to efficiently test their custom solutions built on SAF. This includes utilities for end-to-end solution testing, UI automation, service integration testing, and more.

Core Capabilities

The package is organized into modular components, each addressing specific testing needs:

  • Common Utilities: Shared helper functions for general-purpose testing tasks, including network utilities, directory management, and gRPC certificate handling.

  • Database Testing: Fixtures and methods for testing against PostgreSQL and SQLite databases, including container-managed database instances.

  • Docker Integration: Tools for managing Docker containers and orchestrating containerized test environments.

  • Frontend/Selenium: Selenium WebDriver utilities for end-to-end UI testing, including element waiting strategies and browser interaction helpers.

  • HPS Integration: Testing support for High Performance Computing Services, including deployment processes and stack management.

  • PIM Integration: Utilities for testing Product Instance Management service interactions.

  • Pytest Enhancements: Custom pytest fixtures, markers for platform-specific tests, mocking utilities, and test case documentation helpers.

  • Solution Testing: End-to-end testing infrastructure for SAF solutions, including GLOW engine integration, execution configurations, and project context management.

  • Process Management: Tools for launching and managing external processes during test execution.

Design Principles

This package adheres to strict design principles to ensure reliability and ease of use across the SAF ecosystem:

  • Explicit over implicit: No autouse=True fixtures. Developers must explicitly enable fixtures to maintain clarity about test execution.

  • Simplicity and transparency: Utilities are designed to be easy to understand, allowing developers to predict behavior when calling them.

  • Version-agnostic generality: Utilities are generic and adaptable, avoiding dependencies on specific versions of SAF components.

  • Flat architecture: No nested function or fixture calls, maintaining transparency and predictability in test execution.

  • Backward compatibility: All changes must be backward compatible. Fixes for one repository should never break others.

Installation

Ensure you have all the necessary prerequisites. Then, refer to the installation guidelines for detailed instructions on how to install the project in your system.

Documentation

The official documentation of SAF SDK Testing contains the following chapters:

  • Getting started. This section provides a brief overview and instructions on how to get started with the project. It typically includes information on how to install the project, set up any necessary dependencies, and run a basic example or test to ensure everything is functioning correctly.

  • User guide. The user guide section offers detailed documentation and instructions on how to use the project. It provides comprehensive explanations of the project’s features, functionalities, and configuration options. The user guide aims to help users understand the project’s concepts, best practices, and recommended workflows.

  • Contribute. This section provides guidelines and instructions on how to contribute to the project. It includes information on how to set up the development environment, run tests, submit pull requests, and follow contribution guidelines.

Troubleshooting

For troubleshooting or reporting issues, open an issue in the project repository.

Follow these steps to report an issue:

  • Go to the project repository.

  • Click on the Issues tab.

  • Click on the New Issue button.

  • Provide a clear and detailed description of the issue you are facing.

  • Include any relevant error messages, code snippets, or screenshots.

Additionally, you can refer to the official documentation for additional resources and troubleshooting guides.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Changelog

The changelog section provides a summary of notable changes for each version of SAF SDK Testing for Python. It helps you keep track of updates, bug fixes, new features, and improvements made to the project over time.

To view the complete changelog, visit the project repository and navigate to the CHANGELOG file. It provides a comprehensive list of changes categorized by version, along with brief descriptions of each change.

Getting Started

Add to your package’s pyproject.toml:

[tool.poetry.group.tests]
optional = true
[tool.poetry.group.tests.dependencies]
ansys-saf-testing = { version = "^0.1.dev7", source = "solutions-private-pypi", allow-prereleases = true }
...

For methods, just import them when needed. Example:

from ansys.saf.testing.selenium import wait_for_element_to_be_clickable, wait_for_partial_text

Extra groups

  • selenium: if you want to use Selenium-related fixtures and methods.

  • process: if you want to use Process class for launching external processes.

  • solution: if you want to use fixtures and methods to launch a Solution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansys_saf_testing-0.11.dev3.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansys_saf_testing-0.11.dev3-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file ansys_saf_testing-0.11.dev3.tar.gz.

File metadata

  • Download URL: ansys_saf_testing-0.11.dev3.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for ansys_saf_testing-0.11.dev3.tar.gz
Algorithm Hash digest
SHA256 a673d0346435b2b89a8b7a83c843c2ad777cf29176e5195c861e849a1734cdad
MD5 d15968b13144acd711df53645b1d0497
BLAKE2b-256 e42d439e0dd13349d197b16533771fef31c8dea61b7091afcb7a6e40d472b07a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_saf_testing-0.11.dev3.tar.gz:

Publisher: ci_cd_release.yml on ansys/saf-sdk-testing

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansys_saf_testing-0.11.dev3-py3-none-any.whl.

File metadata

File hashes

Hashes for ansys_saf_testing-0.11.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 68ed2d80fdd746ec7b8d369f89bf154d6fe0b83d88a5c3050e1162909bc9b7e4
MD5 7395a7f7fc2c53fcc306ba3efb32deed
BLAKE2b-256 61ba3212ac1764b09a0214766b86e2a3fd67b2fcc35012006a361340a3143c86

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansys_saf_testing-0.11.dev3-py3-none-any.whl:

Publisher: ci_cd_release.yml on ansys/saf-sdk-testing

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page