lounger


Namelounger JSON
Version 0.5.1 PyPI version JSON
download
home_pageNone
SummaryNext generation automated testing framework.
upload_time2025-10-10 15:54:30
maintainerNone
docs_urlNone
authorbugmaster
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # lounger

Next generation automated testing framework.

## feature

🌟 支持`web`/`api`测试。

🌟 提供脚手架生成自动化项目。

🌟 更好用的数据驱动。

🌟 支持数据库操作。

🌟 已经配置好的测试报告(包含截图、日志)。

🌟 天然支持`API objects`、`Page objects`设计模式。

## framework

lounger不是一个从零开始的自动化测试框架,建立在`pytest`生态的基础上,提供更加简单的使用体验。

![](./images/framework.png)

## Install

* pip安装。

```shell
$ pip install lounger
```

* 体验最新的项目代码。

```shell
$ pip install -U git+https://github.com/SeldomQA/lounger.git@main
```

此外,如果做Web自动化测试,请单独安装测试浏览器。

```shell
$ playwright install chromium[可选]
$ playwright install firefox[可选]
$ playwright install webkit[可选]
...
```

## scaffold

lounger提供了脚手架,直接创建项目和使用。

```shell
$ lounger --help

Usage: lounger [OPTIONS]

  lounger CLI.

Options:
  --version                Show version.
  -pw, --project-web TEXT  Create an web automation test project.
  -pa, --project-api TEXT  Create an api automation test project.
  -ya, --yaml-api TEXT     Create an YAML api automation test project.
  --help                   Show this message and exit.
```

* 创建web自动化测试项目。

```shell
$ lounger -pw myweb

2025-10-06 09:33:22 | INFO     | cli.py | Start to create new test project: myweb
2025-10-06 09:33:22 | INFO     | cli.py | CWD: D:\github\seldomQA\lounger

2025-10-06 09:33:22 | INFO     | cli.py | 📁 created folder: reports
2025-10-06 09:33:22 | INFO     | cli.py | 📄 created file: pytest.ini
2025-10-06 09:33:22 | INFO     | cli.py | 📄 created file: conftest.py
2025-10-06 09:33:22 | INFO     | cli.py | 📄 created file: test_web.py
2025-10-06 09:33:22 | INFO     | cli.py | 🎉 Project 'myweb' created successfully.
2025-10-06 09:33:22 | INFO     | cli.py | 👉 Go to the project folder and run 'pytest' to start testing.
```

* 创建api自动化测试项目。

```shell
$ lounger -pa myapi

2025-10-06 09:34:08 | INFO     | cli.py | Start to create new test project: myapi
2025-10-06 09:34:08 | INFO     | cli.py | CWD: D:\github\seldomQA\lounger

2025-10-06 09:34:08 | INFO     | cli.py | 📁 created folder: reports
2025-10-06 09:34:08 | INFO     | cli.py | 📄 created file: pytest.ini
2025-10-06 09:34:08 | INFO     | cli.py | 📄 created file: conftest.py
2025-10-06 09:34:08 | INFO     | cli.py | 📄 created file: test_api.py
2025-10-06 09:34:08 | INFO     | cli.py | 🎉 Project 'myapi' created successfully.
2025-10-06 09:34:08 | INFO     | cli.py | 👉 Go to the project folder and run 'pytest' to start testing.
```

* 创建YAML格式的api自动化测试项目。

> 注:通过YAML管理API测试用例,是为了降低非开发人员的使用门槛。

👉 [阅读文档](./myyapi)

```shell
$ lounger -ya myyapi

2025-10-06 09:35:21 | INFO     | cli.py | Start to create new test project: myyapi
2025-10-06 09:35:21 | INFO     | cli.py | CWD: D:\github\seldomQA\lounger

2025-10-06 09:35:21 | INFO     | cli.py | 📁 created folder: reports
2025-10-06 09:35:21 | INFO     | cli.py | 📄 created file: conftest.py
2025-10-06 09:35:21 | INFO     | cli.py | 📄 created file: test_api.py
2025-10-06 09:35:21 | INFO     | cli.py | 📄 created file: config/config.yaml
2025-10-06 09:35:21 | INFO     | cli.py | 📄 created file: datas/setup/login.yaml
2025-10-06 09:35:21 | INFO     | cli.py | 📄 created file: datas/sample/test_case.yaml
2025-10-06 09:35:21 | INFO     | cli.py | 📄 created file: datas/sample/test_req.yaml
2025-10-06 09:35:21 | INFO     | cli.py | 🎉 Project 'myyapi' created successfully.
2025-10-06 09:35:21 | INFO     | cli.py | 👉 Go to the project folder and run 'pytest' to start testing.
```

* 直接运行测试

```shell
$ cd myweb  # or myapi
$ pytest
```

* 测试报告

![](./images/report.png)

## 示例

[tests](./tests/) 提供了大量的示例学习。你会看到不少 seldom 类似的用法。

## 对比

* seldom VS lounger

