mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-07 00:39:34 +08:00
@@ -21,24 +21,24 @@
|
|||||||
|
|
||||||
## Key Features
|
## Key Features
|
||||||
|
|
||||||
- Inherit all powerful features of [`requests`][requests], just have fun to handle HTTP(S) in human way.
|
- [x] Inherit all powerful features of [`requests`][requests], just have fun to handle HTTP(S) in human way.
|
||||||
- Define testcase in YAML or JSON format, run with [`pytest`][pytest] in concise and elegant manner.
|
- [x] Define testcase in YAML or JSON format, run with [`pytest`][pytest] in concise and elegant manner.
|
||||||
- Record and generate testcases with [`HAR`][HAR] support.
|
- [x] Record and generate testcases with [`HAR`][HAR] support.
|
||||||
- Supports `variables`/`extract`/`validate`/`hooks` mechanisms to create extremely complex test scenarios.
|
- [x] Supports `variables`/`extract`/`validate`/`hooks` mechanisms to create extremely complex test scenarios.
|
||||||
- With `debugtalk.py` plugin, any function can be used in any part of your testcase.
|
- [x] With `debugtalk.py` plugin, any function can be used in any part of your testcase.
|
||||||
- With [`jmespath`][jmespath], extract and validate json response has never been easier.
|
- [x] With [`jmespath`][jmespath], extract and validate json response has never been easier.
|
||||||
- With [`pytest`][pytest], hundreds of plugins are readily available.
|
- [x] With [`pytest`][pytest], hundreds of plugins are readily available.
|
||||||
- With [`allure`][allure], test report can be pretty nice and powerful.
|
- [x] With [`allure`][allure], test report can be pretty nice and powerful.
|
||||||
- With reuse of [`locust`][locust], you can run performance test without extra work.
|
- [x] With reuse of [`locust`][locust], you can run performance test without extra work.
|
||||||
- CLI command supported, perfect combination with `CI/CD`.
|
- [x] CLI command supported, perfect combination with `CI/CD`.
|
||||||
|
|
||||||
## Sponsors
|
## Sponsors
|
||||||
|
|
||||||
Thank you to all our sponsors! ✨🍰✨ ([become a sponsor](docs/sponsors.md))
|
Thank you to all our sponsors! ✨🍰✨ ([become a sponsor](sponsors.md))
|
||||||
|
|
||||||
### 金牌赞助商(Gold Sponsor)
|
### 金牌赞助商(Gold Sponsor)
|
||||||
|
|
||||||
[<img src="docs/assets/hogwarts.jpeg" alt="霍格沃兹测试学院" width="500">](https://ceshiren.com/)
|
[<img src="assets/hogwarts.jpeg" alt="霍格沃兹测试开发学社" width="400">](https://ceshiren.com/)
|
||||||
|
|
||||||
> [霍格沃兹测试开发学社](http://qrcode.testing-studio.com/f?from=httprunner&url=https://ceshiren.com)是业界领先的测试开发技术高端教育品牌,隶属于[测吧(北京)科技有限公司](http://qrcode.testing-studio.com/f?from=httprunner&url=https://www.testing-studio.com) 。学院课程由一线大厂测试经理与资深测试开发专家参与研发,实战驱动。课程涵盖 web/app 自动化测试、接口测试、性能测试、安全测试、持续集成/持续交付/DevOps,测试左移&右移、精准测试、测试平台开发、测试管理等内容,帮助测试工程师实现测试开发技术转型。通过优秀的学社制度(奖学金、内推返学费、行业竞赛等多种方式)来实现学员、学社及用人企业的三方共赢。
|
> [霍格沃兹测试开发学社](http://qrcode.testing-studio.com/f?from=httprunner&url=https://ceshiren.com)是业界领先的测试开发技术高端教育品牌,隶属于[测吧(北京)科技有限公司](http://qrcode.testing-studio.com/f?from=httprunner&url=https://www.testing-studio.com) 。学院课程由一线大厂测试经理与资深测试开发专家参与研发,实战驱动。课程涵盖 web/app 自动化测试、接口测试、性能测试、安全测试、持续集成/持续交付/DevOps,测试左移&右移、精准测试、测试平台开发、测试管理等内容,帮助测试工程师实现测试开发技术转型。通过优秀的学社制度(奖学金、内推返学费、行业竞赛等多种方式)来实现学员、学社及用人企业的三方共赢。
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ Thank you to all our sponsors! ✨🍰✨ ([become a sponsor](docs/sponsors.md))
|
|||||||
|
|
||||||
### 开源服务赞助商(Open Source Sponsor)
|
### 开源服务赞助商(Open Source Sponsor)
|
||||||
|
|
||||||
[<img src="docs/assets/sentry-logo-black.svg" alt="Sentry" width="150">](https://sentry.io/_/open-source/)
|
[<img src="assets/sentry-logo-black.svg" alt="Sentry" width="150">](https://sentry.io/_/open-source/)
|
||||||
|
|
||||||
HttpRunner is in Sentry Sponsored plan.
|
HttpRunner is in Sentry Sponsored plan.
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ HttpRunner is in Sentry Sponsored plan.
|
|||||||
|
|
||||||
关注 HttpRunner 的微信公众号,第一时间获得最新资讯。
|
关注 HttpRunner 的微信公众号,第一时间获得最新资讯。
|
||||||
|
|
||||||

|
<img src="assets/qrcode.jpg" alt="HttpRunner" width="200">
|
||||||
|
|
||||||
[requests]: http://docs.python-requests.org/en/master/
|
[requests]: http://docs.python-requests.org/en/master/
|
||||||
[pytest]: https://docs.pytest.org/
|
[pytest]: https://docs.pytest.org/
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
|
|
||||||
# HttpRunner
|
|
||||||
|
|
||||||
[](https://pepy.tech/project/httprunner)
|
|
||||||
[](https://github.com/httprunner/httprunner/actions)
|
|
||||||
[](https://github.com/httprunner/httprunner/actions)
|
|
||||||
[](https://codecov.io/gh/httprunner/httprunner)
|
|
||||||
[](https://pypi.python.org/pypi/httprunner)
|
|
||||||
[](https://pypi.python.org/pypi/httprunner)
|
|
||||||
[](https://testerhome.com/github_statistics)
|
|
||||||
|
|
||||||
*HttpRunner* is a simple & elegant, yet powerful HTTP(S) testing framework. Enjoy! ✨ 🚀 ✨
|
|
||||||
|
|
||||||
> This docs site is corresponding to the latest version `3.x`, for `2.x` you can reference [`archive link`](https://v2.httprunner.org/).
|
|
||||||
|
|
||||||
## Design Philosophy
|
|
||||||
|
|
||||||
- Convention over configuration
|
|
||||||
- ROI matters
|
|
||||||
- Embrace open source, leverage [`requests`][requests], [`pytest`][pytest], [`pydantic`][pydantic], [`allure`][allure] and [`locust`][locust].
|
|
||||||
|
|
||||||
## Key Features
|
|
||||||
|
|
||||||
- Inherit all powerful features of [`requests`][requests], just have fun to handle HTTP(S) in human way.
|
|
||||||
- Define testcase in YAML or JSON format, run with [`pytest`][pytest] in concise and elegant manner.
|
|
||||||
- Record and generate testcases with [`HAR`][HAR] support.
|
|
||||||
- Supports `variables`/`extract`/`validate`/`hooks` mechanisms to create extremely complex test scenarios.
|
|
||||||
- With `debugtalk.py` plugin, any function can be used in any part of your testcase.
|
|
||||||
- With [`jmespath`][jmespath], extract and validate json response has never been easier.
|
|
||||||
- With [`pytest`][pytest], hundreds of plugins are readily available.
|
|
||||||
- With [`allure`][allure], test report can be pretty nice and powerful.
|
|
||||||
- With reuse of [`locust`][locust], you can run performance test without extra work.
|
|
||||||
- CLI command supported, perfect combination with `CI/CD`.
|
|
||||||
|
|
||||||
## Subscribe
|
|
||||||
|
|
||||||
关注 HttpRunner 的微信公众号,第一时间获得最新资讯。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
[requests]: http://docs.python-requests.org/en/master/
|
|
||||||
[pytest]: https://docs.pytest.org/
|
|
||||||
[pydantic]: https://pydantic-docs.helpmanual.io/
|
|
||||||
[locust]: http://locust.io/
|
|
||||||
[jmespath]: https://jmespath.org/
|
|
||||||
[allure]: https://docs.qameta.io/allure/
|
|
||||||
[HAR]: http://httparchive.org/
|
|
||||||
@@ -15,7 +15,7 @@ If you want to keep up with the latest version, you can install with github repo
|
|||||||
$ pip3 install git+https://github.com/httprunner/httprunner.git@master
|
$ pip3 install git+https://github.com/httprunner/httprunner.git@master
|
||||||
```
|
```
|
||||||
|
|
||||||
If you have installed `HttpRunner` before and want to upgrade to the latest version, you can use the `-U` option.
|
If you have installed `HttpRunner` before and want to upgrade to the latest version, you can use the `-U` option.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ pip3 install -U httprunner
|
$ pip3 install -U httprunner
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
## 金牌赞助商(Gold Sponsor)
|
## 金牌赞助商(Gold Sponsor)
|
||||||
|
|
||||||
[<img src="https://raw.githubusercontent.com/httprunner/httprunner/master/docs/assets/hogwarts.jpeg" alt="霍格沃兹测试学院" width="500">](https://ceshiren.com/)
|
[<img src="https://raw.githubusercontent.com/httprunner/httprunner/master/docs/assets/hogwarts.jpeg" alt="霍格沃兹测试开发学社" width="400">](https://ceshiren.com/)
|
||||||
|
|
||||||
> [霍格沃兹测试开发学社](http://qrcode.testing-studio.com/f?from=httprunner&url=https://ceshiren.com)是业界领先的测试开发技术高端教育品牌,隶属于[测吧(北京)科技有限公司](http://qrcode.testing-studio.com/f?from=httprunner&url=https://www.testing-studio.com) 。学院课程由一线大厂测试经理与资深测试开发专家参与研发,实战驱动。课程涵盖 web/app 自动化测试、接口测试、性能测试、安全测试、持续集成/持续交付/DevOps,测试左移&右移、精准测试、测试平台开发、测试管理等内容,帮助测试工程师实现测试开发技术转型。通过优秀的学社制度(奖学金、内推返学费、行业竞赛等多种方式)来实现学员、学社及用人企业的三方共赢。
|
> [霍格沃兹测试开发学社](http://qrcode.testing-studio.com/f?from=httprunner&url=https://ceshiren.com)是业界领先的测试开发技术高端教育品牌,隶属于[测吧(北京)科技有限公司](http://qrcode.testing-studio.com/f?from=httprunner&url=https://www.testing-studio.com) 。学院课程由一线大厂测试经理与资深测试开发专家参与研发,实战驱动。课程涵盖 web/app 自动化测试、接口测试、性能测试、安全测试、持续集成/持续交付/DevOps,测试左移&右移、精准测试、测试平台开发、测试管理等内容,帮助测试工程师实现测试开发技术转型。通过优秀的学社制度(奖学金、内推返学费、行业竞赛等多种方式)来实现学员、学社及用人企业的三方共赢。
|
||||||
|
|
||||||
@@ -23,4 +23,4 @@ HttpRunner is in Sentry Sponsored plan.
|
|||||||
| 等级 | 金牌赞助商<br/>(Gold Sponsor) | 银牌赞助商<br/>(Silver Sponsor)| 个人赞赏 |
|
| 等级 | 金牌赞助商<br/>(Gold Sponsor) | 银牌赞助商<br/>(Silver Sponsor)| 个人赞赏 |
|
||||||
|:---:|:---:|:---:|:---:|
|
|:---:|:---:|:---:|:---:|
|
||||||
| 金额 | ¥20000/年 | ¥8000/年 | 任意 |
|
| 金额 | ¥20000/年 | ¥8000/年 | 任意 |
|
||||||
| 权益 | 公司 logo(大)和链接展示在 README.md<br/>150 字的宣传文案 | 公司 logo(中)和链接展示在 README.md<br/>50 字的宣传文案| 个人 ID 和链接展示在 sponsors.md |
|
| 权益 | 公司 logo(大)和链接展示在 README.md<br/>200 字的宣传文案 | 公司 logo(中)和链接展示在 README.md<br/>80 字的宣传文案| 个人 ID 和链接展示在 sponsors.md |
|
||||||
|
|||||||
@@ -450,4 +450,4 @@ def convert_relative_project_root_dir(abs_path: Text) -> Text:
|
|||||||
f"project_meta.RootDir: {_project_meta.RootDir}"
|
f"project_meta.RootDir: {_project_meta.RootDir}"
|
||||||
)
|
)
|
||||||
|
|
||||||
return abs_path[len(_project_meta.RootDir) + 1 :]
|
return abs_path[len(_project_meta.RootDir) + 1:]
|
||||||
|
|||||||
@@ -80,10 +80,10 @@ if __name__ == "__main__":
|
|||||||
def __ensure_absolute(path: Text) -> Text:
|
def __ensure_absolute(path: Text) -> Text:
|
||||||
if path.startswith("./"):
|
if path.startswith("./"):
|
||||||
# Linux/Darwin, hrun ./test.yml
|
# Linux/Darwin, hrun ./test.yml
|
||||||
path = path[len("./") :]
|
path = path[len("./"):]
|
||||||
elif path.startswith(".\\"):
|
elif path.startswith(".\\"):
|
||||||
# Windows, hrun .\\test.yml
|
# Windows, hrun .\\test.yml
|
||||||
path = path[len(".\\") :]
|
path = path[len(".\\"):]
|
||||||
|
|
||||||
path = ensure_path_sep(path)
|
path = ensure_path_sep(path)
|
||||||
project_meta = load_project_meta(path)
|
project_meta = load_project_meta(path)
|
||||||
@@ -173,7 +173,7 @@ def format_pytest_with_black(*python_paths: Text) -> NoReturn:
|
|||||||
subprocess.run(["black", *python_paths])
|
subprocess.run(["black", *python_paths])
|
||||||
else:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"this system does not support multiprocessing well, format files one by one ..."
|
"this system does not support multiprocessing well, format files one by one ..."
|
||||||
)
|
)
|
||||||
[subprocess.run(["black", path]) for path in python_paths]
|
[subprocess.run(["black", path]) for path in python_paths]
|
||||||
except subprocess.CalledProcessError as ex:
|
except subprocess.CalledProcessError as ex:
|
||||||
|
|||||||
18
mkdocs.yml
18
mkdocs.yml
@@ -1,6 +1,5 @@
|
|||||||
# install mkdocs
|
# install mkdocs and material design
|
||||||
# $ pip install mkdocs # 1.1.2
|
# $ pip install mkdocs-material
|
||||||
# $ pip install mkdocs-material # 5.2.2
|
|
||||||
|
|
||||||
# usage
|
# usage
|
||||||
# $ mkdocs serve # build docs and preview
|
# $ mkdocs serve # build docs and preview
|
||||||
@@ -30,11 +29,6 @@ theme:
|
|||||||
text: 'Roboto'
|
text: 'Roboto'
|
||||||
code: 'Roboto Mono'
|
code: 'Roboto Mono'
|
||||||
|
|
||||||
# Google Analytics
|
|
||||||
google_analytics:
|
|
||||||
- 'UA-114587036-3'
|
|
||||||
- 'auto'
|
|
||||||
|
|
||||||
# Extensions
|
# Extensions
|
||||||
markdown_extensions:
|
markdown_extensions:
|
||||||
- admonition
|
- admonition
|
||||||
@@ -42,6 +36,9 @@ markdown_extensions:
|
|||||||
guess_lang: false
|
guess_lang: false
|
||||||
- toc:
|
- toc:
|
||||||
permalink: true
|
permalink: true
|
||||||
|
- def_list
|
||||||
|
- pymdownx.tasklist:
|
||||||
|
custom_checkbox: true
|
||||||
|
|
||||||
# extra
|
# extra
|
||||||
extra:
|
extra:
|
||||||
@@ -52,10 +49,13 @@ extra:
|
|||||||
link: https://debugtalk.com
|
link: https://debugtalk.com
|
||||||
- icon: fontawesome/brands/github-alt
|
- icon: fontawesome/brands/github-alt
|
||||||
link: 'https://github.com/httprunner'
|
link: 'https://github.com/httprunner'
|
||||||
|
analytics:
|
||||||
|
provider: google # Google Analytics
|
||||||
|
property: UA-114587036-3
|
||||||
|
|
||||||
# index pages
|
# index pages
|
||||||
nav:
|
nav:
|
||||||
- Introduction: index.md
|
- README: README.md
|
||||||
- Installation: installation.md
|
- Installation: installation.md
|
||||||
- User Guide:
|
- User Guide:
|
||||||
- Concepts: user/concepts.md
|
- Concepts: user/concepts.md
|
||||||
|
|||||||
Reference in New Issue
Block a user