jicaiauto


Namejicaiauto JSON
Version 0.0.2.6 PyPI version JSON
download
home_pagehttps://github.com/jicaiyunshang/jicaiauto
Summaryjicaiauto是对自动化框架的第三次更新,功能覆盖UI自动化与API自动化意在帮助对自动化有更多需求且过多时间写代码的人群,让大家的时间花在业务的实现上
upload_time2020-07-22 12:20:29
maintainer
docs_urlNone
authorTser
requires_python>=3.6
license
keywords jicai auto jicaiauto automation test framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 简介
    jicaiauto是对自动化框架的第三次更新,功能覆盖UI自动化与API自动化
    意在帮助对自动化有更多需求且过多时间写代码的人群,让大家的时间
    花在业务的实现上
## 架构
    --------------------------jicaiauto------------------------
                                  |
    ------------------------------------------------------------
    |                        |           |         |         |
    定时任务(jicaiautoTimer)  邮件发送     数据管理   日志内容   测试报告

## 开始使用
#### 了解测试用例目录
    1、进入Python的jicaiauto库目录
    2、将jicaiauto/test目录复制到其他方便编辑的位置
    3、通过Pycharm/VScode等工具打开编辑Case文件

#### 了解关键词
| 序号 | CMD | key |
| :--- | :--- | :--- |
| 1 | 打开网页 | URL |
|2 | 点击 | CLICK |
|3 | 输入 | SENDKEY |
|4 | 刷新页面 | REFRESH |
|5 | 后退 | BACK |
|6 | 关闭 | CLOSE |
|7 | 退出 | QUIT |
|8 | 标签 | CHECKTAG |
|9 | 属性[使用属性值定位] | CHECKATTR |
|10 | URL | CHECKURL |
|11 | 标题 | CHECKTITLE |
|12 | 跳转标签页[序号(1开始)] | SWITCHTOWINDOW |
|13 | Alert弹出框-[确定] | ALERT0 |
|14 | Alert弹出框-[取消] | ALERT1 |
|15 | Alert弹出框-[输入框] | ALERT2 |
|16 | Alert弹出框-[文本] | ALERT3 |
|17 | 停止时间 | WAIT |
|18 | 运行JS脚本 | SCRIPT |
|19 | 添加cookie | COOKIE |
|20 | 滑屏 | SWIPE |
|21 | 截屏 | SCREENSHOT |

#### 样例
    请移步jicaiauto/test目录

##### 备注
- 若APP测试需要获取toast信息可以写一个方法添加到自己的项目中,代码样例如下:
   ```
  def find_toast(self, message, timeout, poll_frequency):
        new_message = f"//*[@text=\'{message}\']"
        element = WebDriverWait(self.driver, timeout, poll_frequency).until(
            EC.presence_of_element_located((By.XPATH, new_message)))
        return element.text
  ```

#### 运行脚本命令
    pytest --html=report.html --self-contained-html
    or
    pytest --html=report.html --self-contained-html -m xiaobai_web
    or
    pytest --html=report.html --self-contained-html -o log_cli=true -o log_cli_level=INFO

