pytest-chic-report


Namepytest-chic-report JSON
Version 2.0.3 PyPI version JSON
download
home_pageNone
SummarySimple pytest plugin for generating and sending report to messengers.
upload_time2024-11-01 09:01:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords pytest report messenger teams slack
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## pytest-chic-report


`pytest-chic-report` is a plugin for pytest that allows you to generate test result summaries in Markdown format and send them to Slack or Teams channels.

### Installation

You can install `pytest-chic-report` via pip from [PyPI](https://pypi.org/project/pytest-chic-report/).

```bash
pip install pytest-chic-report
```

### Usage

**Adding Command Line Options**

The plugin adds several command line options to customize the reports:

- `--summary` Print a summary in the terminal (enabled by default).
- `--suite-name` Specify the name of the test suite (default: "Regression").
- `--whois` Specify the name of the user who triggered the tests.
- `--verify-ssl` Enable TLS certificate verification.
- `--slack-webhook` Specify the webhook URL for Slack to send the report.
- `--teams-webhook` Specify the webhook URL for Teams to send the report.
- `--include-failed` Include a template of failed tests in the message.
- `--include-errors` Include a template of error tests in the message.
- `--include-all-tests` Include a template of all tests in the message.

### Example Usage:

```bash
pytest --slack-webhook https://hooks.slack.com/services/XXXXX/XXXXX/XXXXX
```


### Report Format

The report is generated in Markdown format and sent to the specified channel, featuring color-coded test results:

- green ✅ - all tests passed
- red ❌ - at least one test failed or error
- yellow ⏸️ - all tests skipped

**Example Report**

```markdown
--------- Suite Summary ---------
Suite name:    Regression
Passed amount: 7
Failed amount: 1
Skipped amount: 1
Xfailed amount: 4
Xpassed amount: 2
Total tests: 15
Total duration: 0.02 seconds
Successful tests: 47 %
From: Linux-6.8.0-47-generic-x86_64-with-glibc2.39
Show less
Sent by Anonymous | Today at 10:32 AM
```

**Note:** This does not work with the pytest-xdist plugin.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pytest-chic-report",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "pytest, report, messenger, teams, slack",
    "author": null,
    "author_email": "Oleg Matskiv <alpaca00tuha@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/8c/2a/63e8544ee1147f09ee638b6641a2d75a6365ab06e0af1ef05f93ede26350/pytest_chic_report-2.0.3.tar.gz",
    "platform": null,
    "description": "## pytest-chic-report\n\n\n`pytest-chic-report` is a plugin for pytest that allows you to generate test result summaries in Markdown format and send them to Slack or Teams channels.\n\n### Installation\n\nYou can install `pytest-chic-report` via pip from [PyPI](https://pypi.org/project/pytest-chic-report/).\n\n```bash\npip install pytest-chic-report\n```\n\n### Usage\n\n**Adding Command Line Options**\n\nThe plugin adds several command line options to customize the reports:\n\n- `--summary` Print a summary in the terminal (enabled by default).\n- `--suite-name` Specify the name of the test suite (default: \"Regression\").\n- `--whois` Specify the name of the user who triggered the tests.\n- `--verify-ssl` Enable TLS certificate verification.\n- `--slack-webhook` Specify the webhook URL for Slack to send the report.\n- `--teams-webhook` Specify the webhook URL for Teams to send the report.\n- `--include-failed` Include a template of failed tests in the message.\n- `--include-errors` Include a template of error tests in the message.\n- `--include-all-tests` Include a template of all tests in the message.\n\n### Example Usage:\n\n```bash\npytest --slack-webhook https://hooks.slack.com/services/XXXXX/XXXXX/XXXXX\n```\n\n\n### Report Format\n\nThe report is generated in Markdown format and sent to the specified channel, featuring color-coded test results:\n\n- green \u2705 - all tests passed\n- red \u274c - at least one test failed or error\n- yellow \u23f8\ufe0f - all tests skipped\n\n**Example Report**\n\n```markdown\n--------- Suite Summary ---------\nSuite name:    Regression\nPassed amount: 7\nFailed amount: 1\nSkipped amount: 1\nXfailed amount: 4\nXpassed amount: 2\nTotal tests: 15\nTotal duration: 0.02 seconds\nSuccessful tests: 47 %\nFrom: Linux-6.8.0-47-generic-x86_64-with-glibc2.39\nShow less\nSent by Anonymous | Today at 10:32 AM\n```\n\n**Note:** This does not work with the pytest-xdist plugin.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple pytest plugin for generating and sending report to messengers.",
    "version": "2.0.3",
    "project_urls": null,
    "split_keywords": [
        "pytest",
        " report",
        " messenger",
        " teams",
        " slack"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b9bc1751cea0d84b7755822dabba449a3b20829cb21f6c3ed34d46414f196da",
                "md5": "b0f4f0cd043da0295f785764f2cfad01",
                "sha256": "2b28a77bc77d94a8f5c712b7ed689e2f697b245b36385f425f96803a6e157f75"
            },
            "downloads": -1,
            "filename": "pytest_chic_report-2.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b0f4f0cd043da0295f785764f2cfad01",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5884,
            "upload_time": "2024-11-01T09:01:00",
            "upload_time_iso_8601": "2024-11-01T09:01:00.954038Z",
            "url": "https://files.pythonhosted.org/packages/3b/9b/c1751cea0d84b7755822dabba449a3b20829cb21f6c3ed34d46414f196da/pytest_chic_report-2.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8c2a63e8544ee1147f09ee638b6641a2d75a6365ab06e0af1ef05f93ede26350",
                "md5": "0b6d7f8e6dcf4b95e503f3b78836ce4e",
                "sha256": "c0e9da0be7895ad7f4e16f7cab74ed7c1c989bfb4f969828568f3f4f3014ea65"
            },
            "downloads": -1,
            "filename": "pytest_chic_report-2.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0b6d7f8e6dcf4b95e503f3b78836ce4e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5751,
            "upload_time": "2024-11-01T09:01:02",
            "upload_time_iso_8601": "2024-11-01T09:01:02.494903Z",
            "url": "https://files.pythonhosted.org/packages/8c/2a/63e8544ee1147f09ee638b6641a2d75a6365ab06e0af1ef05f93ede26350/pytest_chic_report-2.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-01 09:01:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pytest-chic-report"
}
        
Elapsed time: 0.55559s