Skip to main content

A PyTest plugin that provides seamless integration with QMetry Test Management Platform.

Project description

PyPI version codecov PyPI Downloads

qmetry-pytest

A PyTest plugin that provides seamless integration with QMetry Test Management Platform.

qmetry

Features

  • 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

Installation

pip install qmetry-pytest

Configuration

You'll need to create a qmetry.properties file in your project root.

Default and Mandatory Properties:

qmetry.enabled=true
qmetry.url=<your_qmetry_url>
qmetry.authorization=<your_authorization>

Automation API

Mandatory Properties:

qmetry.automation.enabled=true
qmetry.automation.apikey=<your_api_key>
qmetry.automation.resultfile=<your_report_path/filename.xml/json>

Optional Properties:

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

Test Example

import pytest

def test_example():
    assert True

@pytest.mark.qid("TC-124")
def test_another_example():
    assert 1 + 1 == 2

Test Execution

pytest --qmetry

To generate XML report before upload

Note: Skip this section if you are using the Cucumber framework

pytest --qmetry --junitxml=report/results.xml

Best Practices

  • No markers are required for the automation flow.
  • Ensure secure authentication and keep the configuration updated in qmetry.properties.
  • Remember to include --qmetry as a command-line argument during test execution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qmetry-pytest-1.0.2.tar.gz (6.5 kB view details)

Uploaded Source

File details

Details for the file qmetry-pytest-1.0.2.tar.gz.

File metadata

  • Download URL: qmetry-pytest-1.0.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for qmetry-pytest-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ba89d2eba6421cc906b1118ee59080827652dc6f9ffb6f7d7fc0f51dfdc404cd
MD5 db44cdaf9a2437aff398ca8751309201
BLAKE2b-256 71a6d1238638fcdd6f76c0cdbd32505c1dca12bef848d64e160120f6cd8c45ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page