Metadata-Version: 2.1
Name: openapi_qase_suite_generator
Version: 1.0.3
Summary: Generate Qase test suites from OpenAPI specs
Author-email: Example Author <author@example.com>
License: MIT License
        
        Copyright (c) 2024 Petra Barus
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/petrabarus/openapi_qase_suite_generator
Project-URL: Issues, https://github.com/petrabarus/openapi_qase_suite_generator/issues
Keywords: qase,openapi,testsuite
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.32.3
Requires-Dist: PyYAML>=6.0.1

# openapi-qase-suite-generator

This script generates a Qase suite from an OpenAPI spec YAML file.
This is useful for keeping the consistency between the API and the test cases. In my company we use Qase for API testing.
For every Operation (Endpoint + Method) we create a new Qase suite. Every suite contains testcases for the given operation,
whether it is Unit Test or API Test, manual or automated.
Consistency naming for the test cases and the Operations is a good practice for maintenance.

For example, the following OpenAPI spec contains 3 operations:
```
paths:
  /api/v1/users:
    get:
      operationId: ApiV1UsersGet
      description: Get all available users
    post:
      operationId: ApiV1UsersPost
      description: Create a new user
  /api/v1/users/{id}:
    get:
      operationId: ApiV1UsersIdGet
      description: Get a user by ID
```

This script will generate 3 suites:
- Suite: ApiV1UsersGet under directory "api", "v1", "users"
- Suite: ApiV1UsersPost under directory "api", "v1", "users"
- Suite: ApiV1UsersIdGet under directory "api", "v1", "users", "{id}"

The tester can add test cases to the generated suites.
The script will generate a new Qase suite only if it does not exist yet.

Usage:
```
  openapi_qase_suite_generator \
    --api-definition <path-to-openapi-spec> \
    --qase-api-token <qase-api-token> \
    --qase-project-id <qase-project-id> \
    --qase-root-suite-id <qase-root-suite-id>
```
Where:
- <path-to-openapi-spec> is the path to the OpenAPI spec YAML file
- <qase-api-token> is the Qase API token
- <qase-project-id> is the Qase project ID
- <qase-root-suite-id> is the Qase root suite ID
