接口自动化HttpRunner安装

目的:接口自动化测试

httprunner 适用于macOS windows Linux

 https://pypi.org/project/httprunner/

 环境:macOS 10.12

前提条件:已安装python3.7

(需要先检验是否安装了pip,如果安装的是python3.4版本以上的,就不需要重新安装)

python3 安装

pycharm安装

 httprunner3,要求python>=3.6,<4.0

安装升级:

如果之前有安装过HttpRunner,现在需要升级到最新版本,可以使用-U参数

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

1.pip3 install httprunner

 

httprunner 3要求 pytest5.4.2以上 (验证版本:pip3 show pytest)

2.安装成功验证

cmd 输入 hrun -V 

输入har2case -V

一般安装完httpruuner,会自带har2case,如果没有,则需要安装

pip3 install har2case==0.3.1

或者 pip3 install har2case

验证版本

 

原文地址:https://www.cnblogs.com/may18/p/12483161.html