新增用例:删除项目,修改用户手机号,修改用户密码,修改用户邮箱

This commit is contained in:
floraachy
2023-12-13 17:44:13 +08:00
parent 3c713a1ed3
commit 9db52bf23b
19 changed files with 519 additions and 63 deletions

View File

@@ -0,0 +1,40 @@
case_common:
allure_epic: GitLink接口
allure_feature: 开源项目模块
allure_story: 项目
case_markers:
- gitlink
- projects
- gitea
- delete_project
- usefixtures: new_project
case_info:
-
id: gitlink_projects_delete_project_01
title: 删除项目
severity: critical
run: True
url: /api/${repo_owner}/${repo_identifier}.json
method: DELETE
headers:
Content-Type: application/json; charset=utf-8;
Authorization: ${token_type} ${access_token}
cookies:
request_type: json
payload:
files:
extract:
assert_response:
status_code: 200
assert_status:
message: 断言接口status=0
expect_value: 0
assert_type: ==
type_jsonpath: $.status
assert_message:
message: 断言接口message=success
expect_value: success
assert_type: ==
type_jsonpath: $.message
assert_sql:

View File

@@ -22,7 +22,7 @@ case_info:
request_type: params
payload:
files:
extract:
assert_response:
status_code: 200
assert_sql:
assert_sql:
extract:

View File

@@ -5,8 +5,11 @@ case_common:
allure_story: 项目 # 故事可以理解为场景相当于method级的标签, 往下是 title
case_markers:
- gitlink
- projects
- gitea
- new_project
- usefixtures: gitlink_login
- usefixtures: get_oauth_token
- usefixtures: delete_project
# 用例数据
case_info:
@@ -19,7 +22,7 @@ case_info:
method: POST
headers:
Content-Type: application/json; charset=utf-8;
cookies: ${cookies}
Authorization: ${token_type} ${access_token}
cookies:
request_type: json
payload:
@@ -27,11 +30,6 @@ case_info:
name: ${generate_name(lan='zh')}_${generate_identifier()}
repository_name: ${generate_identifier()}
files:
extract:
type_jsonpath:
project_id: $.id
project_name: $.name
project_identifier: $.identifier
assert_response:
status_code: 200
login:
@@ -40,6 +38,12 @@ case_info:
assert_type: ==
type_jsonpath: $.login
assert_sql:
extract:
type_jsonpath:
repo_id: $.id
repo_name: $.name
repo_owner: $.login
repo_identifier: $.identifier
-
id: gitlink_projects_new_project_02
@@ -74,11 +78,6 @@ case_info:
blockchain_init_token:
auth_password:
files:
extract:
type_jsonpath:
project_id: $.id
project_name: $.name
project_identifier: $.identifier
assert_response:
status_code: 200
login:
@@ -87,6 +86,12 @@ case_info:
assert_type: ==
type_jsonpath: $.login
assert_sql:
extract:
type_jsonpath:
repo_id: $.id
repo_name: $.name
repo_owner: $.login
repo_identifier: $.identifier
-
id: gitlink_projects_new_project_03
@@ -104,11 +109,6 @@ case_info:
name: ${generate_name(lan='zh')}_${generate_identifier()}
repository_name: ${generate_identifier()}
files:
extract:
type_re:
project_id: $.id
project_name: $.name
project_identifier: $.identifier
assert_response:
status_code: 200
login:
@@ -121,4 +121,10 @@ case_info:
sql: select id,`name`, identifier from projects where user_id=${user_id} ORDER BY created_on DESC;
$.id: ${project_id}
$.name: ${project_name}
$.identifier: ${project_identifier}
$.identifier: ${project_identifier}
extract:
type_jsonpath:
repo_id: $.id
repo_name: $.name
repo_owner: $.login
repo_identifier: $.identifier

View File

@@ -23,9 +23,9 @@ case_info:
request_type: file
payload:
files: TOC出库订单导入模板(2).xlsx
extract:
type_jsonpath:
file_id: $.id
assert_response:
status_code: 200
assert_sql:
extract:
type_jsonpath:
file_id: $.id