# pytest-initry
Plugin for sending automation test data from Pytest to the [initry](https://github.com/initry/initry).
### Install and setup:
1. Install:
```
pip install pytest-initry
```
2. Configure pytest.ini:
```ini
[pytest]
initry_host = localhost
initry_port = 8000
initry_grpc_port = 50051
initry_batching = False
initry_junit_xml_only = False
```
3. CLI can also be used, but it's not the preferred method. The arguments will be the same as those mentioned for the pytest.ini config file.
```bash
pytest --initry-host=localhost --initry-batching=True
```
### Arguments:
#### initry_host
Initry API Backend hostname. Use the same value as `INITRY_API_HOST` for backend .env and `NEXT_PUBLIC_INITRY_API_HOST` for frontend .env.
Example: `localhost`, `192.168.1.2`, etc.
<br><br>
#### initry_port
Initry API Backend port. Use the same value as `INITRY_API_EXTERNAL_PORT` for backend .env and `NEXT_PUBLIC_INITRY_API_EXTERNAL_PORT` for frontend .env.
Example: 8000, etc.
<br><br>
#### initry_grpc_port
Initry gRPC Backend port. Use the same value as `INITRY_GRPC_EXTERNAL_PORT` for backend .env.
Example: 50051, etc.
<br><br>
#### initry_batching
Batching mode: Use only if you have thousands of very fast unit tests. Data from the plugin to the Initry backend will be sent in batches.
Will not work with `initry_junit_xml_only`
Example: True, False.
<br><br>
#### initry_junit_xml_only
Real-time mode will be disabled, only the Pytest XML JUnit report will be sent at the end of the test run.
Will not work with `initry_batching`
Use together with pytest argument `--junitxml=your_xml_file.name.xml`
Example: True, False.
<br><br>
### Examples:
`pytest`: Pytest will be executed in real-time mode.
`pytest` *(with initry_batching=True)*: Pytest will be executed in real-time mode, but data will be sent to the server in batches to reduce network overhead. Real-time data will only display task finalized statuses without the 'running' state.
`pytest --junitxml=test.xml`: Pytest will be executed in real-time mode, and additional information will be collected from the generated JUnit XML file after the test run finalization.
`pytest --junitxml=test.xml` *(with initry_junit_xml_only=True)*: Pytest will be executed without providing real-time data, and information will be gathered after the test run ends using the generated JUnit XML file.
### License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/initry/pytest-initry",
"name": "pytest-initry",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": "pytest, initry",
"author": "Andrejs Smirnovs",
"author_email": "and.inbx@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/91/c5/2b323a329b687350480856842899f56e03bc987951a7b2ccbbb4b7d09ba0/pytest_initry-0.4.0.tar.gz",
"platform": null,
"description": "# pytest-initry\n\nPlugin for sending automation test data from Pytest to the [initry](https://github.com/initry/initry).\n\n### Install and setup:\n\n1. Install:\n ```\n pip install pytest-initry\n ```\n2. Configure pytest.ini:\n ```ini\n [pytest]\n initry_host = localhost\n initry_port = 8000\n initry_grpc_port = 50051\n initry_batching = False\n initry_junit_xml_only = False\n ```\n3. CLI can also be used, but it's not the preferred method. The arguments will be the same as those mentioned for the pytest.ini config file.\n ```bash\n pytest --initry-host=localhost --initry-batching=True\n ```\n \n### Arguments:\n#### initry_host\nInitry API Backend hostname. Use the same value as `INITRY_API_HOST` for backend .env and `NEXT_PUBLIC_INITRY_API_HOST` for frontend .env.\n\nExample: `localhost`, `192.168.1.2`, etc.\n<br><br>\n\n#### initry_port\nInitry API Backend port. Use the same value as `INITRY_API_EXTERNAL_PORT` for backend .env and `NEXT_PUBLIC_INITRY_API_EXTERNAL_PORT` for frontend .env.\n\nExample: 8000, etc.\n<br><br>\n\n#### initry_grpc_port\nInitry gRPC Backend port. Use the same value as `INITRY_GRPC_EXTERNAL_PORT` for backend .env.\n\nExample: 50051, etc.\n<br><br>\n\n#### initry_batching\nBatching mode: Use only if you have thousands of very fast unit tests. Data from the plugin to the Initry backend will be sent in batches.\n\nWill not work with `initry_junit_xml_only`\n\nExample: True, False.\n<br><br>\n\n#### initry_junit_xml_only\nReal-time mode will be disabled, only the Pytest XML JUnit report will be sent at the end of the test run.\n\nWill not work with `initry_batching`\n\nUse together with pytest argument `--junitxml=your_xml_file.name.xml`\n\nExample: True, False.\n<br><br>\n\n### Examples:\n\n`pytest`: Pytest will be executed in real-time mode.\n\n`pytest` *(with initry_batching=True)*: Pytest will be executed in real-time mode, but data will be sent to the server in batches to reduce network overhead. Real-time data will only display task finalized statuses without the 'running' state.\n\n`pytest --junitxml=test.xml`: Pytest will be executed in real-time mode, and additional information will be collected from the generated JUnit XML file after the test run finalization.\n\n`pytest --junitxml=test.xml` *(with initry_junit_xml_only=True)*: Pytest will be executed without providing real-time data, and information will be gathered after the test run ends using the generated JUnit XML file.\n\n\n\n### License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Plugin for sending automation test data from Pytest to the initry",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/initry/pytest-initry",
"Repository": "https://github.com/initry/pytest-initry"
},
"split_keywords": [
"pytest",
" initry"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5b7938e63ccd45ee42033e835dedb0977566b581c8b37f5fcaa51bad8a894303",
"md5": "25d17bb682a3cb65f2f57a9ea57290a1",
"sha256": "d1475ffeb550ac8d3516b55dc4ae6b5747ac55145d3f7dcd2e1c8297a806a495"
},
"downloads": -1,
"filename": "pytest_initry-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "25d17bb682a3cb65f2f57a9ea57290a1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 16544,
"upload_time": "2024-04-30T17:51:35",
"upload_time_iso_8601": "2024-04-30T17:51:35.406127Z",
"url": "https://files.pythonhosted.org/packages/5b/79/38e63ccd45ee42033e835dedb0977566b581c8b37f5fcaa51bad8a894303/pytest_initry-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "91c52b323a329b687350480856842899f56e03bc987951a7b2ccbbb4b7d09ba0",
"md5": "97ab56d23b383557e338e67c84fd95ab",
"sha256": "590736ca697d33c336dea52e0eb19822bac21c752b5f10be561a5152e5930db9"
},
"downloads": -1,
"filename": "pytest_initry-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "97ab56d23b383557e338e67c84fd95ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 10453,
"upload_time": "2024-04-30T17:51:41",
"upload_time_iso_8601": "2024-04-30T17:51:41.768931Z",
"url": "https://files.pythonhosted.org/packages/91/c5/2b323a329b687350480856842899f56e03bc987951a7b2ccbbb4b7d09ba0/pytest_initry-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-30 17:51:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "initry",
"github_project": "pytest-initry",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pytest-initry"
}