pytest-testrail


Namepytest-testrail JSON
Version 2.9.0 PyPI version JSON
download
home_pagehttp://github.com/allankp/pytest-testrail/
Summarypytest plugin for creating TestRail runs and adding results
upload_time2020-08-27 10:50:01
maintainer
docs_urlNone
authorAllan Kilpatrick
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pytest-testrail
===============

|Build Status| |PyPI version|

This is a pytest plugin for creating/editing testplans or testruns based
on pytest markers. The results of the collected tests will be updated
against the testplan/testrun in TestRail.

Installation
------------

::

   pip install pytest-testrail

Configuration
-------------

Config for Pytest tests
~~~~~~~~~~~~~~~~~~~~~~~

Add a marker to the tests that will be picked up to be added to the run.

.. code:: python

   from pytest_testrail.plugin import testrail

   @testrail('C1234', 'C5678')
   def test_foo():
       # test code goes here

   # OR    

   from pytest_testrail.plugin import pytestrail

   @pytestrail.case('C1234', 'C5678')
   def test_bar():
       # test code goes here

See a `more detailed example here <tests/livetest/livetest.py>`__.

Config for TestRail
~~~~~~~~~~~~~~~~~~~

-  Settings file template config:

.. code:: ini

   [API]
   url = https://yoururl.testrail.net/
   email = user@email.com
   password = <api_key>

   [TESTRUN]
   assignedto_id = 1
   project_id = 2
   suite_id = 3

Or

-  Set command line options (see below)

Usage
-----

Basically, the following command will create a testrun in TestRail, add
all marked tests to run. Once the all tests are finished they will be
updated in TestRail:

.. code:: bash

   py.test --testrail --tr-config=<settings file>.cfg

All available options
~~~~~~~~~~~~~~~~~~~~~

::

     --testrail            Create and update testruns with TestRail
     --tr-config=TR_CONFIG
                           Path to the config file containing information about
                           the TestRail server (defaults to testrail.cfg)
     --tr-url=TR_URL       TestRail address you use to access TestRail with your
                           web browser (config file: url in API section)
     --tr-email=TR_EMAIL   Email for the account on the TestRail server (config
                           file: email in API section)
     --tr-password=TR_PASSWORD
                           Password for the account on the TestRail server
                           (config file: password in API section)
     --tr-testrun-assignedto-id=TR_TESTRUN_ASSIGNEDTO_ID
                           ID of the user assigned to the test run (config file:
                           assignedto_id in TESTRUN section)
     --tr-testrun-project-id=TR_TESTRUN_PROJECT_ID
                           ID of the project the test run is in (config file:
                           project_id in TESTRUN section)
     --tr-testrun-suite-id=TR_TESTRUN_SUITE_ID
                           ID of the test suite containing the test cases (config
                           file: suite_id in TESTRUN section)
     --tr-testrun-suite-include-all
                           Include all test cases in specified test suite when
                           creating test run (config file: include_all in TESTRUN
                           section)
     --tr-testrun-name=TR_TESTRUN_NAME
                           Name given to testrun, that appears in TestRail
                           (config file: name in TESTRUN section)
     --tr-run-id=TR_RUN_ID
                           Identifier of testrun, that appears in TestRail. If
                           provided, option "--tr-testrun-name" will be ignored
     --tr-plan-id=TR_PLAN_ID
                           Identifier of testplan, that appears in TestRail. If
                           provided, option "--tr-testrun-name" will be ignored
     --tr-version=TR_VERSION
                           Indicate a version in Test Case result.
     --tr-no-ssl-cert-check
                           Do not check for valid SSL certificate on TestRail
                           host
     --tr-close-on-complete
                           Close a test plan or test run on completion.
     --tr-dont-publish-blocked
                           Do not publish results of "blocked" testcases in
                           TestRail
     --tr-skip-missing     Skip test cases that are not present in testrun

.. |Build Status| image:: https://travis-ci.org/allankp/pytest-testrail.svg?branch=master
   :target: https://travis-ci.org/allankp/pytest-testrail
