{"library":"pytest-pytestrail","title":"Pytest TestRail Plugin","description":"pytest-pytestrail is a Pytest plugin designed to facilitate interaction with TestRail, a web-based test case management tool. It allows users to automatically update TestRail test results directly from their Pytest runs. The current version is 0.10.5, and it typically sees minor updates for compatibility and feature enhancements.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install pytest-pytestrail"],"cli":null},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# pytest.ini\n[pytest]\naddopts = --testrail\ntr-url = https://your.testrail.net/\ntr-email = your_email@example.com\ntr-password = ${TR_PASSWORD}\ntr-project-name = My Project\ntr-testrun-name = Automated Test Run\n\n# test_example.py\nimport pytest\nimport os\n\n# For quickstart, ensure TR_PASSWORD is set in environment, e.g., via export TR_PASSWORD='...' \n# Or replace ${TR_PASSWORD} with actual password for local testing only (NOT recommended for production)\n\n@pytest.mark.testrail('C1234')\ndef test_feature_a_works():\n    assert True\n\n@pytest.mark.testrail('C5678')\ndef test_feature_b_fails():\n    assert False # This will be reported as failed in TestRail\n","lang":"python","description":"First, create a `pytest.ini` file in your project root to configure TestRail connection details and enable the plugin. Use environment variables for sensitive data like passwords. Then, mark your Pytest tests with `@pytest.mark.testrail()` providing the corresponding TestRail case IDs. Run pytest from the command line.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}