Qase TMS Pytest Plugin
Project description
Qase TMS Pytest Plugin
Installation
pip install qase-pytest
Usage
Configuration
Configuration could be provided both by pytest.ini
/tox.ini
params
and using command-line arguments:
- Command-line args:
--qase Use Qase TMS
--qase-api-token=QS_API_TOKEN
Api token for Qase TMS
--qase-project=QS_PROJECT_CODE
Project code in Qase TMS
--qase-testrun=QS_TESTRUN_ID
Testrun ID in Qase TMS
--qase-new-run Create new testrun, if no testrun id provided
--qase-debug Prints additional output of plugin
- INI file parameters:
qs_enabled (bool): default value for --qase
qs_api_token (string):
default value for --qase-api-token
qs_project_code (string):
default value for --qase-project
qs_testrun_id (string):
default value for --qase-testrun
qs_new_run (bool): default value for --qase-new-run
qs_debug (bool): default value for --qase-debug
Link tests with test-cases
To link tests with test-cases in Qase TMS you should use predefined decorator:
from qaseio.pytest import qase
@qase.id(13)
def test_example_1():
pass
@qase.id(12, 156)
def test_example_2():
pass
You could pass as much IDs as you need.
Sending tests to existing testrun
Testrun in TMS will contain only those test results, which are presented in testrun, but every test would be executed.
pytest \
--qase \
--qase-api-token=<your api token here> \
--qase-project=PRJCODE \ # project, where your testrun exists in
--qase-testrun=3 # testrun id
Creating new testrun according to current pytest run
Testrun in TMS will contain only those test results, which has correct case ids, but every test would be executed.
pytest \
--qase \
--qase-api-token=<your api token here> \
--qase-project=PRJCODE \ # project, where your testrun would be created
--qase-new-run
Debug information
If you specify --qase-debug
parameter you would get additional output:
=================================== Qase TMS ===================================
This tests does not have test case ids:
test_no_deco
For test test_complex_run.py::test_multiple_ids_fail could not find test cases in run: 3
=========================== Qase TMS setup finished ============================
Execution logic
- Check project exists
- Check testrun exists
- Load all ids for each test-case
- Check which tests does not have ids (debug: will list them all)
- Check every id exists in project (debug: will show which missing)
- Check every id present in testrun (debug: will show which missing)
- Execute tests and publish results in a runtime, not waiting all run to finish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
qase-pytest-1.1.0b2.tar.gz
(16.3 kB
view hashes)
Built Distribution
Close
Hashes for qase_pytest-1.1.0b2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46cc0c1244a9d8b0759ddc288255cac418e7355db43f8010ca6a2d86c67fee0a |
|
MD5 | dcc5c3cb925a19540157eed8d52e8c28 |
|
BLAKE2b-256 | 124e58683179844bc60aa7ddb8d4fdcce18f0177afcfe7a36e97173f8b734831 |