Qatouch integration with pytest

Avatar of Mohamed Raslan.
Avatar of Mohamed Raslan.

Qatouch integration with pytest

Software Test Automation Engineer Acting as Testing Team Lead at Atomica AI
Cairo, Cairo Governorate, Egypt
 

Pytest plugin for uploading test results to your QAtouch Testrun.

pytest-qatouch

Pytest plugin for uploading test results to your QA Touch Testrun.

Features

  • It will only upload the test results to the specified testrun in your Qatouch portal

Installation

You can install "pytest-qatouch" via pip from PyPI::

pip install pytest-qatouch

Usage

from pytest_qatouch import qatouch


@qatouch.TR(10)
def test_for_testcase_number0010():
    assert True

@qatouch.TR(9)
def test_for_testcase_number0009():
    assert False

If you want to use it with parameterized tests , you can do as the example below.

import pytest
from pytest_qatouch import qatouch

@pytest.mark.parametrize(
    "num1,num2",
    [
        (9, 8),
        pytest.param(8, 10, marks=qatouch.TR(2)),
        pytest.param(0, 10, marks=qatouch.TR(10)),
        pytest.param(1, 4, marks=qatouch.TR(9)),
    ],
)
def test_sum_greater_than10(num1, num2):
    assert num1+num2 >= 10

Configuration

You can use a config file or pass it to pytest as command line options.


Config file

pytest.ini or setup.cfg pytest configuration

[pytest]
qatouch (string):                        Enable the qatouch plugin (Set it to 'True' to enable it)
qatouch-subdomain (string):              Your qatouch submodule name (i.e <your_subdomain>.qatouch.com)
qatouch-api-token (string):              Your qatouch API token
qatouch-project-key (string):            The qatouch project key
qatouch-testrun-key (string):            The testrun key in qatouch project


Command line options

--qatouch                        Enable the qatouch plugin (Set it to 'True' to enable it)
--qatouch-subdomain              Your qatouch submodule name (i.e <your_subdomain>.qatouch.com)
--qatouch-api-token              Your qatouch API token
--qatouch-project-key            The qatouch project key
--qatouch-testrun-key            The testrun key in qatouch project

User guide

For further documentation, see wiki and check this video:

It is a pytest plugin for uploading test results to your QAtouch Testrun.
Avatar of the user.
Please login to comment.

Published: Dec 5th 2023
34
6
0

Tools

python
Python
github
GitHub

python
QATouch
TestCaseManagment
Testing
Pytest

Share