.. |PyPI version| image:: https://badge.fury.io/py/pytest-testrail.svg
   :target: https://badge.fury.io/py/pytest-testrail



            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/allankp/pytest-testrail/",
    "name": "pytest-testrail",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Allan Kilpatrick",
    "author_email": "allanklp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/71/49/71c6bdd8ad3e2fa5443d455c4c1e236d29c439bb97c4833ecd223299e094/pytest-testrail-2.9.0.tar.gz",
    "platform": "",
    "description": "pytest-testrail\n===============\n\n|Build Status| |PyPI version|\n\nThis is a pytest plugin for creating/editing testplans or testruns based\non pytest markers. The results of the collected tests will be updated\nagainst the testplan/testrun in TestRail.\n\nInstallation\n------------\n\n::\n\n   pip install pytest-testrail\n\nConfiguration\n-------------\n\nConfig for Pytest tests\n~~~~~~~~~~~~~~~~~~~~~~~\n\nAdd a marker to the tests that will be picked up to be added to the run.\n\n.. code:: python\n\n   from pytest_testrail.plugin import testrail\n\n   @testrail('C1234', 'C5678')\n   def test_foo():\n       # test code goes here\n\n   # OR    \n\n   from pytest_testrail.plugin import pytestrail\n\n   @pytestrail.case('C1234', 'C5678')\n   def test_bar():\n       # test code goes here\n\nSee a `more detailed example here <tests/livetest/livetest.py>`__.\n\nConfig for TestRail\n~~~~~~~~~~~~~~~~~~~\n\n-  Settings file template config:\n\n.. code:: ini\n\n   [API]\n   url = https://yoururl.testrail.net/\n   email = user@email.com\n   password = <api_key>\n\n   [TESTRUN]\n   assignedto_id = 1\n   project_id = 2\n   suite_id = 3\n\nOr\n\n-  Set command line options (see below)\n\nUsage\n-----\n\nBasically, the following command will create a testrun in TestRail, add\nall marked tests to run. Once the all tests are finished they will be\nupdated in TestRail:\n\n.. code:: bash\n\n   py.test --testrail --tr-config=<settings file>.cfg\n\nAll available options\n~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n     --testrail            Create and update testruns with TestRail\n     --tr-config=TR_CONFIG\n                           Path to the config file containing information about\n                           the TestRail server (defaults to testrail.cfg)\n     --tr-url=TR_URL       TestRail address you use to access TestRail with your\n                           web browser (config file: url in API section)\n     --tr-email=TR_EMAIL   Email for the account on the TestRail server (config\n                           file: email in API section)\n     --tr-password=TR_PASSWORD\n                           Password for the account on the TestRail server\n                           (config file: password in API section)\n     --tr-testrun-assignedto-id=TR_TESTRUN_ASSIGNEDTO_ID\n                           ID of the user assigned to the test run (config file:\n                           assignedto_id in TESTRUN section)\n     --tr-testrun-project-id=TR_TESTRUN_PROJECT_ID\n                           ID of the project the test run is in (config file:\n                           project_id in TESTRUN section)\n     --tr-testrun-suite-id=TR_TESTRUN_SUITE_ID\n                           ID of the test suite containing the test cases (config\n                           file: suite_id in TESTRUN section)\n     --tr-testrun-suite-include-all\n                           Include all test cases in specified test suite when\n                           creating test run (config file: include_all in TESTRUN\n                           section)\n     --tr-testrun-name=TR_TESTRUN_NAME\n                           Name given to testrun, that appears in TestRail\n                           (config file: name in TESTRUN section)\n     --tr-run-id=TR_RUN_ID\n                           Identifier of testrun, that appears in TestRail. If\n                           provided, option \"--tr-testrun-name\" will be ignored\n     --tr-plan-id=TR_PLAN_ID\n                           Identifier of testplan, that appears in TestRail. If\n                           provided, option \"--tr-testrun-name\" will be ignored\n     --tr-version=TR_VERSION\n                           Indicate a version in Test Case result.\n     --tr-no-ssl-cert-check\n                           Do not check for valid SSL certificate on TestRail\n                           host\n     --tr-close-on-complete\n                           Close a test plan or test run on completion.\n     --tr-dont-publish-blocked\n                           Do not publish results of \"blocked\" testcases in\n                           TestRail\n     --tr-skip-missing     Skip test cases that are not present in testrun\n\n.. |Build Status| image:: https://travis-ci.org/allankp/pytest-testrail.svg?branch=master\n   :target: https://travis-ci.org/allankp/pytest-testrail\n.. |PyPI version| image:: https://badge.fury.io/py/pytest-testrail.svg\n   :target: https://badge.fury.io/py/pytest-testrail\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "pytest plugin for creating TestRail runs and adding results",
    "version": "2.9.0",
    "project_urls": {
        "Homepage": "http://github.com/allankp/pytest-testrail/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a2ec745de2502865c64ec1151ccdd5d1d2ec05d9e6b02a6c7bdea7c27115160c",
                "md5": "9f3a95befa29b128f7e57f54e3998535",
                "sha256": "adb09cee6739697b4e60d471aabecc11e827748cd3f0dae0cbf325ee36ba0104"
            },
            "downloads": -1,
            "filename": "pytest_testrail-2.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9f3a95befa29b128f7e57f54e3998535",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12188,
            "upload_time": "2020-08-27T10:50:00",
            "upload_time_iso_8601": "2020-08-27T10:50:00.303054Z",
            "url": "https://files.pythonhosted.org/packages/a2/ec/745de2502865c64ec1151ccdd5d1d2ec05d9e6b02a6c7bdea7c27115160c/pytest_testrail-2.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "714971c6bdd8ad3e2fa5443d455c4c1e236d29c439bb97c4833ecd223299e094",
                "md5": "8f4ec523c3c3afc4d01857fdb52d3435",
                "sha256": "258f7793a9bf502deb48724981dba9cb39ecc1639f4d26fc8bab5799a58cfe33"
            },
            "downloads": -1,
            "filename": "pytest-testrail-2.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8f4ec523c3c3afc4d01857fdb52d3435",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11078,
            "upload_time": "2020-08-27T10:50:01",
            "upload_time_iso_8601": "2020-08-27T10:50:01.724814Z",
            "url": "https://files.pythonhosted.org/packages/71/49/71c6bdd8ad3e2fa5443d455c4c1e236d29c439bb97c4833ecd223299e094/pytest-testrail-2.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-08-27 10:50:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "allankp",
    "github_project": "pytest-testrail",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pytest-testrail"
}
        
Elapsed time: 1.57257s