{"library":"pytest-testrail","title":"pytest-testrail","description":"A pytest plugin for creating TestRail test runs and adding results automatically. Version 3.1.1 requires Python >=3.10, released under MIT License. Active development with frequent releases.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install pytest-testrail"],"cli":null},"imports":["import pytest_testrail","from pytest_testrail.fixtures import get_testrail_client"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# conftest.py or test file\nimport os\nimport pytest\n\n# Enable plugin via pytest.ini or pyproject.toml\n# [pytest]\n# testrail = \n#   url = https://your.testrail.com\n#   user = your_email\n#   password = your_password_or_api_key\n#   project_id = 1\n#   suite_id = 1\n#   run_name = Automated Run\n\n# Test case must have testrail id marker\n@pytest.mark.testrail(id='C123')\ndef test_example():\n    assert 1 + 1 == 2\n\n# Or use dynamic assignment\nfrom pytest_testrail.plugin import TestRail\n\n# Optionally get client\nfrom pytest_testrail.fixtures import get_testrail_client\n\ndef test_custom(client=get_testrail_client()):\n    # Use client directly if needed\n    assert client\n    assert True","lang":"python","description":"Minimal setup: add marker @pytest.mark.testrail(id='C123') to tests, configure pytest.ini with TestRail credentials, and run pytest.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}