70 lines
1.6 KiB
YAML
70 lines
1.6 KiB
YAML
# 公共参数
|
|
case_common:
|
|
allure_epic: GitLink接口
|
|
allure_feature: 登录模块
|
|
allure_story: 登录接口
|
|
case_markers:
|
|
- gitlink
|
|
- login: 登录接口
|
|
|
|
# 用例数据
|
|
case_info:
|
|
-
|
|
id: gitlink_login_oauth_token_01
|
|
title: 用户登录(密码模式)
|
|
run: True
|
|
severity: normal
|
|
url: /oauth/token
|
|
method: POST
|
|
headers:
|
|
Content-Type: application/json; charset=utf-8;
|
|
cookies:
|
|
request_type: json
|
|
payload:
|
|
grant_type: password
|
|
username: ${login}
|
|
password: ${password}
|
|
client_id: ${client_id}
|
|
client_secret: ${client_secret}
|
|
files:
|
|
assert_response:
|
|
status_code: 200
|
|
access_token_in_response:
|
|
message: 断言接口返回中存在access_token字段
|
|
expect_value: access_token
|
|
assert_type: contains
|
|
assert_sql:
|
|
extract:
|
|
type_jsonpath:
|
|
access_token: $.access_token
|
|
token_type: $.token_type
|
|
token_expires_in: $.expires_in
|
|
|
|
-
|
|
id: gitlink_login_oauth_token_02
|
|
title: 用户登录(客户端模式)
|
|
run: True
|
|
severity: normal
|
|
url: /oauth/token
|
|
method: POST
|
|
headers:
|
|
Content-Type: application/json; charset=utf-8;
|
|
cookies:
|
|
request_type: json
|
|
payload:
|
|
grant_type: client_credentials
|
|
client_id: ${client_id}
|
|
client_secret: ${client_secret}
|
|
files:
|
|
assert_response:
|
|
status_code: 200
|
|
access_token_in_response:
|
|
message: 断言接口返回中存在access_token字段
|
|
expect_value: access_token
|
|
assert_type: contains
|
|
assert_sql:
|
|
extract:
|
|
type_jsonpath:
|
|
access_token: $.access_token
|
|
token_type: $.token_type
|
|
token_expires_in: $.expires_in |