HTTPRunner 3 用户手册 (1) 安装部署

2020-06-24  本文已影响0人  猫与测试

HttpRunner 使用 Python 开发,它支持Python 3.6+ 和大多数操作系统。
在 GitHub-Actions 上连续测试了 Python 3.6/3.7/3.8macOS/Linux/Windows 的组合。

安装

HttpRunner 已发布到 PyPI 仓库,可以使用 pip 直接安装.

$ pip3 install httprunner

如果要使用最新版本,可以使用 github 仓库的 URL 安装。

$ pip3 install git+https://github.com/httprunner/httprunner.git@master

如果已经安装过,可以使用 -U 进行升级。

$ pip3 install -U httprunner
$ pip3 install -U git+https://github.com/httprunner/httprunner.git@master

检查是否安装成功

如果 HttpRunner 安装成功,有 4 个命令可用:

查看 HttpRunner 版本:

$ httprunner -V  # hrun -V
3.1.0

查看所有可用的命令:

$ httprunner -h
usage: httprunner [-h] [-V] {run,startproject,har2case,make} ...

One-stop solution for HTTP(S) testing.

positional arguments:
  {run,startproject,har2case,make}
                        sub-command help
    run                 Make HttpRunner testcases and run with pytest.
    startproject        Create a new project with template structure.
    har2case            Convert HAR(HTTP Archive) to YAML/JSON testcases for
                        HttpRunner.
    make                Convert YAML/JSON testcases to pytest cases.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show version
上一篇 下一篇

猜你喜欢

热点阅读