excel-runner


Nameexcel-runner JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/hanzhichao/excel-runner
SummaryExcel http api test
upload_time2024-09-04 04:07:36
maintainerNone
docs_urlNone
authorHan Zhichao
requires_python>=3.6
licenseMIT license
keywords excel runner excel http runner excel http test excel api test
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # excel-runner

Run Http requests list in excel sheet



## how to use

Install excel-runner v0.1.2

```shell
pip install excel-runner==0.1.2
```


Create excel data file data.xlsx

| name      | method | url                                                                | data                        | headers                                         | verify                                                         | result |
| --------- | ------ | ------------------------------------------------------------------ | --------------------------- | ----------------------------------------------- | -------------------------------------------------------------- | ------ |
| get请求     | get    | [https://httpbin.org/get?a=1&b=2](https://httpbin.org/get?a=1&b=2) |                             |                                                 | res.status_code==200                                           |        |
| post-form | post   | [https://httpbin.org/post](https://httpbin.org/post)               | name=Kevin&age=1            | Content-Type: application/x-www-form-urlencoded | res.status_code==200  <br>res.json()['form']['name']=='Kevin'] |        |
| post-json | post   | [https://httpbin.org/post](https://httpbin.org/post)               | {"name": "Kevin", "age": 1} | Content-Type: application/json                  |                                                                |        |
| post-xml  | post   | [https://httpbin.org/post](https://httpbin.org/post)               | <xml>hello</xml>            | Content-Type: application/xml                   | result.json()["data"]=="<xml>hello</xml>"                      |        |

Run excel data file

```python
from excel_runner import run_excel

run_excel('data.xlsx')

```

Open data.xlsx again, you will see the test result


| name      | method | url                                                                | data                        | headers                                         | verify                                                         | result |
| --------- | ------ | ------------------------------------------------------------------ | --------------------------- | ----------------------------------------------- | -------------------------------------------------------------- |--------|
| get请求     | get    | [https://httpbin.org/get?a=1&b=2](https://httpbin.org/get?a=1&b=2) |                             |                                                 | res.status_code==200                                           | PASS   |
| post-form | post   | [https://httpbin.org/post](https://httpbin.org/post)               | name=Kevin&age=1            | Content-Type: application/x-www-form-urlencoded | res.status_code==200  <br>res.json()['form']['name']=='Kevin'] |    PASS    |
| post-json | post   | [https://httpbin.org/post](https://httpbin.org/post)               | {"name": "Kevin", "age": 1} | Content-Type: application/json                  |                                                                |PASS|
| post-xml  | post   | [https://httpbin.org/post](https://httpbin.org/post)               | <xml>hello</xml>            | Content-Type: application/xml                   | result.json()["data"]=="<xml>hello</xml>"                      |PASS|


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hanzhichao/excel-runner",
    "name": "excel-runner",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "excel runner, excel http runner, excel http test, excel api test",
    "author": "Han Zhichao",
    "author_email": "superhin@126.com",
    "download_url": "https://files.pythonhosted.org/packages/1b/e9/28777b9140b6d5f075a4de02085edf19aba273d71da7fe64dec9964cb509/excel_runner-0.1.2.tar.gz",
    "platform": null,
    "description": "# excel-runner\n\nRun Http requests list in excel sheet\n\n\n\n## how to use\n\nInstall excel-runner v0.1.2\n\n```shell\npip install excel-runner==0.1.2\n```\n\n\nCreate excel data file data.xlsx\n\n| name      | method | url                                                                | data                        | headers                                         | verify                                                         | result |\n| --------- | ------ | ------------------------------------------------------------------ | --------------------------- | ----------------------------------------------- | -------------------------------------------------------------- | ------ |\n| get\u8bf7\u6c42     | get    | [https://httpbin.org/get?a=1&b=2](https://httpbin.org/get?a=1&b=2) |                             |                                                 | res.status_code==200                                           |        |\n| post-form | post   | [https://httpbin.org/post](https://httpbin.org/post)               | name=Kevin&age=1            | Content-Type: application/x-www-form-urlencoded | res.status_code==200  <br>res.json()['form']['name']=='Kevin'] |        |\n| post-json | post   | [https://httpbin.org/post](https://httpbin.org/post)               | {\"name\": \"Kevin\", \"age\": 1} | Content-Type: application/json                  |                                                                |        |\n| post-xml  | post   | [https://httpbin.org/post](https://httpbin.org/post)               | <xml>hello</xml>            | Content-Type: application/xml                   | result.json()[\"data\"]==\"<xml>hello</xml>\"                      |        |\n\nRun excel data file\n\n```python\nfrom excel_runner import run_excel\n\nrun_excel('data.xlsx')\n\n```\n\nOpen data.xlsx again, you will see the test result\n\n\n| name      | method | url                                                                | data                        | headers                                         | verify                                                         | result |\n| --------- | ------ | ------------------------------------------------------------------ | --------------------------- | ----------------------------------------------- | -------------------------------------------------------------- |--------|\n| get\u8bf7\u6c42     | get    | [https://httpbin.org/get?a=1&b=2](https://httpbin.org/get?a=1&b=2) |                             |                                                 | res.status_code==200                                           | PASS   |\n| post-form | post   | [https://httpbin.org/post](https://httpbin.org/post)               | name=Kevin&age=1            | Content-Type: application/x-www-form-urlencoded | res.status_code==200  <br>res.json()['form']['name']=='Kevin'] |    PASS    |\n| post-json | post   | [https://httpbin.org/post](https://httpbin.org/post)               | {\"name\": \"Kevin\", \"age\": 1} | Content-Type: application/json                  |                                                                |PASS|\n| post-xml  | post   | [https://httpbin.org/post](https://httpbin.org/post)               | <xml>hello</xml>            | Content-Type: application/xml                   | result.json()[\"data\"]==\"<xml>hello</xml>\"                      |PASS|\n\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Excel http api test",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/hanzhichao/excel-runner"
    },
    "split_keywords": [
        "excel runner",
        " excel http runner",
        " excel http test",
        " excel api test"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1be928777b9140b6d5f075a4de02085edf19aba273d71da7fe64dec9964cb509",
                "md5": "793acb597caff1051a3e13db106010f8",
                "sha256": "9425f40c0e8435e747209fe7de2a5b409c4d8425000240803996d6904c24868c"
            },
            "downloads": -1,
            "filename": "excel_runner-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "793acb597caff1051a3e13db106010f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11729,
            "upload_time": "2024-09-04T04:07:36",
            "upload_time_iso_8601": "2024-09-04T04:07:36.362471Z",
            "url": "https://files.pythonhosted.org/packages/1b/e9/28777b9140b6d5f075a4de02085edf19aba273d71da7fe64dec9964cb509/excel_runner-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-04 04:07:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hanzhichao",
    "github_project": "excel-runner",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "excel-runner"
}
        
Elapsed time: 0.34321s