qase-python-commons 5.0.2__tar.gz → 5.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qase_python_commons-5.0.4/PKG-INFO +421 -0
- qase_python_commons-5.0.4/README.md +386 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/pyproject.toml +2 -3
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/config.py +5 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/config/qaseconfig.py +29 -1
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/profilers/db.py +213 -174
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/profilers/network.py +16 -10
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/reporters/core.py +95 -22
- qase_python_commons-5.0.4/src/qase_python_commons.egg-info/PKG-INFO +421 -0
- qase_python_commons-5.0.2/PKG-INFO +0 -462
- qase_python_commons-5.0.2/README.md +0 -427
- qase_python_commons-5.0.2/src/qase_python_commons.egg-info/PKG-INFO +0 -462
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/setup.cfg +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/__init__.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/__init__.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/client/api_v1_client.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/client/api_v2_client.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/client/base_api_client.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/exceptions/reporter.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/loader.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/logger.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/__init__.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/attachment.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/basemodel.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/config/api.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/config/batch.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/config/connection.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/config/framework.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/config/plan.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/config/report.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/config/run.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/config/testops.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/external_link.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/relation.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/result.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/run.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/runtime.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/models/step.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/profilers/__init__.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/profilers/sleep.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/reporters/__init__.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/reporters/report.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/reporters/testops.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/reporters/testops_multi.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/status_mapping/__init__.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/status_mapping/status_mapping.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/util/__init__.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/util/host_data.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/utils.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase/commons/validators/base.py +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase_python_commons.egg-info/SOURCES.txt +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase_python_commons.egg-info/dependency_links.txt +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase_python_commons.egg-info/requires.txt +0 -0
- {qase_python_commons-5.0.2 → qase_python_commons-5.0.4}/src/qase_python_commons.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qase-python-commons
|
|
3
|
+
Version: 5.0.4
|
|
4
|
+
Summary: A library for Qase TestOps and Qase Report
|
|
5
|
+
Author-email: Qase Team <support@qase.io>
|
|
6
|
+
Project-URL: Homepage, https://github.com/qase-tms/qase-python/tree/main/qase-python-commons
|
|
7
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
8
|
+
Classifier: Programming Language :: Python
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
12
|
+
Classifier: Topic :: Software Development :: Testing
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Requires-Python: >=3.9
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Requires-Dist: certifi>=2024.2.2
|
|
23
|
+
Requires-Dist: attrs>=23.2.0
|
|
24
|
+
Requires-Dist: qase-api-client~=2.0.3
|
|
25
|
+
Requires-Dist: qase-api-v2-client~=2.0.3
|
|
26
|
+
Requires-Dist: more_itertools
|
|
27
|
+
Provides-Extra: testing
|
|
28
|
+
Requires-Dist: pytest; extra == "testing"
|
|
29
|
+
Requires-Dist: pytest-cov; extra == "testing"
|
|
30
|
+
Requires-Dist: mock; extra == "testing"
|
|
31
|
+
Requires-Dist: more_itertools; extra == "testing"
|
|
32
|
+
Requires-Dist: requests; extra == "testing"
|
|
33
|
+
Requires-Dist: urllib3; extra == "testing"
|
|
34
|
+
Requires-Dist: freezegun; extra == "testing"
|
|
35
|
+
|
|
36
|
+
# Qase Python Commons
|
|
37
|
+
|
|
38
|
+
[](https://pypi.org/project/qase-python-commons/)
|
|
39
|
+
[](https://pypi.org/project/qase-python-commons/)
|
|
40
|
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
41
|
+
|
|
42
|
+
Core library for all Qase Python reporters. Contains the complete configuration reference.
|
|
43
|
+
|
|
44
|
+
## Table of Contents
|
|
45
|
+
|
|
46
|
+
- [About](#about)
|
|
47
|
+
- [Installation](#installation)
|
|
48
|
+
- [Reporters](#reporters)
|
|
49
|
+
- [Configuration](#configuration)
|
|
50
|
+
- [Configuration Priority](#configuration-priority)
|
|
51
|
+
- [Reporter Modes](#reporter-modes)
|
|
52
|
+
- [Common Options](#common-options)
|
|
53
|
+
- [TestOps Options (Single Project)](#testops-options-single-project)
|
|
54
|
+
- [TestOps Multi Options (Multiple Projects)](#testops-multi-options-multiple-projects)
|
|
55
|
+
- [Local Report Options](#local-report-options)
|
|
56
|
+
- [Logging Options](#logging-options)
|
|
57
|
+
- [Framework-Specific Options](#framework-specific-options)
|
|
58
|
+
- [Configuration Examples](#configuration-examples)
|
|
59
|
+
- [Single Project (testops)](#single-project-testops)
|
|
60
|
+
- [Multiple Projects (testops_multi)](#multiple-projects-testops_multi)
|
|
61
|
+
- [Environment Variables](#environment-variables)
|
|
62
|
+
- [Profilers](#profilers)
|
|
63
|
+
- [Additional Features](#additional-features)
|
|
64
|
+
- [Status Mapping](#status-mapping)
|
|
65
|
+
- [Status Filtering](#status-filtering)
|
|
66
|
+
- [External Links](#external-links)
|
|
67
|
+
- [Test Run Configurations](#test-run-configurations)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## About
|
|
72
|
+
|
|
73
|
+
This module is an SDK for developing test reporters for Qase TMS. It uses `qase-api-client` as an API client, and all Qase Python reporters depend on this package.
|
|
74
|
+
|
|
75
|
+
**Use this library if:**
|
|
76
|
+
- You're developing a custom reporter for a specialized framework
|
|
77
|
+
- You need a complete configuration reference
|
|
78
|
+
|
|
79
|
+
**For testing, use the ready-made reporters** — see [Reporters](#reporters) section.
|
|
80
|
+
|
|
81
|
+
## Installation
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pip install qase-python-commons
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Reporters
|
|
88
|
+
|
|
89
|
+
For popular frameworks, use the ready-made reporters:
|
|
90
|
+
|
|
91
|
+
| Framework | Package | Documentation |
|
|
92
|
+
|-----------|---------|---------------|
|
|
93
|
+
| Pytest | `qase-pytest` | [README](https://github.com/qase-tms/qase-python/tree/main/qase-pytest#readme) |
|
|
94
|
+
| Behave | `qase-behave` | [README](https://github.com/qase-tms/qase-python/tree/main/qase-behave#readme) |
|
|
95
|
+
| Robot Framework | `qase-robotframework` | [README](https://github.com/qase-tms/qase-python/tree/main/qase-robotframework#readme) |
|
|
96
|
+
| Tavern | `qase-tavern` | [README](https://github.com/qase-tms/qase-python/tree/main/qase-tavern#readme) |
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Configuration
|
|
101
|
+
|
|
102
|
+
### Configuration Priority
|
|
103
|
+
|
|
104
|
+
Qase Python reporters support three configuration methods (in order of priority):
|
|
105
|
+
|
|
106
|
+
1. **CLI options** (pytest and tavern only) — highest priority
|
|
107
|
+
2. **Environment variables** (`QASE_*`)
|
|
108
|
+
3. **Config file** (`qase.config.json`) — lowest priority
|
|
109
|
+
|
|
110
|
+
### Reporter Modes
|
|
111
|
+
|
|
112
|
+
The reporter mode is set via the `mode` option:
|
|
113
|
+
|
|
114
|
+
| Mode | Description |
|
|
115
|
+
|------|-------------|
|
|
116
|
+
| `testops` | Send results to a single Qase project |
|
|
117
|
+
| `testops_multi` | Send results to multiple projects |
|
|
118
|
+
| `report` | Generate a local JSON report |
|
|
119
|
+
| `off` | Reporter disabled (default) |
|
|
120
|
+
|
|
121
|
+
### Common Options
|
|
122
|
+
|
|
123
|
+
| Description | Config file | Environment variable | Default | Required |
|
|
124
|
+
|-------------|-------------|---------------------|---------|----------|
|
|
125
|
+
| Reporter mode | `mode` | `QASE_MODE` | `off` | No |
|
|
126
|
+
| Fallback mode | `fallback` | `QASE_FALLBACK` | `off` | No |
|
|
127
|
+
| Environment | `environment` | `QASE_ENVIRONMENT` | — | No |
|
|
128
|
+
| Root suite | `rootSuite` | `QASE_ROOT_SUITE` | — | No |
|
|
129
|
+
| Debug mode | `debug` | `QASE_DEBUG` | `False` | No |
|
|
130
|
+
| Execution plan path | `executionPlan.path` | `QASE_EXECUTION_PLAN_PATH` | `./build/qase-execution-plan.json` | No |
|
|
131
|
+
| Exclude parameters | `excludeParams` | `QASE_EXCLUDE_PARAMS` | — | No |
|
|
132
|
+
| Status mapping | `statusMapping` | `QASE_STATUS_MAPPING` | — | No |
|
|
133
|
+
|
|
134
|
+
### TestOps Options (Single Project)
|
|
135
|
+
|
|
136
|
+
| Description | Config file | Environment variable | Default | Required |
|
|
137
|
+
|-------------|-------------|---------------------|---------|----------|
|
|
138
|
+
| API token | `testops.api.token` | `QASE_TESTOPS_API_TOKEN` | — | Yes* |
|
|
139
|
+
| API host | `testops.api.host` | `QASE_TESTOPS_API_HOST` | `qase.io` | No |
|
|
140
|
+
| Project code | `testops.project` | `QASE_TESTOPS_PROJECT` | — | Yes* |
|
|
141
|
+
| Test run ID | `testops.run.id` | `QASE_TESTOPS_RUN_ID` | — | No |
|
|
142
|
+
| Test run title | `testops.run.title` | `QASE_TESTOPS_RUN_TITLE` | `Automated run <date>` | No |
|
|
143
|
+
| Test run description | `testops.run.description` | `QASE_TESTOPS_RUN_DESCRIPTION` | `<Framework> automated run` | No |
|
|
144
|
+
| Complete test run | `testops.run.complete` | `QASE_TESTOPS_RUN_COMPLETE` | `True` | No |
|
|
145
|
+
| Test run tags | `testops.run.tags` | `QASE_TESTOPS_RUN_TAGS` | `[]` | No |
|
|
146
|
+
| External link | `testops.run.externalLink` | `QASE_TESTOPS_RUN_EXTERNAL_LINK` | — | No |
|
|
147
|
+
| Test plan ID | `testops.plan.id` | `QASE_TESTOPS_PLAN_ID` | — | No |
|
|
148
|
+
| Batch size | `testops.batch.size` | `QASE_TESTOPS_BATCH_SIZE` | `200` | No |
|
|
149
|
+
| Create defects | `testops.defect` | `QASE_TESTOPS_DEFECT` | `False` | No |
|
|
150
|
+
| Status filter | `testops.statusFilter` | `QASE_TESTOPS_STATUS_FILTER` | — | No |
|
|
151
|
+
| Configuration values | `testops.configurations.values` | `QASE_TESTOPS_CONFIGURATIONS_VALUES` | — | No |
|
|
152
|
+
| Create configurations | `testops.configurations.createIfNotExists` | `QASE_TESTOPS_CONFIGURATIONS_CREATE_IF_NOT_EXISTS` | `false` | No |
|
|
153
|
+
| Show public report link | `testops.showPublicReportLink` | `QASE_TESTOPS_SHOW_PUBLIC_REPORT_LINK` | `False` | No |
|
|
154
|
+
|
|
155
|
+
\* Required when using `testops` mode
|
|
156
|
+
|
|
157
|
+
### TestOps Multi Options (Multiple Projects)
|
|
158
|
+
|
|
159
|
+
| Description | Config file | Environment variable | Default | Required |
|
|
160
|
+
|-------------|-------------|---------------------|---------|----------|
|
|
161
|
+
| Default project | `testops_multi.default_project` | `QASE_TESTOPS_MULTI_DEFAULT_PROJECT` | — | No |
|
|
162
|
+
| Projects array | `testops_multi.projects` | — | `[]` | Yes** |
|
|
163
|
+
| Project code | `testops_multi.projects[].code` | — | — | Yes** |
|
|
164
|
+
| Test run title | `testops_multi.projects[].run.title` | — | `Automated Run <code> <date>` | No |
|
|
165
|
+
| Test run description | `testops_multi.projects[].run.description` | — | `Automated Run <code> <date>` | No |
|
|
166
|
+
| Complete test run | `testops_multi.projects[].run.complete` | — | `True` | No |
|
|
167
|
+
| Test run ID | `testops_multi.projects[].run.id` | — | — | No |
|
|
168
|
+
| Test run tags | `testops_multi.projects[].run.tags` | — | `[]` | No |
|
|
169
|
+
| External link | `testops_multi.projects[].run.externalLink` | — | — | No |
|
|
170
|
+
| Test plan ID | `testops_multi.projects[].plan.id` | — | — | No |
|
|
171
|
+
| Environment | `testops_multi.projects[].environment` | — | Global | No |
|
|
172
|
+
|
|
173
|
+
\** Required when using `testops_multi` mode
|
|
174
|
+
|
|
175
|
+
**Multi-project annotations:**
|
|
176
|
+
|
|
177
|
+
| Framework | Syntax |
|
|
178
|
+
|-----------|--------|
|
|
179
|
+
| Pytest | `@qase.project_id("CODE", 1, 2, 3)` |
|
|
180
|
+
| Behave | `@qase.project_id.CODE:1,2,3` |
|
|
181
|
+
| Robot Framework | `Q-PROJECT.CODE-1,2,3` |
|
|
182
|
+
| Tavern | `QaseProjectID.CODE=1,2,3` in test name |
|
|
183
|
+
|
|
184
|
+
See details: [Pytest](../qase-pytest/docs/MULTI_PROJECT.md) | [Behave](../qase-behave/docs/MULTI_PROJECT.md) | [Robot Framework](../qase-robotframework/docs/MULTI_PROJECT.md) | [Tavern](../qase-tavern/docs/MULTI_PROJECT.md)
|
|
185
|
+
|
|
186
|
+
### Local Report Options
|
|
187
|
+
|
|
188
|
+
| Description | Config file | Environment variable | Default |
|
|
189
|
+
|-------------|-------------|---------------------|---------|
|
|
190
|
+
| Driver | `report.driver` | `QASE_REPORT_DRIVER` | `local` |
|
|
191
|
+
| Report path | `report.connection.path` | `QASE_REPORT_CONNECTION_PATH` | `./build/qase-report` |
|
|
192
|
+
| Report format | `report.connection.format` | `QASE_REPORT_CONNECTION_FORMAT` | `json` |
|
|
193
|
+
|
|
194
|
+
### Logging Options
|
|
195
|
+
|
|
196
|
+
| Description | Config file | Environment variable | Default |
|
|
197
|
+
|-------------|-------------|---------------------|---------|
|
|
198
|
+
| Console output | `logging.console` | `QASE_LOGGING_CONSOLE` | `True` |
|
|
199
|
+
| File output | `logging.file` | `QASE_LOGGING_FILE` | Same as `debug` |
|
|
200
|
+
|
|
201
|
+
### Framework-Specific Options
|
|
202
|
+
|
|
203
|
+
#### Pytest
|
|
204
|
+
|
|
205
|
+
| Description | Config file | Environment variable | CLI | Default |
|
|
206
|
+
|-------------|-------------|---------------------|-----|---------|
|
|
207
|
+
| Capture logs | `framework.pytest.captureLogs` | `QASE_PYTEST_CAPTURE_LOGS` | `--qase-pytest-capture-logs` | `False` |
|
|
208
|
+
| XFail status (failed) | `framework.pytest.xfailStatus.xfail` | `QASE_PYTEST_XFAIL_STATUS_XFAIL` | `--qase-pytest-xfail-status-xfail` | `Skipped` |
|
|
209
|
+
| XFail status (passed) | `framework.pytest.xfailStatus.xpass` | `QASE_PYTEST_XFAIL_STATUS_XPASS` | `--qase-pytest-xfail-status-xpass` | `Passed` |
|
|
210
|
+
|
|
211
|
+
#### Behave, Robot Framework, Tavern
|
|
212
|
+
|
|
213
|
+
These frameworks use only the common configuration options.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Configuration Examples
|
|
218
|
+
|
|
219
|
+
### Single Project (testops)
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
{
|
|
223
|
+
"mode": "testops",
|
|
224
|
+
"fallback": "report",
|
|
225
|
+
"debug": false,
|
|
226
|
+
"environment": "local",
|
|
227
|
+
"testops": {
|
|
228
|
+
"api": {
|
|
229
|
+
"token": "<token>",
|
|
230
|
+
"host": "qase.io"
|
|
231
|
+
},
|
|
232
|
+
"project": "DEMO",
|
|
233
|
+
"run": {
|
|
234
|
+
"title": "Regress run",
|
|
235
|
+
"description": "Automated regression tests",
|
|
236
|
+
"complete": true,
|
|
237
|
+
"tags": ["regression", "automated"]
|
|
238
|
+
},
|
|
239
|
+
"batch": {
|
|
240
|
+
"size": 100
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Multiple Projects (testops_multi)
|
|
247
|
+
|
|
248
|
+
```json
|
|
249
|
+
{
|
|
250
|
+
"mode": "testops_multi",
|
|
251
|
+
"fallback": "report",
|
|
252
|
+
"testops": {
|
|
253
|
+
"api": {
|
|
254
|
+
"token": "<token>",
|
|
255
|
+
"host": "qase.io"
|
|
256
|
+
},
|
|
257
|
+
"batch": {
|
|
258
|
+
"size": 100
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"testops_multi": {
|
|
262
|
+
"default_project": "DEMO1",
|
|
263
|
+
"projects": [
|
|
264
|
+
{
|
|
265
|
+
"code": "DEMO1",
|
|
266
|
+
"run": {
|
|
267
|
+
"title": "DEMO1 Test Run",
|
|
268
|
+
"tags": ["staging"]
|
|
269
|
+
},
|
|
270
|
+
"environment": "staging"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"code": "DEMO2",
|
|
274
|
+
"run": {
|
|
275
|
+
"title": "DEMO2 Test Run",
|
|
276
|
+
"tags": ["production"]
|
|
277
|
+
},
|
|
278
|
+
"environment": "production"
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Environment Variables
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
# Common settings
|
|
289
|
+
export QASE_MODE="testops"
|
|
290
|
+
export QASE_FALLBACK="report"
|
|
291
|
+
export QASE_ENVIRONMENT="local"
|
|
292
|
+
export QASE_DEBUG="false"
|
|
293
|
+
|
|
294
|
+
# TestOps
|
|
295
|
+
export QASE_TESTOPS_API_TOKEN="<token>"
|
|
296
|
+
export QASE_TESTOPS_PROJECT="DEMO"
|
|
297
|
+
export QASE_TESTOPS_RUN_TITLE="Automated Run"
|
|
298
|
+
export QASE_TESTOPS_RUN_COMPLETE="true"
|
|
299
|
+
|
|
300
|
+
# Pytest
|
|
301
|
+
export QASE_PYTEST_CAPTURE_LOGS="true"
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Profilers
|
|
307
|
+
|
|
308
|
+
Profilers automatically track operations during test execution and send them as steps to Qase TestOps.
|
|
309
|
+
|
|
310
|
+
| Profiler | Description | Documentation |
|
|
311
|
+
|----------|-------------|---------------|
|
|
312
|
+
| `network` | Tracks HTTP requests (requests, urllib3) | [Network Profiler](docs/NETWORK_PROFILER.md) |
|
|
313
|
+
| `db` | Tracks database operations | [Database Profiler](docs/DATABASE_PROFILERS.md) |
|
|
314
|
+
| `sleep` | Tracks sleep calls | — |
|
|
315
|
+
|
|
316
|
+
Enable profilers in `qase.config.json`:
|
|
317
|
+
|
|
318
|
+
```json
|
|
319
|
+
{
|
|
320
|
+
"profilers": ["network", "db"]
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Or via environment variable:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
export QASE_PROFILERS="network,db"
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
The `profilers` array supports both string and object formats. Use the object format to configure profiler-specific options:
|
|
331
|
+
|
|
332
|
+
```json
|
|
333
|
+
{
|
|
334
|
+
"profilers": [
|
|
335
|
+
{
|
|
336
|
+
"name": "network",
|
|
337
|
+
"excludeHosts": ["telemetry.local", "monitoring.internal"]
|
|
338
|
+
},
|
|
339
|
+
"db"
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Additional Features
|
|
347
|
+
|
|
348
|
+
### Status Mapping
|
|
349
|
+
|
|
350
|
+
Allows changing test result status before sending to Qase:
|
|
351
|
+
|
|
352
|
+
```json
|
|
353
|
+
{
|
|
354
|
+
"statusMapping": {
|
|
355
|
+
"invalid": "failed",
|
|
356
|
+
"skipped": "passed"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
**Available statuses:** `passed`, `failed`, `skipped`, `invalid`
|
|
362
|
+
|
|
363
|
+
### Status Filtering
|
|
364
|
+
|
|
365
|
+
Excludes results with specified statuses from being sent:
|
|
366
|
+
|
|
367
|
+
```json
|
|
368
|
+
{
|
|
369
|
+
"testops": {
|
|
370
|
+
"statusFilter": ["passed", "skipped"]
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### External Links
|
|
376
|
+
|
|
377
|
+
Associates the test run with external resources (e.g., Jira):
|
|
378
|
+
|
|
379
|
+
```json
|
|
380
|
+
{
|
|
381
|
+
"testops": {
|
|
382
|
+
"run": {
|
|
383
|
+
"externalLink": {
|
|
384
|
+
"type": "jiraCloud",
|
|
385
|
+
"link": "PROJ-123"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**Types:** `jiraCloud`, `jiraServer`
|
|
393
|
+
|
|
394
|
+
### Test Run Configurations
|
|
395
|
+
|
|
396
|
+
Creates or finds configurations in Qase TestOps:
|
|
397
|
+
|
|
398
|
+
```json
|
|
399
|
+
{
|
|
400
|
+
"testops": {
|
|
401
|
+
"configurations": {
|
|
402
|
+
"values": [
|
|
403
|
+
{ "name": "browser", "value": "chrome" },
|
|
404
|
+
{ "name": "os", "value": "linux" }
|
|
405
|
+
],
|
|
406
|
+
"createIfNotExists": true
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Requirements
|
|
415
|
+
|
|
416
|
+
- Python 3.9+
|
|
417
|
+
- qase-api-client
|
|
418
|
+
|
|
419
|
+
## License
|
|
420
|
+
|
|
421
|
+
Apache 2.0 — see [LICENSE](../LICENSE)
|