👉[详细对比](./seldom_vs_lounger.md)


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "lounger",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "bugmaster",
    "author_email": "defnngj@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f9/89/7fdd8317ec49580d2d39b18cb6d72d9797a1cb07fe1ffb2722c1fafc6d8d/lounger-0.5.1.tar.gz",
    "platform": null,
    "description": "# lounger\n\nNext generation automated testing framework.\n\n## feature\n\n\ud83c\udf1f \u652f\u6301`web`/`api`\u6d4b\u8bd5\u3002\n\n\ud83c\udf1f \u63d0\u4f9b\u811a\u624b\u67b6\u751f\u6210\u81ea\u52a8\u5316\u9879\u76ee\u3002\n\n\ud83c\udf1f \u66f4\u597d\u7528\u7684\u6570\u636e\u9a71\u52a8\u3002\n\n\ud83c\udf1f \u652f\u6301\u6570\u636e\u5e93\u64cd\u4f5c\u3002\n\n\ud83c\udf1f \u5df2\u7ecf\u914d\u7f6e\u597d\u7684\u6d4b\u8bd5\u62a5\u544a\uff08\u5305\u542b\u622a\u56fe\u3001\u65e5\u5fd7\uff09\u3002\n\n\ud83c\udf1f \u5929\u7136\u652f\u6301`API objects`\u3001`Page objects`\u8bbe\u8ba1\u6a21\u5f0f\u3002\n\n## framework\n\nlounger\u4e0d\u662f\u4e00\u4e2a\u4ece\u96f6\u5f00\u59cb\u7684\u81ea\u52a8\u5316\u6d4b\u8bd5\u6846\u67b6\uff0c\u5efa\u7acb\u5728`pytest`\u751f\u6001\u7684\u57fa\u7840\u4e0a\uff0c\u63d0\u4f9b\u66f4\u52a0\u7b80\u5355\u7684\u4f7f\u7528\u4f53\u9a8c\u3002\n\n![](./images/framework.png)\n\n## Install\n\n* pip\u5b89\u88c5\u3002\n\n```shell\n$ pip install lounger\n```\n\n* \u4f53\u9a8c\u6700\u65b0\u7684\u9879\u76ee\u4ee3\u7801\u3002\n\n```shell\n$ pip install -U git+https://github.com/SeldomQA/lounger.git@main\n```\n\n\u6b64\u5916\uff0c\u5982\u679c\u505aWeb\u81ea\u52a8\u5316\u6d4b\u8bd5\uff0c\u8bf7\u5355\u72ec\u5b89\u88c5\u6d4b\u8bd5\u6d4f\u89c8\u5668\u3002\n\n```shell\n$ playwright install chromium[\u53ef\u9009]\n$ playwright install firefox[\u53ef\u9009]\n$ playwright install webkit[\u53ef\u9009]\n...\n```\n\n## scaffold\n\nlounger\u63d0\u4f9b\u4e86\u811a\u624b\u67b6\uff0c\u76f4\u63a5\u521b\u5efa\u9879\u76ee\u548c\u4f7f\u7528\u3002\n\n```shell\n$ lounger --help\n\nUsage: lounger [OPTIONS]\n\n  lounger CLI.\n\nOptions:\n  --version                Show version.\n  -pw, --project-web TEXT  Create an web automation test project.\n  -pa, --project-api TEXT  Create an api automation test project.\n  -ya, --yaml-api TEXT     Create an YAML api automation test project.\n  --help                   Show this message and exit.\n```\n\n* \u521b\u5efaweb\u81ea\u52a8\u5316\u6d4b\u8bd5\u9879\u76ee\u3002\n\n```shell\n$ lounger -pw myweb\n\n2025-10-06 09:33:22 | INFO     | cli.py | Start to create new test project: myweb\n2025-10-06 09:33:22 | INFO     | cli.py | CWD: D:\\github\\seldomQA\\lounger\n\n2025-10-06 09:33:22 | INFO     | cli.py | \ud83d\udcc1 created folder: reports\n2025-10-06 09:33:22 | INFO     | cli.py | \ud83d\udcc4 created file: pytest.ini\n2025-10-06 09:33:22 | INFO     | cli.py | \ud83d\udcc4 created file: conftest.py\n2025-10-06 09:33:22 | INFO     | cli.py | \ud83d\udcc4 created file: test_web.py\n2025-10-06 09:33:22 | INFO     | cli.py | \ud83c\udf89 Project 'myweb' created successfully.\n2025-10-06 09:33:22 | INFO     | cli.py | \ud83d\udc49 Go to the project folder and run 'pytest' to start testing.\n```\n\n* \u521b\u5efaapi\u81ea\u52a8\u5316\u6d4b\u8bd5\u9879\u76ee\u3002\n\n```shell\n$ lounger -pa myapi\n\n2025-10-06 09:34:08 | INFO     | cli.py | Start to create new test project: myapi\n2025-10-06 09:34:08 | INFO     | cli.py | CWD: D:\\github\\seldomQA\\lounger\n\n2025-10-06 09:34:08 | INFO     | cli.py | \ud83d\udcc1 created folder: reports\n2025-10-06 09:34:08 | INFO     | cli.py | \ud83d\udcc4 created file: pytest.ini\n2025-10-06 09:34:08 | INFO     | cli.py | \ud83d\udcc4 created file: conftest.py\n2025-10-06 09:34:08 | INFO     | cli.py | \ud83d\udcc4 created file: test_api.py\n2025-10-06 09:34:08 | INFO     | cli.py | \ud83c\udf89 Project 'myapi' created successfully.\n2025-10-06 09:34:08 | INFO     | cli.py | \ud83d\udc49 Go to the project folder and run 'pytest' to start testing.\n```\n\n* \u521b\u5efaYAML\u683c\u5f0f\u7684api\u81ea\u52a8\u5316\u6d4b\u8bd5\u9879\u76ee\u3002\n\n> \u6ce8\uff1a\u901a\u8fc7YAML\u7ba1\u7406API\u6d4b\u8bd5\u7528\u4f8b\uff0c\u662f\u4e3a\u4e86\u964d\u4f4e\u975e\u5f00\u53d1\u4eba\u5458\u7684\u4f7f\u7528\u95e8\u69db\u3002\n\n\ud83d\udc49 [\u9605\u8bfb\u6587\u6863](./myyapi)\n\n```shell\n$ lounger -ya myyapi\n\n2025-10-06 09:35:21 | INFO     | cli.py | Start to create new test project: myyapi\n2025-10-06 09:35:21 | INFO     | cli.py | CWD: D:\\github\\seldomQA\\lounger\n\n2025-10-06 09:35:21 | INFO     | cli.py | \ud83d\udcc1 created folder: reports\n2025-10-06 09:35:21 | INFO     | cli.py | \ud83d\udcc4 created file: conftest.py\n2025-10-06 09:35:21 | INFO     | cli.py | \ud83d\udcc4 created file: test_api.py\n2025-10-06 09:35:21 | INFO     | cli.py | \ud83d\udcc4 created file: config/config.yaml\n2025-10-06 09:35:21 | INFO     | cli.py | \ud83d\udcc4 created file: datas/setup/login.yaml\n2025-10-06 09:35:21 | INFO     | cli.py | \ud83d\udcc4 created file: datas/sample/test_case.yaml\n2025-10-06 09:35:21 | INFO     | cli.py | \ud83d\udcc4 created file: datas/sample/test_req.yaml\n2025-10-06 09:35:21 | INFO     | cli.py | \ud83c\udf89 Project 'myyapi' created successfully.\n2025-10-06 09:35:21 | INFO     | cli.py | \ud83d\udc49 Go to the project folder and run 'pytest' to start testing.\n```\n\n* \u76f4\u63a5\u8fd0\u884c\u6d4b\u8bd5\n\n```shell\n$ cd myweb  # or myapi\n$ pytest\n```\n\n* \u6d4b\u8bd5\u62a5\u544a\n\n![](./images/report.png)\n\n## \u793a\u4f8b\n\n[tests](./tests/) \u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u793a\u4f8b\u5b66\u4e60\u3002\u4f60\u4f1a\u770b\u5230\u4e0d\u5c11 seldom \u7c7b\u4f3c\u7684\u7528\u6cd5\u3002\n\n## \u5bf9\u6bd4\n\n* seldom VS lounger\n\n\ud83d\udc49[\u8be6\u7ec6\u5bf9\u6bd4](./seldom_vs_lounger.md)\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Next generation automated testing framework.",
    "version": "0.5.1",
    "project_urls": {
        "Homepage": "https://github.com/SeldomQA/lounger",
        "Repository": "https://github.com/SeldomQA/lounger"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e787eb8ed730e0441983be2905c5f3f12fa01fb5f904bdf7e850ed2169a2df91",
                "md5": "9bfed105c7eb1d9d2b2559cbeef21a96",
                "sha256": "c89dd82db4d7428508f26c8def61065af628c9910957c65a13c015201d267030"
            },
            "downloads": -1,
            "filename": "lounger-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9bfed105c7eb1d9d2b2559cbeef21a96",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 59733,
            "upload_time": "2025-10-10T15:54:29",
            "upload_time_iso_8601": "2025-10-10T15:54:29.370720Z",
            "url": "https://files.pythonhosted.org/packages/e7/87/eb8ed730e0441983be2905c5f3f12fa01fb5f904bdf7e850ed2169a2df91/lounger-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f9897fdd8317ec49580d2d39b18cb6d72d9797a1cb07fe1ffb2722c1fafc6d8d",
                "md5": "4dcba518dceff84c2c38c70a13fce065",
                "sha256": "72b11fceba6f50601bd4f4d95e4b25a5cb53026fb2f96da3618f34b2f34ba3e7"
            },
            "downloads": -1,
            "filename": "lounger-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4dcba518dceff84c2c38c70a13fce065",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 44773,
            "upload_time": "2025-10-10T15:54:30",
            "upload_time_iso_8601": "2025-10-10T15:54:30.635616Z",
            "url": "https://files.pythonhosted.org/packages/f9/89/7fdd8317ec49580d2d39b18cb6d72d9797a1cb07fe1ffb2722c1fafc6d8d/lounger-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-10 15:54:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SeldomQA",
    "github_project": "lounger",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "lounger"
}
        
Elapsed time: 2.41354s