HttpRunner是一款面向HTTP(S)协议的通用测试性架,只需要维护一份YAML/JSON 脚本,
即可实现自动化测试、性能测试、线上监控、持续集成等多种测试需求。
Github: https://github.com/HttpRunner/HttpRunnerpip
安装: pip install httprunner==1.5.8
如果安装包,则 pip install --ignore-installed PyYAML
文档: https://cn.httprunner.org
示例 :
[{"test": {"name": "test hello name","request": {"url": "http://127.0.0.1:5000/user/tom","method": "GET"},"validate": [{"eq": ["content.code",10200]},{"eq": ["content.message","hello, tom"]}]}}]
总结
HttpRunner会把配置文件转换成pytest格式
content为响应。