## 定制定时器,方便定时运行脚本
![Image text](https://gitee.com/xiaobaikeji/tser/raw/master/jicaiautoTimer.png)

![Image text](https://gitee.com/xiaobaikeji/tser/raw/master/jicaiautoTimerRuning.png)

    注意:
    1、时间表达式参考jenkins(分、时、日、月、周),暂不支持日与月的数据
    2、设置当前目录,会影响命令执行时的路径

## 更新日志
| 版本 | 功能 |
| :---- | :---- |
| 0.0.1 | 实现UI部分功能,待扩展 |
| 0.0.1.2 | 实现api部分功能,待扩展,新增web环境检测cmd下运行jicaicheck |
| 0.0.1.3 | 更新web环境检测 |
| 0.0.1.4 | 更新主方法名web_action,app_action,api_action新增app环境检测 |
| 0.0.1.5 | 更新上一版本的小BUG |
| 0.0.1.6 | 代码调整 |
| 0.0.1.7 | 小更新 |
| 0.0.2.0 | 添加邮件发送,用例排序,chrome提示框禁止等等 |
| 0.0.2.2 | Update |
| 0.0.2.3 | 优化Code |
| 0.0.2.4 | 添加吉采自动化定时器,方便实现定时跑脚本任务,暂不支持日与月的时间表达,默认为* |
| 0.0.2.5 | 优化定时器,实时展示运行结果 |
| 0.0.2.6 | 优化定时器,点击选择测试脚本目录 |


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jicaiyunshang/jicaiauto",
    "name": "jicaiauto",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "jicai auto jicaiauto automation test framework",
    "author": "Tser",
    "author_email": "807447312@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/2e/cf/f56e138a8de8b5e89630726091a8f6fd2f8fd67f335e73a6b829a6f4a960/jicaiauto-0.0.2.6.tar.gz",
    "platform": "",
    "description": "# \u7b80\u4ecb\n    jicaiauto\u662f\u5bf9\u81ea\u52a8\u5316\u6846\u67b6\u7684\u7b2c\u4e09\u6b21\u66f4\u65b0\uff0c\u529f\u80fd\u8986\u76d6UI\u81ea\u52a8\u5316\u4e0eAPI\u81ea\u52a8\u5316\n    \u610f\u5728\u5e2e\u52a9\u5bf9\u81ea\u52a8\u5316\u6709\u66f4\u591a\u9700\u6c42\u4e14\u8fc7\u591a\u65f6\u95f4\u5199\u4ee3\u7801\u7684\u4eba\u7fa4\uff0c\u8ba9\u5927\u5bb6\u7684\u65f6\u95f4\n    \u82b1\u5728\u4e1a\u52a1\u7684\u5b9e\u73b0\u4e0a\n## \u67b6\u6784\n    --------------------------jicaiauto------------------------\n                                  |\n    ------------------------------------------------------------\n    |                        |           |         |         |\n    \u5b9a\u65f6\u4efb\u52a1(jicaiautoTimer)  \u90ae\u4ef6\u53d1\u9001     \u6570\u636e\u7ba1\u7406   \u65e5\u5fd7\u5185\u5bb9   \u6d4b\u8bd5\u62a5\u544a\n\n## \u5f00\u59cb\u4f7f\u7528\n#### \u4e86\u89e3\u6d4b\u8bd5\u7528\u4f8b\u76ee\u5f55\n    1\u3001\u8fdb\u5165Python\u7684jicaiauto\u5e93\u76ee\u5f55\n    2\u3001\u5c06jicaiauto/test\u76ee\u5f55\u590d\u5236\u5230\u5176\u4ed6\u65b9\u4fbf\u7f16\u8f91\u7684\u4f4d\u7f6e\n    3\u3001\u901a\u8fc7Pycharm/VScode\u7b49\u5de5\u5177\u6253\u5f00\u7f16\u8f91Case\u6587\u4ef6\n\n#### \u4e86\u89e3\u5173\u952e\u8bcd\n| \u5e8f\u53f7 | CMD | key |\n| :--- | :--- | :--- |\n| 1 | \u6253\u5f00\u7f51\u9875 | URL |\n|2 | \u70b9\u51fb | CLICK |\n|3 | \u8f93\u5165 | SENDKEY |\n|4 | \u5237\u65b0\u9875\u9762 | REFRESH |\n|5 | \u540e\u9000 | BACK |\n|6 | \u5173\u95ed | CLOSE |\n|7 | \u9000\u51fa | QUIT |\n|8 | \u6807\u7b7e | CHECKTAG |\n|9 | \u5c5e\u6027[\u4f7f\u7528\u5c5e\u6027\u503c\u5b9a\u4f4d] | CHECKATTR |\n|10 | URL | CHECKURL |\n|11 | \u6807\u9898 | CHECKTITLE |\n|12 | \u8df3\u8f6c\u6807\u7b7e\u9875[\u5e8f\u53f7(1\u5f00\u59cb)] | SWITCHTOWINDOW |\n|13 | Alert\u5f39\u51fa\u6846-[\u786e\u5b9a] | ALERT0 |\n|14 | Alert\u5f39\u51fa\u6846-[\u53d6\u6d88] | ALERT1 |\n|15 | Alert\u5f39\u51fa\u6846-[\u8f93\u5165\u6846] | ALERT2 |\n|16 | Alert\u5f39\u51fa\u6846-[\u6587\u672c] | ALERT3 |\n|17 | \u505c\u6b62\u65f6\u95f4 | WAIT |\n|18 | \u8fd0\u884cJS\u811a\u672c | SCRIPT |\n|19 | \u6dfb\u52a0cookie | COOKIE |\n|20 | \u6ed1\u5c4f | SWIPE |\n|21 | \u622a\u5c4f | SCREENSHOT |\n\n#### \u6837\u4f8b\n    \u8bf7\u79fb\u6b65jicaiauto/test\u76ee\u5f55\n\n##### \u5907\u6ce8\n- \u82e5APP\u6d4b\u8bd5\u9700\u8981\u83b7\u53d6toast\u4fe1\u606f\u53ef\u4ee5\u5199\u4e00\u4e2a\u65b9\u6cd5\u6dfb\u52a0\u5230\u81ea\u5df1\u7684\u9879\u76ee\u4e2d,\u4ee3\u7801\u6837\u4f8b\u5982\u4e0b\uff1a\n   ```\n  def find_toast(self, message, timeout, poll_frequency):\n        new_message = f\"//*[@text=\\'{message}\\']\"\n        element = WebDriverWait(self.driver, timeout, poll_frequency).until(\n            EC.presence_of_element_located((By.XPATH, new_message)))\n        return element.text\n  ```\n\n#### \u8fd0\u884c\u811a\u672c\u547d\u4ee4\n    pytest --html=report.html --self-contained-html\n    or\n    pytest --html=report.html --self-contained-html -m xiaobai_web\n    or\n    pytest --html=report.html --self-contained-html -o log_cli=true -o log_cli_level=INFO\n\n## \u5b9a\u5236\u5b9a\u65f6\u5668\uff0c\u65b9\u4fbf\u5b9a\u65f6\u8fd0\u884c\u811a\u672c\n![Image text](https://gitee.com/xiaobaikeji/tser/raw/master/jicaiautoTimer.png)\n\n![Image text](https://gitee.com/xiaobaikeji/tser/raw/master/jicaiautoTimerRuning.png)\n\n    \u6ce8\u610f\uff1a\n    1\u3001\u65f6\u95f4\u8868\u8fbe\u5f0f\u53c2\u8003jenkins\uff08\u5206\u3001\u65f6\u3001\u65e5\u3001\u6708\u3001\u5468\uff09\uff0c\u6682\u4e0d\u652f\u6301\u65e5\u4e0e\u6708\u7684\u6570\u636e\n    2\u3001\u8bbe\u7f6e\u5f53\u524d\u76ee\u5f55\uff0c\u4f1a\u5f71\u54cd\u547d\u4ee4\u6267\u884c\u65f6\u7684\u8def\u5f84\n\n## \u66f4\u65b0\u65e5\u5fd7\n| \u7248\u672c | \u529f\u80fd |\n| :---- | :---- |\n| 0.0.1 | \u5b9e\u73b0UI\u90e8\u5206\u529f\u80fd\uff0c\u5f85\u6269\u5c55 |\n| 0.0.1.2 | \u5b9e\u73b0api\u90e8\u5206\u529f\u80fd\uff0c\u5f85\u6269\u5c55\uff0c\u65b0\u589eweb\u73af\u5883\u68c0\u6d4bcmd\u4e0b\u8fd0\u884cjicaicheck |\n| 0.0.1.3 | \u66f4\u65b0web\u73af\u5883\u68c0\u6d4b |\n| 0.0.1.4 | \u66f4\u65b0\u4e3b\u65b9\u6cd5\u540dweb_action,app_action,api_action\u65b0\u589eapp\u73af\u5883\u68c0\u6d4b |\n| 0.0.1.5 | \u66f4\u65b0\u4e0a\u4e00\u7248\u672c\u7684\u5c0fBUG |\n| 0.0.1.6 | \u4ee3\u7801\u8c03\u6574 |\n| 0.0.1.7 | \u5c0f\u66f4\u65b0 |\n| 0.0.2.0 | \u6dfb\u52a0\u90ae\u4ef6\u53d1\u9001\uff0c\u7528\u4f8b\u6392\u5e8f\uff0cchrome\u63d0\u793a\u6846\u7981\u6b62\u7b49\u7b49 |\n| 0.0.2.2 | Update |\n| 0.0.2.3 | \u4f18\u5316Code |\n| 0.0.2.4 | \u6dfb\u52a0\u5409\u91c7\u81ea\u52a8\u5316\u5b9a\u65f6\u5668\uff0c\u65b9\u4fbf\u5b9e\u73b0\u5b9a\u65f6\u8dd1\u811a\u672c\u4efb\u52a1\uff0c\u6682\u4e0d\u652f\u6301\u65e5\u4e0e\u6708\u7684\u65f6\u95f4\u8868\u8fbe\uff0c\u9ed8\u8ba4\u4e3a* |\n| 0.0.2.5 | \u4f18\u5316\u5b9a\u65f6\u5668\uff0c\u5b9e\u65f6\u5c55\u793a\u8fd0\u884c\u7ed3\u679c |\n| 0.0.2.6 | \u4f18\u5316\u5b9a\u65f6\u5668\uff0c\u70b9\u51fb\u9009\u62e9\u6d4b\u8bd5\u811a\u672c\u76ee\u5f55 |\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "jicaiauto\u662f\u5bf9\u81ea\u52a8\u5316\u6846\u67b6\u7684\u7b2c\u4e09\u6b21\u66f4\u65b0\uff0c\u529f\u80fd\u8986\u76d6UI\u81ea\u52a8\u5316\u4e0eAPI\u81ea\u52a8\u5316\u610f\u5728\u5e2e\u52a9\u5bf9\u81ea\u52a8\u5316\u6709\u66f4\u591a\u9700\u6c42\u4e14\u8fc7\u591a\u65f6\u95f4\u5199\u4ee3\u7801\u7684\u4eba\u7fa4\uff0c\u8ba9\u5927\u5bb6\u7684\u65f6\u95f4\u82b1\u5728\u4e1a\u52a1\u7684\u5b9e\u73b0\u4e0a",
    "version": "0.0.2.6",
    "split_keywords": [
        "jicai",
        "auto",
        "jicaiauto",
        "automation",
        "test",
        "framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "1fdcd706651faa7b71f6ae55ff46c190",
                "sha256": "f4a818e10a93b22ce8d7ee15f4728f29490b06b3b4e4273b674981d9bfa50505"
            },
            "downloads": -1,
            "filename": "jicaiauto-0.0.2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1fdcd706651faa7b71f6ae55ff46c190",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 32154,
            "upload_time": "2020-07-22T12:20:28",
            "upload_time_iso_8601": "2020-07-22T12:20:28.449774Z",
            "url": "https://files.pythonhosted.org/packages/c3/62/75b3b28e8bb909d21a72e639a32ee1d6de3fac6a367fa104af2611fc5350/jicaiauto-0.0.2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "19ca708f5205e0e62089044422719321",
                "sha256": "850fab0fbc1b94ca6813d4f2d09a8d2d8b3e34eeb559ec19fe7d574ebf235a94"
            },
            "downloads": -1,
            "filename": "jicaiauto-0.0.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "19ca708f5205e0e62089044422719321",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 19350,
            "upload_time": "2020-07-22T12:20:29",
            "upload_time_iso_8601": "2020-07-22T12:20:29.658896Z",
            "url": "https://files.pythonhosted.org/packages/2e/cf/f56e138a8de8b5e89630726091a8f6fd2f8fd67f335e73a6b829a6f4a960/jicaiauto-0.0.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-07-22 12:20:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "jicaiyunshang",
    "error": "Could not fetch GitHub repository",
    "lcname": "jicaiauto"
}
        
Elapsed time: 0.15823s