testrail_api.py |
This module provides a TestRail class for interfacing with the TestRail API, enabling the creation and management of test milestones, test runs, and updating test cases. It facilitates automation and integration of TestRail functionalities into testing workflows, particularly for projects requiring automated test management and reporting.
The TestRail class encapsulates methods to interact with TestRail's API, including creating milestones and test runs, updating test cases, and checking the existence of milestones. It also features a method to retry API calls, enhancing the robustness of network interactions.
Key Components:
- TestRail Class: A class providing methods for interacting with TestRail's API.
- create_milestone: Create a new milestone in a TestRail project.
- create_milestone_and_test_runs: Create a milestone and associated test runs for multiple devices in a project.
- create_test_run: Create a test run within a TestRail project.
- does_milestone_exist: Check if a milestone already exists in a TestRail project.
- update_test_cases_to_passed: Update the status of test cases to 'passed' in a test run.
- Private Methods: Utility methods for internal use to fetch test cases, update test run results, and retrieve milestones.
- Retry Mechanism: A method to retry API calls with a specified number of attempts and delay, improving reliability in case of intermittent network issues.
Usage:
This module is intended to be used as part of a larger automated testing system, where integration with TestRail is required for test management and reporting.
|
8855 |
testrail_conn.py |
TestRail API binding for Python 3.x.
(API v2, available since TestRail 3.0)
Compatible with TestRail 3.0 and later.
Learn more:
http://docs.gurock.com/testrail-api2/start
http://docs.gurock.com/testrail-api2/accessing
Copyright Gurock Software GmbH. See license.md for details.
|
3564 |
testrail_utils.py |
This script contains utility functions designed to support the integration of automated
testing processes with TestRail, a test case management tool. The primary focus is on
creating and managing milestones in TestRail based on automated smoke tests for product
releases. It includes functions for building milestone names and descriptions, determining
release types, and loading TestRail credentials.
Functions:
- build_milestone_name(product_type, release_type, version_number): Constructs a formatted
milestone name based on the product type, release type, and version number.
- build_milestone_description(milestone_name): Generates a detailed description for the
milestone, including the release date and placeholders for testing status and QA recommendations.
- get_release_version(): Reads and returns the release version number from a 'version.txt' file.
- get_release_type(version): Determines the release type (e.g., Alpha, Beta, RC) based on
the version string.
- load_testrail_credentials(json_file_path): Loads TestRail credentials from a JSON file
and handles potential errors during the loading process.
|
3206 |