unicase-cli


Nameunicase-cli JSON
Version 1.2.8 PyPI version JSON
download
home_pagehttps://github.com/mocobk/unicase
Summarymanage Excel cases
upload_time2024-11-26 08:35:13
maintainerNone
docs_urlNone
authormocobk
requires_pythonNone
licenseNone
keywords unicase-cli unicase case excel
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![](https://shields.mitmproxy.org/pypi/v/unicase-cli.svg) ![](https://shields.mitmproxy.org/pypi/pyversions/unicase-cli.svg)
# unicase(用例管理命令行工具)

`pip install -U unicase-cli`

```
>unicase --help

Usage: unicase [OPTIONS] COMMAND [ARGS]...

  UNI 测试用例管理工具

Options:
  --help  Show this message and exit.

Commands:
  config  配置测试人员、API Base Url
  create  创建 Excel 用例模板文件
  upload  上传 Excel 用例到 TAPD
```

## 配置
由于创建和上传用例都需要创建人信息,在使用前必须配置测试人员英文名
```
>unicase config --help 
         
Usage: unicase config [OPTIONS]

  配置测试人员、API Base Url

Options:
  --tester TEXT    当前测试人员英文名(上传用例时需要用到)
  --base-url TEXT  当前 API Base Url
  --help           Show this message and exit.
```


## 创建 Excel 用例模板文件
写用例前可以先生成一个属于当前迭代的用例模板,模块中会根据所选迭代生成对应的 `需求`、`开发人员`下拉选择  
同时也会保存对应的迭代信息到 A1 单元格(请勿修改 A1)  

创建的用例模板名默认为:`{迭代名称}(创建人).xlsm`,如果想使用其他名称可以使用 --name 参数指定 
```
>unicase create --help  

Usage: unicase create [OPTIONS]

  创建 Excel 用例模板文件

Options:
  --name TEXT  指定生成的文件路径,默认生成到当前文件夹且以迭代名称命名
  --help       Show this message and exit.
```
![](https://img.mocobk.cn/20210223102451898487.png)

## 上传用例
上传用例包括 2 种类型的上传:  
`--type bvt`: 只上传冒烟测试用例,以 task 类型创建到 TAPD 对应迭代中,默认不加 `--type` 也是上传冒烟测试用例  
`--type all`: 上传所有测试用例,以 case 类型创建到 TAPD 测试用例模块中,并与相应的测试计划关联  

**\*用例必填项**  
冒烟用例:`一级模块`	`用例名称`	`用例等级(必须是 高)`	`开发人员`	`需求`  
功能用例:`一级模块`	`用例名称`	`需求`  

**注意:**  
* 用例上传后会把上传后的 `task_id`、`case_id` 重新写入你的用例文件,方便用例有修改重新上传、更新,请勿随意删除 `task_id` 和 `case_id`  
* 用例上传前都会校验用例的合法性,所以不用担心用例格式有问题导致上传错乱
* 上传用例时最好不要在 Excel 中打开该文件,避免工具写入时没有写的权限(实际这里也做了异常处理,会写入新的文件名)

```
>Usage: unicase upload [OPTIONS] FILE

  上传 Excel 用例到 TAPD

Options:
  --type [bvt|all]  用例上传类型:bvt 冒烟用例,all 全部用例
  --help            Show this message and exit.
```
冒烟用例示例

![](https://img.mocobk.cn/20210303142531279308.png!/fh/500)

## 建议操作流程
迭代开始——需求评审——`创建测试计划`——`创建迭代用例`——`上传冒烟用例`——`上传所有用例`——`执行用例`——发版——`用例若有更新重新上传`——`关闭测试计划`——`用例文件归档`
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mocobk/unicase",
    "name": "unicase-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "unicase-cli, unicase, case, excel",
    "author": "mocobk",
    "author_email": "mailmzb@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/2f/e4/b3b8614c33e5c3e8a39643f142d0e7dee255b913b55c761a403fbfab9626/unicase-cli-1.2.8.tar.gz",
    "platform": null,
    "description": "![](https://shields.mitmproxy.org/pypi/v/unicase-cli.svg) ![](https://shields.mitmproxy.org/pypi/pyversions/unicase-cli.svg)\n# unicase\uff08\u7528\u4f8b\u7ba1\u7406\u547d\u4ee4\u884c\u5de5\u5177\uff09\n\n`pip install -U unicase-cli`\n\n```\n>unicase --help\n\nUsage: unicase [OPTIONS] COMMAND [ARGS]...\n\n  UNI \u6d4b\u8bd5\u7528\u4f8b\u7ba1\u7406\u5de5\u5177\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  config  \u914d\u7f6e\u6d4b\u8bd5\u4eba\u5458\u3001API Base Url\n  create  \u521b\u5efa Excel \u7528\u4f8b\u6a21\u677f\u6587\u4ef6\n  upload  \u4e0a\u4f20 Excel \u7528\u4f8b\u5230 TAPD\n```\n\n## \u914d\u7f6e\n\u7531\u4e8e\u521b\u5efa\u548c\u4e0a\u4f20\u7528\u4f8b\u90fd\u9700\u8981\u521b\u5efa\u4eba\u4fe1\u606f\uff0c\u5728\u4f7f\u7528\u524d\u5fc5\u987b\u914d\u7f6e\u6d4b\u8bd5\u4eba\u5458\u82f1\u6587\u540d\n```\n>unicase config --help \n         \nUsage: unicase config [OPTIONS]\n\n  \u914d\u7f6e\u6d4b\u8bd5\u4eba\u5458\u3001API Base Url\n\nOptions:\n  --tester TEXT    \u5f53\u524d\u6d4b\u8bd5\u4eba\u5458\u82f1\u6587\u540d(\u4e0a\u4f20\u7528\u4f8b\u65f6\u9700\u8981\u7528\u5230)\n  --base-url TEXT  \u5f53\u524d API Base Url\n  --help           Show this message and exit.\n```\n\n\n## \u521b\u5efa Excel \u7528\u4f8b\u6a21\u677f\u6587\u4ef6\n\u5199\u7528\u4f8b\u524d\u53ef\u4ee5\u5148\u751f\u6210\u4e00\u4e2a\u5c5e\u4e8e\u5f53\u524d\u8fed\u4ee3\u7684\u7528\u4f8b\u6a21\u677f\uff0c\u6a21\u5757\u4e2d\u4f1a\u6839\u636e\u6240\u9009\u8fed\u4ee3\u751f\u6210\u5bf9\u5e94\u7684 `\u9700\u6c42`\u3001`\u5f00\u53d1\u4eba\u5458`\u4e0b\u62c9\u9009\u62e9  \n\u540c\u65f6\u4e5f\u4f1a\u4fdd\u5b58\u5bf9\u5e94\u7684\u8fed\u4ee3\u4fe1\u606f\u5230 A1 \u5355\u5143\u683c\uff08\u8bf7\u52ff\u4fee\u6539 A1\uff09  \n\n\u521b\u5efa\u7684\u7528\u4f8b\u6a21\u677f\u540d\u9ed8\u8ba4\u4e3a\uff1a`{\u8fed\u4ee3\u540d\u79f0}(\u521b\u5efa\u4eba).xlsm`\uff0c\u5982\u679c\u60f3\u4f7f\u7528\u5176\u4ed6\u540d\u79f0\u53ef\u4ee5\u4f7f\u7528 --name \u53c2\u6570\u6307\u5b9a \n```\n>unicase create --help  \n\nUsage: unicase create [OPTIONS]\n\n  \u521b\u5efa Excel \u7528\u4f8b\u6a21\u677f\u6587\u4ef6\n\nOptions:\n  --name TEXT  \u6307\u5b9a\u751f\u6210\u7684\u6587\u4ef6\u8def\u5f84\uff0c\u9ed8\u8ba4\u751f\u6210\u5230\u5f53\u524d\u6587\u4ef6\u5939\u4e14\u4ee5\u8fed\u4ee3\u540d\u79f0\u547d\u540d\n  --help       Show this message and exit.\n```\n![](https://img.mocobk.cn/20210223102451898487.png)\n\n## \u4e0a\u4f20\u7528\u4f8b\n\u4e0a\u4f20\u7528\u4f8b\u5305\u62ec 2 \u79cd\u7c7b\u578b\u7684\u4e0a\u4f20\uff1a  \n`--type bvt`: \u53ea\u4e0a\u4f20\u5192\u70df\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5 task \u7c7b\u578b\u521b\u5efa\u5230 TAPD \u5bf9\u5e94\u8fed\u4ee3\u4e2d\uff0c\u9ed8\u8ba4\u4e0d\u52a0 `--type` \u4e5f\u662f\u4e0a\u4f20\u5192\u70df\u6d4b\u8bd5\u7528\u4f8b  \n`--type all`: \u4e0a\u4f20\u6240\u6709\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5 case \u7c7b\u578b\u521b\u5efa\u5230 TAPD \u6d4b\u8bd5\u7528\u4f8b\u6a21\u5757\u4e2d\uff0c\u5e76\u4e0e\u76f8\u5e94\u7684\u6d4b\u8bd5\u8ba1\u5212\u5173\u8054  \n\n**\\*\u7528\u4f8b\u5fc5\u586b\u9879**  \n\u5192\u70df\u7528\u4f8b\uff1a`\u4e00\u7ea7\u6a21\u5757`\t`\u7528\u4f8b\u540d\u79f0`\t`\u7528\u4f8b\u7b49\u7ea7\uff08\u5fc5\u987b\u662f \u9ad8\uff09`\t`\u5f00\u53d1\u4eba\u5458`\t`\u9700\u6c42`  \n\u529f\u80fd\u7528\u4f8b\uff1a`\u4e00\u7ea7\u6a21\u5757`\t`\u7528\u4f8b\u540d\u79f0`\t`\u9700\u6c42`  \n\n**\u6ce8\u610f:**  \n* \u7528\u4f8b\u4e0a\u4f20\u540e\u4f1a\u628a\u4e0a\u4f20\u540e\u7684 `task_id`\u3001`case_id` \u91cd\u65b0\u5199\u5165\u4f60\u7684\u7528\u4f8b\u6587\u4ef6\uff0c\u65b9\u4fbf\u7528\u4f8b\u6709\u4fee\u6539\u91cd\u65b0\u4e0a\u4f20\u3001\u66f4\u65b0\uff0c\u8bf7\u52ff\u968f\u610f\u5220\u9664 `task_id` \u548c `case_id`  \n* \u7528\u4f8b\u4e0a\u4f20\u524d\u90fd\u4f1a\u6821\u9a8c\u7528\u4f8b\u7684\u5408\u6cd5\u6027\uff0c\u6240\u4ee5\u4e0d\u7528\u62c5\u5fc3\u7528\u4f8b\u683c\u5f0f\u6709\u95ee\u9898\u5bfc\u81f4\u4e0a\u4f20\u9519\u4e71\n* \u4e0a\u4f20\u7528\u4f8b\u65f6\u6700\u597d\u4e0d\u8981\u5728 Excel \u4e2d\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u907f\u514d\u5de5\u5177\u5199\u5165\u65f6\u6ca1\u6709\u5199\u7684\u6743\u9650\uff08\u5b9e\u9645\u8fd9\u91cc\u4e5f\u505a\u4e86\u5f02\u5e38\u5904\u7406\uff0c\u4f1a\u5199\u5165\u65b0\u7684\u6587\u4ef6\u540d\uff09\n\n```\n>Usage: unicase upload [OPTIONS] FILE\n\n  \u4e0a\u4f20 Excel \u7528\u4f8b\u5230 TAPD\n\nOptions:\n  --type [bvt|all]  \u7528\u4f8b\u4e0a\u4f20\u7c7b\u578b\uff1abvt \u5192\u70df\u7528\u4f8b\uff0call \u5168\u90e8\u7528\u4f8b\n  --help            Show this message and exit.\n```\n\u5192\u70df\u7528\u4f8b\u793a\u4f8b\n\n![](https://img.mocobk.cn/20210303142531279308.png!/fh/500)\n\n## \u5efa\u8bae\u64cd\u4f5c\u6d41\u7a0b\n\u8fed\u4ee3\u5f00\u59cb\u2014\u2014\u9700\u6c42\u8bc4\u5ba1\u2014\u2014`\u521b\u5efa\u6d4b\u8bd5\u8ba1\u5212`\u2014\u2014`\u521b\u5efa\u8fed\u4ee3\u7528\u4f8b`\u2014\u2014`\u4e0a\u4f20\u5192\u70df\u7528\u4f8b`\u2014\u2014`\u4e0a\u4f20\u6240\u6709\u7528\u4f8b`\u2014\u2014`\u6267\u884c\u7528\u4f8b`\u2014\u2014\u53d1\u7248\u2014\u2014`\u7528\u4f8b\u82e5\u6709\u66f4\u65b0\u91cd\u65b0\u4e0a\u4f20`\u2014\u2014`\u5173\u95ed\u6d4b\u8bd5\u8ba1\u5212`\u2014\u2014`\u7528\u4f8b\u6587\u4ef6\u5f52\u6863`",
    "bugtrack_url": null,
    "license": null,
    "summary": "manage Excel cases",
    "version": "1.2.8",
    "project_urls": {
        "Homepage": "https://github.com/mocobk/unicase"
    },
    "split_keywords": [
        "unicase-cli",
        " unicase",
        " case",
        " excel"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2fe4b3b8614c33e5c3e8a39643f142d0e7dee255b913b55c761a403fbfab9626",
                "md5": "ae69d157445065e3dff302ea8fdb9460",
                "sha256": "466d5003d3c31702c7346febe3f2e8d28ac0f90b91e0d6ccbf0439ba531856e3"
            },
            "downloads": -1,
            "filename": "unicase-cli-1.2.8.tar.gz",
            "has_sig": false,
            "md5_digest": "ae69d157445065e3dff302ea8fdb9460",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 80776,
            "upload_time": "2024-11-26T08:35:13",
            "upload_time_iso_8601": "2024-11-26T08:35:13.536048Z",
            "url": "https://files.pythonhosted.org/packages/2f/e4/b3b8614c33e5c3e8a39643f142d0e7dee255b913b55c761a403fbfab9626/unicase-cli-1.2.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-26 08:35:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mocobk",
    "github_project": "unicase",
    "github_not_found": true,
    "lcname": "unicase-cli"
}
        
Elapsed time: 0.37579s