Files
apiautotest/data/gitlink/test_upload_files.yaml
floraachy a01db401bf 调整响应数据提取,支持通过yaml用例数据传参提取指定格式的参数
支持3种类型的数据提取:1. 通过jsonpath从response.json()提取数据; 2. 通过正则表达式从response.text提取; 3. 直接从response提取cookies之类;
2023-12-05 14:02:27 +08:00

34 lines
592 B
YAML

# 公共参数
case_common:
allure_epic: GitLink接口
allure_feature: 上传文件模块
allure_story: 上传文件
case_markers:
- gitlink
- upload_file
- usefixtures: login_init
# 用例数据
case_info:
-
id: case_upload_file_01
title: 测试单文件上传
severity:
run: True
url: /api/attachments.json
method: POST
headers:
cookies: ${login_cookie}
cookies:
request_type: file
payload:
files: TOC出库订单导入模板(2).xlsx
extract:
type_json:
file_id: $.id
assert_response:
eq:
http_code: 200
assert_sql: