{"id":46593,"library":"testit-adapter-pytest","title":"Test IT Adapter for pytest","description":"A pytest plugin that integrates with Test IT TMS, allowing automatic test result uploads, parameterized tests, and test work item linking. Current version 4.2.5, actively maintained.","status":"active","version":"4.2.5.post570","language":"python","source_language":"en","source_url":"https://github.com/testit-tms/adapters-python/","tags":["testit","pytest","adapter","test management"],"install":[{"cmd":"pip install testit-adapter-pytest","lang":"bash","label":"PyPI installation"}],"dependencies":[{"reason":"Core testing framework required","package":"pytest","optional":false},{"reason":"HTTP communication with Test IT API","package":"requests","optional":false}],"imports":[{"wrong":"from testit_adapter_pytest.config import Configuration","symbol":"Configuration","correct":"from testit_adapter_pytest import Configuration"}],"quickstart":{"code":"import pytest\nimport os\n\n# Configure adapter via environment variables or conftest.py\nos.environ['TESTIT_URL'] = 'https://your-instance.testit.software'\nos.environ['TESTIT_PRIVATE_TOKEN'] = 'your_api_token'\nos.environ['TESTIT_PROJECT_ID'] = 'project_id'\nos.environ['TESTIT_ADAPTER_MODE'] = 'adapter'\n\n# Optional: link test to a work item\n@pytest.mark.testit(external_id='test-case-1')\ndef test_example():\n    assert 1 + 1 == 2\n\n# Run tests: pytest --testit\n","lang":"python","description":"Basic test with Test IT adapter, linking test case via external ID. Run with `pytest --testit`."},"warnings":[{"fix":"Replace `@pytest.mark.testit_case('id')` with `@pytest.mark.testit(external_id='id')`.","message":"In v4.x, the pytest marker changed from `@pytest.mark.testit_case` to `@pytest.mark.testit`. Existing tests must be updated.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Rename `TESTIT_TOKEN` to `TESTIT_PRIVATE_TOKEN`.","message":"The `TESTIT_PRIVATE_TOKEN` environment variable is now required instead of `TESTIT_TOKEN`. The old variable name is ignored in v4.x.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Set environment variable before test discovery: `export TESTIT_ADAPTER_MODE=adapter`.","message":"Adapter mode must be set via `TESTIT_ADAPTER_MODE=adapter` (or other modes) before importing tests. Unset mode causes connection errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'4.2.5':29 'activ':30 'adapt':3,34 'allow':15 'automat':16 'current':27 'integr':10 'item':25 'link':26 'maintain':31 'manag':36 'parameter':20 'plugin':8 'pytest':5,7,33 'result':18 'test':1,12,17,21,23,35 'testit':32 'tms':14 'upload':19 'version':28 'work':24","created_at":"2026-06-07T13:00:40.924751+00:00","updated_at":"2026-06-07T13:00:40.924751+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'Configuration' from 'testit_adapter_pytest' (/tmp/tmp1h_ffr4c/venv/lib/python3.12/site-packages/testit_adapter_pytest/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/testit-tms/adapters-python/","github":"https://github.com/testit-tms/adapters-python/","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}