A PyTest plugin that provides seamless integration with QMetry Test Management Platform.
- Automatically uploads test results to QMetry
- Generates test cycles and updates test case statuses seamlessly
- Supports JUnit XML reports for Automation API
- Supports Cucumber JSON reports for Automation API
pip install qmetry-pytest
You'll need to create a qmetry.properties file in your project root.
qmetry.enabled=true
qmetry.url=<your_qmetry_url>
qmetry.authorization=<your_authorization>
qmetry.automation.enabled=true
qmetry.automation.apikey=<your_api_key>
qmetry.automation.resultfile=<your_report_path/filename.xml/json>
qmetry.automation.payload.format=<junit/cucumber>
qmetry.automation.payload.attachFile=true
qmetry.automation.payload.isZip=false
qmetry.automation.payload.environment=<env_label>
qmetry.automation.payload.build=<build_no>
qmetry.automation.payload.fields.testCycle.labels=<label>
qmetry.automation.payload.fields.testCycle.status=Done
qmetry.automation.payload.fields.testCycle.summary=<test_cycle_summary>
qmetry.automation.payload.fields.testCycle.customFields=<Environment:DEV>
qmetry.automation.payload.fields.testCase.labels=<label>
qmetry.automation.payload.fields.testCase.status=Done
import pytest
def test_example():
assert True
@pytest.mark.qid("TC-124")
def test_another_example():
assert 1 + 1 == 2
pytest --qmetry
Note: Skip this section if you are using the Cucumber framework
pytest --qmetry --junitxml=report/results.xml
- No markers are required for the automation flow.
- Ensure secure authentication and keep the configuration updated in
qmetry.properties. - Remember to include
--qmetryas a command-line argument during test execution.
