httprunner 4.x学习 - 13 upload 文件上传
前言
HttpRunner4.x 集成了 requests_toolbelt,可以使用内置 upload 关键字来上传文件相关操作。
环境准备
需额外安装2个依赖包
pip install requests-toolbelt filetype
config: name: file teststeps: - name: upload file request: url: http://120.25.121.168:19001/api/upload method: POST upload: file: data/imos测试平台.jpg title: "imos测试平台" validate: - eq: [body.code, 0]