调整项目为demo仓库
This commit is contained in:
@@ -1,44 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 组织
|
||||
case_markers:
|
||||
- gitlink
|
||||
- organization
|
||||
- gitea
|
||||
- delete_organization
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_delete_organization_01
|
||||
title: 删除组织
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/organizations/${org_id}.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
password: ${env_password} # 用户登录密码
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言响应message=success
|
||||
assert_type: ==
|
||||
expect_value: success
|
||||
type_jsonpath: $.message
|
||||
assertStatus:
|
||||
message: 断言响应status=0
|
||||
assert_type: ==
|
||||
expect_value: 0
|
||||
type_jsonpath: $.status
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface: gitlink_new_organization_01
|
||||
@@ -1,42 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 组织
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- organization
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_organization_detail_01
|
||||
title: 获取组织详情,获取成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/organizations/${org_identifier}.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_id_in_response:
|
||||
message: 断言接口返回的组织标识
|
||||
assert_type: ==
|
||||
expect_value: ${org_identifier}
|
||||
type_jsonpath: $.name
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 新建组织
|
||||
interface: gitlink_new_organization_01
|
||||
teardown:
|
||||
# 删除组织
|
||||
interface: gitlink_delete_organization_01
|
||||
@@ -1,48 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 组织
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_new_organization_01
|
||||
title: 新建组织
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/organizations.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${generate_identifier()}_test # 组织标识
|
||||
nickname: ${generate_words()} # 组织名称
|
||||
description: ${generate_words()} # 组织描述
|
||||
location: ${generate_city(lan='zh', full=False)} # 组织地区
|
||||
repo_admin_change_team_access: true # 项目管理员可以添加或移除团队的访问权限
|
||||
image: data:image/png;base64,${get_file_content('gitlinklogo3.jpg')} # 组织图片, 二进制
|
||||
visibility: common # 组织可见性,默认值common
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_id_in_response:
|
||||
message: 断言响应数据中存在id字段
|
||||
assert_type: contains
|
||||
expect_value: id
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
org_id: $.id
|
||||
org_identifier: $.name
|
||||
org_name: $.nickname
|
||||
case_dependence:
|
||||
teardown:
|
||||
# 删除组织
|
||||
interface: gitlink_delete_organization_01
|
||||
@@ -1,66 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 项目主页
|
||||
case_markers:
|
||||
- gitlink
|
||||
- project
|
||||
- about
|
||||
|
||||
# 仅仓库管理员才能编辑项目主页
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_about_detail_01
|
||||
title: 仓库管理员编辑项目主页内容
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/about.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${admin_cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
content: ${generate_paragraph(nb=10)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响返回的项目标识
|
||||
assert_type: ==
|
||||
expect_value: ${init_repo_identifier}
|
||||
type_jsonpath: $.identifier
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
-
|
||||
id: gitlink_repo_get_about_detail_02
|
||||
title: 非仓库管理员编辑项目主页内容
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/about.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
content: ${generate_paragraph(nb=10)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status
|
||||
expect_value: 403
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertPraised:
|
||||
message: 断言接口返回message
|
||||
expect_value: 你没有权限操作.
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,34 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 项目主页
|
||||
case_markers:
|
||||
- gitlink
|
||||
- project
|
||||
- about
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_about_detail_01
|
||||
title: 查询项目主页详情
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/about.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响返回的项目标识
|
||||
assert_type: ==
|
||||
expect_value: ${init_repo_identifier}
|
||||
type_jsonpath: $.identifier
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,89 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 分支
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- branches
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_branches_list_01
|
||||
title: 获取项目分支列表
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/branches.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
keyword: # 搜索关键词
|
||||
page: 1
|
||||
limit: 10
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言接口返回存在total_count字段
|
||||
assert_type: contains
|
||||
expect_value: total_count
|
||||
assert_sql:
|
||||
extract:
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_get_repo_branches_all_02
|
||||
title: 获取项目分支列表(无分页)
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/branches/all.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言接口返回存在name字段
|
||||
assert_type: contains
|
||||
expect_value: name
|
||||
assert_sql:
|
||||
extract:
|
||||
|
||||
-
|
||||
id: gitlink_get_repo_branches_by_keyword_01
|
||||
title: 获取项目分支列表- 根据搜索关键字
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/branches.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
keyword: master
|
||||
page: 1
|
||||
limit: 10
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言接口返回存在total_count字段
|
||||
assert_type: contains
|
||||
expect_value: total_count
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
branch_name: $.branches[0].name
|
||||
@@ -1,48 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 分支
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- branches
|
||||
- gitea
|
||||
- debug
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 需要仓库管理员才能删除分支
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_delete_branch_01
|
||||
title: 删除一个项目分支,删除成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/branches/${branch_name}.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: none
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建分支
|
||||
- gitlink_repo_new_branch_01
|
||||
@@ -1,49 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 分支
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- branches
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
# 仓库管理员和开发者均可新建分支
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_new_branch_01
|
||||
title: 创建一个项目分支
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/branches.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
new_branch_name: ${generate_words()}
|
||||
old_branch_name: master
|
||||
files:
|
||||
wait_seconds: 2
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言接口返回存在name字段
|
||||
assert_type: contains
|
||||
expect_value: name
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
branch_name: $.name
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 分支
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- branches
|
||||
- gitea
|
||||
|
||||
# 注意:仅项目管理员才有权限更新项目默认分支
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_update_default_branch_001
|
||||
title: 更新项目默认分支,更新成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1//${init_repo_owner}/${init_repo_identifier}/branches/update_default_branch.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: master
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 分支设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- branches
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_protect_branch_list_01
|
||||
title: 仓库管理员获取仓库保护分支列表,获取成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/protected_branches.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,61 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 分支设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- branches
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_delete_protect_branch_01
|
||||
title: 仓库管理员删除保护分支,删除成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/protected_branches/master.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
branch_name: master
|
||||
branchProtect: false # 启用分支保护
|
||||
enable_push: 0 # 禁用推送
|
||||
enable_push_whitelist: false # 启用推送白名单
|
||||
enable_merge_whitelist: false # 启用合并白名单
|
||||
merge_whitelist_usernames: # 启用合并白名单 用户
|
||||
enable_status_check: false # 启用状态检查
|
||||
required_approvals: 5 # 所需批准数
|
||||
enable_approvals_whitelist: false # 批准仅限列入白名单的用户或团队
|
||||
approvals_whitelist_usernames: # 批准仅限列入白名单的用户或团队
|
||||
block_on_rejected_reviews: false # 拒绝审核阻止了合并
|
||||
dismiss_stale_approvals: false # 取消过时的批准
|
||||
require_signed_commits: false # 需要签名提交
|
||||
block_on_outdated_branch: false # 如果拉取请求已经过时,阻止合并
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 设置保护分支 master
|
||||
- gitlink_set_repo_protect_branch_01
|
||||
@@ -1,61 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 分支设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- branches
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_edit_protect_branch_01
|
||||
title: 仓库管理员更新保护分支,设置成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/protected_branches/master.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
branch_name: master
|
||||
branchProtect: true # 启用分支保护
|
||||
enable_push: 0 # 禁用推送
|
||||
enable_push_whitelist: false # 启用推送白名单
|
||||
enable_merge_whitelist: false # 启用合并白名单
|
||||
merge_whitelist_usernames: # 启用合并白名单 用户
|
||||
enable_status_check: false # 启用状态检查
|
||||
required_approvals: 5 # 所需批准数
|
||||
enable_approvals_whitelist: false # 批准仅限列入白名单的用户或团队
|
||||
approvals_whitelist_usernames: # 批准仅限列入白名单的用户或团队
|
||||
block_on_rejected_reviews: false # 拒绝审核阻止了合并
|
||||
dismiss_stale_approvals: false # 取消过时的批准
|
||||
require_signed_commits: false # 需要签名提交
|
||||
block_on_outdated_branch: false # 如果拉取请求已经过时,阻止合并
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口返回的branch_name
|
||||
expect_value: master
|
||||
assert_type: ==
|
||||
type_jsonpath: $.branch_name
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 设置保护分支 master
|
||||
- gitlink_set_repo_protect_branch_01
|
||||
teardown:
|
||||
interface:
|
||||
# 清理数据:删除保护分支
|
||||
- gitlink_repo_delete_protect_branch_01
|
||||
@@ -1,39 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 分支设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- branches
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_set_default_branch_01
|
||||
title: 仓库管理员设置默认分支,设置成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
default_branch: master
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口返回的init_repo_identifier
|
||||
expect_value: ${init_repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,54 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 分支设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- gitea
|
||||
- branch
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_set_repo_protect_branch_01
|
||||
title: 仓库管理员设置仓库保护分支,设置成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/protected_branches.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
branch_name: master
|
||||
branchProtect: true # 启用分支保护
|
||||
enable_push: 0 # 禁用推送
|
||||
enable_push_whitelist: false # 启用推送白名单
|
||||
enable_merge_whitelist: true # 启用合并白名单
|
||||
merge_whitelist_usernames: # 启用合并白名单 用户
|
||||
enable_status_check: true # 启用状态检查
|
||||
required_approvals: 5 # 所需批准数
|
||||
enable_approvals_whitelist: true # 批准仅限列入白名单的用户或团队
|
||||
approvals_whitelist_usernames: # 批准仅限列入白名单的用户或团队
|
||||
block_on_rejected_reviews: true # 拒绝审核阻止了合并
|
||||
dismiss_stale_approvals: true # 取消过时的批准
|
||||
require_signed_commits: true # 需要签名提交
|
||||
block_on_outdated_branch: true # 如果拉取请求已经过时,阻止合并
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口返回的branch_name
|
||||
expect_value: master
|
||||
assert_type: ==
|
||||
type_jsonpath: $.branch_name
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 清理数据:删除保护分支
|
||||
- gitlink_repo_delete_protect_branch_01
|
||||
@@ -1,84 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 成员管理
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- collaborator
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
env_vars:
|
||||
added_user_id: ${t_user_id}
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_add_repo_collaborator_01
|
||||
title: 仓库管理员添加一个项目成员,添加成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/collaborators.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${added_user_id}
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理: 删除刚刚添加的项目成员
|
||||
- gitlink_delete_repo_collaborator_01
|
||||
|
||||
-
|
||||
id: gitlink_add_repo_collaborator_02
|
||||
title: 非仓库管理员添加一个项目成员,添加失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/collaborators.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${added_user_id}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status=403
|
||||
expect_value: 403
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message=你不是管理员,没有权限操作
|
||||
expect_value: 你不是管理员,没有权限操作
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,138 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 成员管理
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- collaborator
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
env_vars:
|
||||
added_user_id: ${t_user_id}
|
||||
|
||||
case_info:
|
||||
- id: gitlink_change_repo_collaborator_role_01
|
||||
title: 仓库管理员更改项目成员权限 - 修改为报告者,修改成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/collaborators/change_role.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${added_user_id}
|
||||
role: Reporter # 必填,枚举值:Manager Developer Reporter
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 添加仓库成员
|
||||
- gitlink_add_repo_collaborator_01
|
||||
teardown:
|
||||
interface:
|
||||
# 移除仓库成员
|
||||
- gitlink_delete_repo_collaborator_01
|
||||
|
||||
|
||||
- id: gitlink_change_repo_collaborator_role_02
|
||||
title: 仓库管理员更改项目成员权限 - 修改为管理员,修改成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/collaborators/change_role.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${t_user_id}
|
||||
role: Manager # 必填,枚举值:Manager Developer Reporter
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 添加仓库成员
|
||||
- gitlink_add_repo_collaborator_01
|
||||
teardown:
|
||||
interface:
|
||||
# 移除仓库成员
|
||||
- gitlink_delete_repo_collaborator_01
|
||||
|
||||
|
||||
- id: gitlink_change_repo_collaborator_role_03
|
||||
title: 非仓库管理员更改项目成员权限 - 修改为管理员,修改失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/collaborators/change_role.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${t_user_id}
|
||||
role: Manager # 必填,枚举值:Manager Developer Reporter
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status=403
|
||||
expect_value: 403
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message=你不是管理员,没有权限操作
|
||||
expect_value: 你不是管理员,没有权限操作
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 添加仓库成员
|
||||
- gitlink_add_repo_collaborator_01
|
||||
teardown:
|
||||
interface:
|
||||
# 移除仓库成员
|
||||
- gitlink_delete_repo_collaborator_01
|
||||
@@ -1,92 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 成员管理
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- collaborator
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
env_vars:
|
||||
added_user_id: ${t_user_id}
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_delete_repo_collaborator_01
|
||||
title: 仓库管理员删除一个项目成员,删除成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/collaborators/remove.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${added_user_id}
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 添加仓库成员
|
||||
- gitlink_add_repo_collaborator_01
|
||||
|
||||
-
|
||||
id: gitlink_delete_repo_collaborator_02
|
||||
title: 非仓库管理员删除一个项目成员,删除失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/collaborators/remove.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${t_user_id}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status=403
|
||||
expect_value: 403
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message=你不是管理员,没有权限操作
|
||||
expect_value: 你不是管理员,没有权限操作
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 添加仓库成员
|
||||
- gitlink_add_repo_collaborator_01
|
||||
teardown:
|
||||
interface:
|
||||
# 移除仓库成员
|
||||
- gitlink_delete_repo_collaborator_01
|
||||
@@ -1,71 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 成员管理
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- collaborator
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_get_repo_collaborator_list_01
|
||||
title: 仓库管理员获取项目成员列表,获取成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/collaborators.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口存在参数total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_user_ids: $.members[*].id
|
||||
case_dependence:
|
||||
|
||||
|
||||
- id: gitlink_get_repo_collaborator_list_02
|
||||
title: 非仓库管理员获取项目成员列表,获取失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/collaborators.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status=403
|
||||
expect_value: 403
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message=你不是管理员,没有权限操作
|
||||
expect_value: 你不是管理员,没有权限操作
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,37 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 成员管理
|
||||
case_markers:
|
||||
- gitlink
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_user_list_01
|
||||
title: 获取平台用户列表
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/users/list.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
sys_user_ids: $.users[*].user_id
|
||||
case_dependence:
|
||||
@@ -1,48 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 数据集
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- dataset
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:当前存找一个仓库,仓库已经创建数据集, 数据集已经上传了文件
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_delete_dataset_file_01
|
||||
title: 删除数据集文件,删除成功
|
||||
severity: critical
|
||||
run: false
|
||||
url: /api/attachments/${dataset_file_id}.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
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: 删除成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 获取数据集详情,获取dataset_container_id
|
||||
- gitlink_repo_get_dataset_detail_01
|
||||
# 上传数据集文件,获取dataset_file_id
|
||||
- gitlink_repo_upload_dataset_file_01
|
||||
@@ -1,45 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 数据集
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- dataset
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:当前存找一个仓库,仓库已经创建数据集
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_edit_dataset_01
|
||||
title: 编辑数据集,编辑成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/dataset.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: test_${generate_identifier()}_${generate_identifier()}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
paper_content: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 数据集
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- dataset
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:当前存找一个仓库,仓库已经创建数据集
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_dataset_detail_01
|
||||
title: 获取数据集详情
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/dataset.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
page: 1
|
||||
limit: 10
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
expect_value: attachment_total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
dataset_container_id: $.id
|
||||
case_dependence:
|
||||
@@ -1,230 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 数据集
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- dataset
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:当前存找一个仓库,仓库开启了数据集功能
|
||||
# 每一个仓库仅能存在一个数据集,因此每次测试都必须新建项目,创建数据集,最后清理数据:删除项目;
|
||||
# 新建数据集时,数据集名称和数据集描述是必填项。其他为非必填。
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 获取开源许可证
|
||||
- gitlink_get_repo_licenses_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_new_dataset_01
|
||||
title: 项目创建数据集(所有参数均填写),创建成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: test_${generate_identifier()}_${generate_identifier()}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
paper_content: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建项目
|
||||
- gitlink_projects_new_project_01
|
||||
# 前置条件:项目更新导航栏-开启数据集
|
||||
- gitlink_update_project_unit_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_dataset_02
|
||||
title: 项目创建数据集(仅填写必填项),创建成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: test_${generate_identifier()}_${generate_identifier()}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建项目
|
||||
- gitlink_projects_new_project_01
|
||||
# 前置条件:项目更新导航栏-开启数据集
|
||||
- gitlink_update_project_unit_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_dataset_03
|
||||
title: 项目创建数据集,数据集名称长度101,创建失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: ${faker.pystr(max_chars=101)}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
paper_content: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: '验证失败: Title过长(最长为 100 个字符)'
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: -1
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建项目
|
||||
- gitlink_projects_new_project_01
|
||||
# 前置条件:项目更新导航栏-开启数据集
|
||||
- gitlink_update_project_unit_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_dataset_04
|
||||
title: 项目创建数据集,数据集描述长度501,创建失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: ${generate_words()}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${faker.pystr(max_chars=501)}
|
||||
paper_content: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: '验证失败: Description过长(最长为 500 个字符)'
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: -1
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建项目
|
||||
- gitlink_projects_new_project_01
|
||||
# 前置条件:项目更新导航栏-开启数据集
|
||||
- gitlink_update_project_unit_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_dataset_05
|
||||
title: 项目创建数据集,对应研究论文长度501,创建失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: ${generate_words()}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
paper_content: ${faker.pystr(max_chars=501)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: '验证失败: Paper content过长(最长为 500 个字符)'
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: -1
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建项目
|
||||
- gitlink_projects_new_project_01
|
||||
# 前置条件:项目更新导航栏-开启数据集
|
||||
- gitlink_update_project_unit_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
@@ -1,46 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 数据集
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- dataset
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:当前存找一个仓库,仓库已经创建数据集
|
||||
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_upload_dataset_file_01
|
||||
title: 上传数据集文件,上传成功
|
||||
severity: critical
|
||||
run: false
|
||||
url: /api/attachments.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
container_type: ProjectDataset
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
container_id: ${dataset_container_id}
|
||||
file: ${get_file_content('gitlinklogo3.jpg')}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
expect_value: content_type
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
dataset_file_id: $.id
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 获取数据集详情,获取dataset_container_id
|
||||
- gitlink_repo_get_dataset_detail_01
|
||||
@@ -1,45 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)评论
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_delete_issue_journals_01
|
||||
title: 项目内删除疑修评论接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}/journals/${journal_id}.json
|
||||
method: delete
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建issue
|
||||
- gitlink_repo_new_issue_01
|
||||
# 前置条件:issue下新建评论
|
||||
- gitlink_repo_new_issue_journals_01
|
||||
@@ -1,42 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)评论
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_edit_issue_journals_01
|
||||
title: 项目内修改疑修评论接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}/journals/${journal_id}.json
|
||||
method: patch
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
notes: ${generate_words(nb=10)}
|
||||
attachment_ids: [] # 评论附件ID 可选
|
||||
receivers_login: []
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口存在id
|
||||
expect_value: id
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建issue
|
||||
- gitlink_repo_new_issue_01
|
||||
# 前置条件:issue下新建评论
|
||||
- gitlink_repo_new_issue_journals_01
|
||||
@@ -1,42 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)评论
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_issue_journal_children_list_01
|
||||
title: 获取疑修评论的子评论列表
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}/journals/${journal_id}/children_journals.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
keyword: # 搜索关键词 可选
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响应数据存在total_count
|
||||
assert_type: contains
|
||||
expect_value: total_count
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建issue
|
||||
- gitlink_repo_new_issue_01
|
||||
# 前置条件:issue下新建评论
|
||||
- gitlink_repo_new_issue_journals_01
|
||||
@@ -1,43 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)评论
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_issue_journal_list_01
|
||||
title: 获取疑修下评论或操作记录列表
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}/journals.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
category: # 类型,all 所有 comment 评论 operate 操作记录 可选
|
||||
keyword: # 搜索关键词 可选
|
||||
sort_by: # 排序字段,created_on 创建时间 updated_on 更新时间 可选
|
||||
sort_direction: # 排序类型,asc 正序 desc 倒序 可选
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响应数据存在total_count
|
||||
assert_type: contains
|
||||
expect_value: total_count
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建issue
|
||||
- gitlink_repo_new_issue_01
|
||||
@@ -1,110 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)评论
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:项目内新建疑修接口 - 无附件
|
||||
- gitlink_repo_new_issue_01
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_new_issue_journals_01
|
||||
title: 项目内新建疑修评论接口 - 一级评论, 无附件
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}/journals.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
notes: ${generate_words(nb=10)}
|
||||
attachment_ids: [ ] # 评论附件ID 可选
|
||||
receivers_login: [ ]
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口存在id
|
||||
expect_value: id
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
journal_id: $.id
|
||||
case_dependence:
|
||||
|
||||
- id: gitlink_repo_new_issue_journals_02
|
||||
title: 项目内新建疑修评论接口 - 一级评论, 有附件
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}/journals.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
notes: ${generate_words(nb=10)}
|
||||
attachment_ids: # 评论附件ID 可选
|
||||
- ${attachment_id}
|
||||
receivers_login: [ ]
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口存在id
|
||||
expect_value: id
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:上传附件,获取attachment_id
|
||||
interface: gitlink_upload_file_01
|
||||
|
||||
|
||||
- id: gitlink_repo_new_issue_journals_03
|
||||
title: 项目内新建疑修评论接口 - notes为空
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}/journals.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
parent_id: 0 # 父评论ID 可选
|
||||
reply_id: # 回复评论ID 可选
|
||||
attachment_ids: # 评论附件ID 可选
|
||||
- ${attachment_id}
|
||||
receivers_login: [ ]
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status=-1
|
||||
expect_value: -1
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message
|
||||
expect_value: Notes不能为空字符
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:上传附件,获取attachment_id
|
||||
interface: gitlink_upload_file_01
|
||||
@@ -1,47 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_batch_delete_issue_01
|
||||
title: 项目内批量删除多个疑修
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/batch_destroy.json
|
||||
method: delete
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
ids: ${issue_ids}
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:连续新建多个issue
|
||||
- gitlink_repo_new_issue_01
|
||||
- gitlink_repo_new_issue_01
|
||||
# 获取多个issue_ids
|
||||
- gitlink_repo_get_issue_list_02
|
||||
@@ -1,52 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_batch_edit_issue_01
|
||||
title: 项目内批量更新多个疑修
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/batch_update.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
ids: ${issue_ids}
|
||||
status_id: 1
|
||||
priority_id: ${random.choice([1,2,3,4])}
|
||||
milestone_id:
|
||||
issue_tag_ids:
|
||||
assigner_ids:
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:连续新建多个issue
|
||||
- gitlink_repo_new_issue_01
|
||||
- gitlink_repo_new_issue_01
|
||||
# 获取多个issue_ids
|
||||
- gitlink_repo_get_issue_list_02
|
||||
@@ -1,42 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_delete_issue_01
|
||||
title: 项目内删除一个疑修
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}.json
|
||||
method: delete
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:新建issue
|
||||
interface: gitlink_repo_new_issue_01
|
||||
@@ -1,48 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_edit_issue_01
|
||||
title: 项目内更新一个疑修
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}.json
|
||||
method: patch
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
subject: Update_${generate_paragraph}
|
||||
description: ${generate_paragraph}
|
||||
branch_name: master
|
||||
status_id: 1
|
||||
priority_id: ${random.choice([1,2,3,4])}
|
||||
milestone_id:
|
||||
issue_tag_ids:
|
||||
assigner_ids:
|
||||
attachment_ids:
|
||||
start_date: ${generate_today_date}
|
||||
due_date: {generate_time_after_week}
|
||||
receivers_login: []
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertId:
|
||||
message: 断言接口响应数据存在id
|
||||
assert_type: contains
|
||||
expect_value: id
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:新建issue
|
||||
interface: gitlink_repo_new_issue_01
|
||||
@@ -1,35 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_issue_assigner_list_01
|
||||
title: 疑修负责人列表
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issue_assigners.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响应数据存在total_count
|
||||
assert_type: contains
|
||||
expect_value: total_count
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,35 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_issue_author_list_01
|
||||
title: 疑修发布人列表
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issue_authors.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响应数据存在total_count
|
||||
assert_type: contains
|
||||
expect_value: total_count
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,37 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: project_get_issue_detail
|
||||
title: 项目内获取疑修详情接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues/${issue_index}.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertId:
|
||||
message: 断言接口返回的project_issues_index
|
||||
assert_type: ==
|
||||
expect_value: ${issue_index}
|
||||
type_jsonpath: $.project_issues_index
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:新建issue
|
||||
interface: gitlink_repo_new_issue_01
|
||||
@@ -1,83 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_issue_list_01
|
||||
title: 项目内获取疑修列表接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
participant_category: all # 参与类型,all 全部 aboutme 关于我的 authoredme 我创建的 assignedme 我负责的 atme @我的
|
||||
category: all # 疑修类型,all 全部 opened 开启中 closed 已关闭
|
||||
keyword: #搜索关键词 可选
|
||||
author_id: # 发布人用户ID 可选
|
||||
milestone_id: #里程碑ID 可选
|
||||
assigner_id: # 负责人用户ID 可选
|
||||
status_id: # 疑修状态ID 可选
|
||||
sort_by: # 可选 排序字段,issues.updated_on 更新时间 issues.created_on 创建时间 issue_priorities.position 优先级
|
||||
sort_direction: # 排序类型,asc 正序 desc 倒序 可选
|
||||
issue_tag_ids: # 标记ID,支持多个用,隔开
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertId:
|
||||
message: 断言接口响应数据存在total_issues_count
|
||||
assert_type: contains
|
||||
expect_value: total_issues_count
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
issue_ids: $.issues[*].id
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_get_issue_list_02
|
||||
title: 项目内获取疑修列表接口 - 根据关键字搜索
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
participant_category: all # 参与类型,all 全部 aboutme 关于我的 authoredme 我创建的 assignedme 我负责的 atme @我的
|
||||
category: all # 疑修类型,all 全部 opened 开启中 closed 已关闭
|
||||
keyword: New #搜索关键词 可选
|
||||
author_id: # 发布人用户ID 可选
|
||||
milestone_id: #里程碑ID 可选
|
||||
assigner_id: # 负责人用户ID 可选
|
||||
status_id: # 疑修状态ID 可选
|
||||
sort_by: # 可选 排序字段,issues.updated_on 更新时间 issues.created_on 创建时间 issue_priorities.position 优先级
|
||||
sort_direction: # 排序类型,asc 正序 desc 倒序 可选
|
||||
issue_tag_ids: # 标记ID,支持多个用,隔开
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertId:
|
||||
message: 断言接口响应数据存在total_issues_count
|
||||
assert_type: contains
|
||||
expect_value: total_issues_count
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
issue_ids: $.issues[*].id
|
||||
@@ -1,35 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_issue_priority_list_01
|
||||
title: 疑修优先级列表
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issue_priorities.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响应数据存在total_count
|
||||
assert_type: contains
|
||||
expect_value: total_count
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,35 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_issue_status_list_01
|
||||
title: 疑修状态列表
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issue_statues.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响应数据存在total_count
|
||||
assert_type: contains
|
||||
expect_value: total_count
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,96 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 疑修(Issue)
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- issue
|
||||
- new_issue
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_new_issue_01
|
||||
title: 项目内新建疑修接口 - 无附件
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
subject: New_${generate_paragraph}
|
||||
description: ${generate_paragraph}
|
||||
branch_name: master
|
||||
status_id: 1
|
||||
priority_id: ${random.choice([1,2,3,4])}
|
||||
milestone_id:
|
||||
issue_tag_ids:
|
||||
assigner_ids:
|
||||
attachment_ids:
|
||||
start_date: ${generate_today_date}
|
||||
due_date: {generate_time_after_week}
|
||||
receivers_login: []
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertId:
|
||||
message: 断言接口响应数据存在id
|
||||
assert_type: contains
|
||||
expect_value: id
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
issue_index: $.project_issues_index
|
||||
issue_title: $.subject
|
||||
issue_desc: $.description
|
||||
issue_files: $.attachments..title
|
||||
case_dependence:
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_issue_02
|
||||
title: 项目内新建疑修接口 - 带附件
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/issues.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
subject: New_${generate_words}
|
||||
description: ${generate_paragraph}
|
||||
branch_name: master
|
||||
status_id: 1
|
||||
priority_id: ${random.choice([1,2,3,4])}
|
||||
milestone_id:
|
||||
issue_tag_ids:
|
||||
assigner_ids:
|
||||
attachment_ids: # ["768f752b-2037-4b11-93e4-ccc8d72d2a54", "f5141121-6791-49b7-9334-79ebdbffeb3e"]
|
||||
- ${attachment_id}
|
||||
start_date: ${generate_today_date}
|
||||
due_date: {generate_time_after_week}
|
||||
receivers_login: []
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertId:
|
||||
message: 断言接口响应数据存在id
|
||||
assert_type: contains
|
||||
expect_value: id
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
issue_index: $.project_issues_index
|
||||
issue_title: $.subject
|
||||
issue_desc: $.description
|
||||
issue_files: $.attachments..title
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:上传issue附件,获取attachment_id
|
||||
interface: gitlink_upload_file_01
|
||||
@@ -1,45 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 里程碑
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- milestone
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_delete_milestone_01
|
||||
title: 删除一个里程碑
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/milestones/${milestone_id}.json
|
||||
method: delete
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建一个里程碑
|
||||
- gitlink_repo_new_milestone_01
|
||||
# 前置条件:获取刚刚新建里程碑的milestone_id
|
||||
- gitlink_repo_get_milestone_list_02
|
||||
@@ -1,48 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 里程碑
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- milestone
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_edit_milestone_01
|
||||
title: 更新一个里程碑
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/milestones/${milestone_id}.json
|
||||
method: patch
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
name: Update - ${generate_words}
|
||||
description: ${generate_paragraph}
|
||||
effective_date: {generate_time_after_week}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建一个里程碑
|
||||
- gitlink_repo_new_milestone_01
|
||||
# 前置条件:获取刚刚新建里程碑的milestone_id
|
||||
- gitlink_repo_get_milestone_list_02
|
||||
@@ -1,87 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 里程碑
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- milestone
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_edit_milestone_status_01
|
||||
title: 更新一个里程碑的状态 - 关闭里程碑
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/milestones/${milestone_id}/update_status.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
id: ${milestone_id}
|
||||
project_id: ${repo_identifier}
|
||||
status: closed
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message
|
||||
expect_value: 操作成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建一个里程碑
|
||||
- gitlink_repo_new_milestone_01
|
||||
# 前置条件:获取刚刚新建里程碑的milestone_id
|
||||
- gitlink_repo_get_milestone_list_02
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_edit_milestone_status_02
|
||||
title: 更新一个里程碑的状态 - 开启里程碑
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/milestones/${milestone_id}/update_status.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
id: ${milestone_id}
|
||||
project_id: ${repo_identifier}
|
||||
status: open
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message
|
||||
expect_value: 操作成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建一个里程碑
|
||||
- gitlink_repo_new_milestone_01
|
||||
# 前置条件:获取刚刚新建里程碑的milestone_id
|
||||
- gitlink_repo_get_milestone_list_02
|
||||
@@ -1,73 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 里程碑
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- milestone
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_milestone_list_01
|
||||
title: 获取里程碑列表
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/milestones.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
keyword: # 搜索关键词 可选
|
||||
only_name: # 只返回名称及id 可选
|
||||
category: # closed 关闭的 opening 开启中 可选
|
||||
sort_by: # 排序字段 created_on 创建时间 updated_on 更新时间 effective_date 到期日期 issues_count 任务数量 percent 完成度 可选
|
||||
sort_direction: # 排序顺序 desc 倒序 asc 正序 可选
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响返回的closed_milestone_count
|
||||
assert_type: contains
|
||||
expect_value: closed_milestone_count
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_get_milestone_list_02
|
||||
title: 获取里程碑列表 - 开启状态的里程碑
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/milestones.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: params
|
||||
payload:
|
||||
keyword: # 搜索关键词 可选
|
||||
only_name: # 只返回名称及id 可选
|
||||
category: opening # closed 关闭的 opening 开启中 可选
|
||||
sort_by: # 排序字段 created_on 创建时间 updated_on 更新时间 effective_date 到期日期 issues_count 任务数量 percent 完成度 可选
|
||||
sort_direction: # 排序顺序 desc 倒序 asc 正序 可选
|
||||
page: 1
|
||||
limit: 15
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口响返回的closed_milestone_count
|
||||
assert_type: contains
|
||||
expect_value: closed_milestone_count
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
milestone_id: $.milestones[0].id
|
||||
case_dependence:
|
||||
@@ -1,42 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 里程碑
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- milestone
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_new_milestone_01
|
||||
title: 创建一个里程碑
|
||||
run: true
|
||||
severity: normal
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/milestones.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
name: New - ${generate_words}
|
||||
description: ${generate_paragraph}
|
||||
effective_date: {generate_time_after_week}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,62 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求-评论
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提是仓库存在2个不同的分支
|
||||
# 步骤说明
|
||||
# 1、项目开发者代码库新建文件,提交的分支新分支
|
||||
# 2、项目开发者从新分支向默认分支分支发起PR
|
||||
# 3、项目开发者访问PR详情, 获取合并请求评论列表
|
||||
# 后置数据清理:项目管理员登录,删除分支
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_journal_list_01
|
||||
title: 获取合并请求评论列表
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}/journals.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertFiled:
|
||||
message: 断言接口返回存在total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,69 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
- skip: 参数不明确,后续再补充
|
||||
|
||||
# 前提是仓库存在2个不同的分支
|
||||
# 步骤说明
|
||||
# 1、项目开发者代码库新建文件,提交的分支新分支
|
||||
# 2、项目开发者从新分支向默认分支分支发起PR
|
||||
# 3、项目开发者评论PR
|
||||
# 后置数据清理:项目管理员登录,删除分支
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_new_pull_request_journal_01
|
||||
title: 创建一个合并请求评论
|
||||
severity:
|
||||
run: false
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}/journals.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
commit_id: str
|
||||
diff: Diff
|
||||
line_code: str
|
||||
note: str
|
||||
parent_id: int
|
||||
path: str
|
||||
review_id: str
|
||||
type: str
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 响应成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,75 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提是仓库存在2个不同的分支
|
||||
# 步骤说明
|
||||
# 1、项目开发者代码库新建文件,提交的分支新分支
|
||||
# 2、项目开发者从新分支向默认分支分支发起PR
|
||||
# 3、项目开发者编辑PR
|
||||
# 后置数据清理:项目管理员登录,删除分支
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_edit_pull_request_001
|
||||
title: 更新一个合并请求, 更新成功
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: update PR ${generate_words()} # 合并请求标题
|
||||
body: ${generate_paragraph()} # 合并请求内容
|
||||
head: ${head_branch} # 源分支
|
||||
base: ${base_branch} # 目标分支
|
||||
receivers_login: [ ] # @人员的login
|
||||
issue_tag_ids: [ ] # 标记ID数组
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: PullRequest更新成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
# 前置条件:获取PR详情,如源分支,目标分支
|
||||
- gitlink_repo_get_pull_request_detail_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,55 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求-提交
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_commits_list_01
|
||||
title: 获取一个合并请求提交列表
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}/commits.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertFiled:
|
||||
message: 断言接口返回存在commits_count
|
||||
expect_value: commits_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,64 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_detail_01
|
||||
title: 获取合并请求详情
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 响应成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
head_branch: $.pull_request.head # 源分支
|
||||
base_branch: $.pull_request.base # 目标分支
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件(无父级目录),提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,55 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求-文件
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_files_list_01
|
||||
title: 获取一个合并请求变更文件列表
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}/files.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertFiled:
|
||||
message: 断言接口返回存在files_count
|
||||
expect_value: files_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,112 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_list_01
|
||||
title: 获取合并请求列表 (全部状态)
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 响应成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
pull_request_id: $.issues[*].pull_request_id
|
||||
case_dependence:
|
||||
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_list_02
|
||||
title: 获取合并请求列表 (开启中状态)
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
status_type: 1
|
||||
page: 1
|
||||
limit: 10
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 响应成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
pull_request_id: $.issues[*].pull_request_id
|
||||
case_dependence:
|
||||
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_list_03
|
||||
title: 获取合并请求列表 (根据关键字搜索)
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
keyword: New Merge
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 响应成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
pull_request_id: $.issues[0].pull_request_id
|
||||
case_dependence:
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求-代码评审
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_reviews_list_01
|
||||
title: 获取合并请求审查列表
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}/reviews.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertFiled:
|
||||
message: 断言接口返回存在total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,57 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求-代码评审
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_versions_diff_01
|
||||
title: 获取合并请求版本之间的Diff
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}/versions/${version_id}/diff.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertFiled:
|
||||
message: 断言接口返回存在file_nums
|
||||
expect_value: file_nums
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
# 前置条件:获取version_id
|
||||
- gitlink_repo_get_pull_request_versions_list_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,57 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求-代码评审
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_pull_request_versions_list_01
|
||||
title: 获取合并请求版本列表
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}/versions.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertFiled:
|
||||
message: 断言接口返回存在total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
version_id: $.versions[0].id
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,80 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提是仓库存在2个不同的分支
|
||||
# 步骤说明
|
||||
# 1、项目开发者代码库新建文件,提交的分支新分支
|
||||
# 2、项目开发者从新分支向默认分支分支发起PR
|
||||
# 后置数据清理:项目管理员登录,删除分支
|
||||
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_new_pull_request_01
|
||||
title: 创建一个合并请求, 从新分支向默认分支发起PR
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: New Merge - ${generate_words()} # 合并请求标题
|
||||
body: ${generate_paragraph()} # 合并请求内容
|
||||
head: ${branch_name} # 源分支
|
||||
base: ${default_branch} # 目标分支
|
||||
is_original: false # 是否为fork仓库发来的合并请求
|
||||
fork_project_id: # fork仓库ID
|
||||
merge_project_identifier:
|
||||
files_count: 1
|
||||
commits_count: 1
|
||||
receivers_login: [ ] # @人员的login
|
||||
issue_tag_ids: [ ] # 标记ID数组
|
||||
assigned_to_id: # 指派人员ID
|
||||
fixed_version_id: # 里程碑ID
|
||||
priority_id: # 优先级ID
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 响应成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
pull_request_id: $.pull_request_id
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,68 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求-合并
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提是仓库存在2个不同的分支
|
||||
# 步骤说明
|
||||
# 1、项目开发者代码库新建文件,提交的分支新分支
|
||||
# 2、项目开发者从新分支向默认分支分支发起PR
|
||||
# 3、项目管理员合并PR
|
||||
# 后置数据清理:项目管理员登录,删除分支
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_pr_merge_001
|
||||
title: 合并一个合并请求
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}/pr_merge.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
project_id: ${init_repo_identifier} # 项目标识
|
||||
id: ${pull_request_id} # 合并请求id
|
||||
do: merge
|
||||
title: ${generate_words()}
|
||||
body: ${generate_words()}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=1
|
||||
expect_value: 1
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 合并成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 合并请求-拒绝
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- pr
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提是仓库存在2个不同的分支
|
||||
# 步骤说明
|
||||
# 1、项目开发者代码库新建文件,提交的分支新分支
|
||||
# 2、项目开发者从新分支向默认分支分支发起PR
|
||||
# 3、项目管理员拒绝PR
|
||||
# 后置数据清理:项目管理员登录,删除分支
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_refuse_merge_001
|
||||
title: 项目管理员拒绝一个合并请求, 拒绝成功
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/pulls/${pull_request_id}/refuse_merge.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=1
|
||||
expect_value: 1
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 已拒绝
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件,提交的分支新分支
|
||||
- gitlink_repo_create_files_05 # 创建新分支,同时获取branch name
|
||||
# 前置条件:发起PR
|
||||
- gitlink_repo_new_pull_request_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,51 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 发行版
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- release
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_delete_release_01
|
||||
title: 删除发行版
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/releases/${release_id}.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 删除成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:创建发行版
|
||||
- gitlink_repo_new_release_01
|
||||
# 前置条件:获取发行版的相关信息, 如:release_id
|
||||
- gitlink_repo_get_release_list_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除标记
|
||||
- gitlink_repo_delete_tag_01
|
||||
@@ -1,59 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 发行版
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- release
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_edit_release_01
|
||||
title: 编辑发行版, 编辑成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/releases/${release_id}.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
tag_name: ${release_tag_name} # 标签
|
||||
name: ${generate_words()} # 发行版标题
|
||||
body: ${generate_words()} # 发行版描述
|
||||
target_commitish: ${release_target_commitish} # 分支
|
||||
prerelease: false # 是否为预发布版
|
||||
attachment_ids: # 附件ID数组
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 更新成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:创建发行版
|
||||
- gitlink_repo_new_release_01
|
||||
# 前置条件:获取发行版的相关信息, 如:release_id
|
||||
- gitlink_repo_get_release_list_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除发行版
|
||||
- gitlink_repo_delete_release_01
|
||||
# 后置处理:删除标记
|
||||
- gitlink_repo_delete_tag_01
|
||||
@@ -1,47 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 发行版
|
||||
case_markers:
|
||||
- gitlink
|
||||
- release
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_release_detail_01
|
||||
title: 获取发行版详情
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/releases/${release_id}.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回version_id
|
||||
expect_value: ${release_id}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.version_id
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:创建发行版
|
||||
- gitlink_repo_new_release_01
|
||||
# 前置条件:获取发行版的相关信息, 如:release_id
|
||||
- gitlink_repo_get_release_list_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除发行版
|
||||
- gitlink_repo_delete_release_01
|
||||
# 后置处理:删除标记
|
||||
- gitlink_repo_delete_tag_01
|
||||
@@ -1,44 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 发行版
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- release
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_release_list_01
|
||||
title: 获取发行版列表
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/releases.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 响应成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
release_id: $.releases[?(@.name =='${release_name}')].version_id
|
||||
release_target_commitish: $.releases[?(@.name =='${release_name}')].target_commitish
|
||||
release_tag_name: $.releases[?(@.name =='${release_name}')].tag_name
|
||||
@@ -1,118 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 发行版
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- release
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_new_release_01
|
||||
title: 在默认分支创建发行版(无附件),创建成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/releases.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
tag_name: ${generate_identifier()} # 标签
|
||||
name: ${generate_words()} # 发行版标题
|
||||
body: ${generate_words()} # 发行版描述
|
||||
target_commitish: ${default_branch} # 分支,可选,默认为master
|
||||
draft: false # 是否为草稿
|
||||
prerelease: false # 是否为预发布版
|
||||
attachment_ids: # 附件ID数组
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 发布成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case:
|
||||
type_jsonpath:
|
||||
release_name: $.payload.name
|
||||
tag_name: $.payload.tag_name
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:获取刚刚创建的发行版id
|
||||
- gitlink_repo_get_release_list_01
|
||||
# 后置处理:删除发行版
|
||||
- gitlink_repo_delete_release_01
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_release_01
|
||||
title: 在默认分支创建发行版(有附件),创建成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/releases.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
tag_name: ${generate_identifier()} # 标签
|
||||
name: ${generate_words()} # 发行版标题
|
||||
body: ${generate_words()} # 发行版描述
|
||||
target_commitish: ${default_branch} # 分支,可选,默认为master
|
||||
draft: false # 是否为草稿
|
||||
prerelease: false # 是否为预发布版
|
||||
attachment_ids: # 附件ID数组
|
||||
- ${attachment_id}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 发布成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case:
|
||||
type_jsonpath:
|
||||
release_name: $.payload.name
|
||||
tag_name: $.payload.tag_name
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:上传附件,获取attachment_id
|
||||
- gitlink_upload_file_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:获取刚刚创建的发行版id
|
||||
- gitlink_repo_get_release_list_01
|
||||
# 后置处理:删除发行版
|
||||
- gitlink_repo_delete_release_01
|
||||
# 后置处理:删除标记
|
||||
- gitlink_repo_delete_tag_01
|
||||
@@ -1,39 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_detail_full_01
|
||||
title: 项目详情
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/detail.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertDefaultBranch:
|
||||
message: 断言接口响应存在default_branch字段
|
||||
assert_type: contains
|
||||
expect_value: default_branch
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_project_name: $.name
|
||||
repo_private: $.private
|
||||
default_branch: $.default_branch
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
case_info:
|
||||
- id: gitlink_get_repo_entries_01
|
||||
title: 获取项目默认分支的代码目录
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/entries.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
ref: ${default_branch}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言接口返回存在entries字段
|
||||
assert_type: contains
|
||||
expect_value: entries
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
get_repo_file_path: $.entries[?(@.type =='file')].path
|
||||
get_repo_file_sha: $.entries[?(@.type =='file')].sha
|
||||
get_repo_dir_name: $.entries[?(@.type =='dir')].name
|
||||
@@ -1,80 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_get_repo_default_branch_readme_file_01
|
||||
title: 获取项目README文件 - 默认分支
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/readme.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertName:
|
||||
message: 断言接口name
|
||||
assert_type: ==
|
||||
expect_value: README.md
|
||||
type_jsonpath: $.name
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_readme_sha: $.sha
|
||||
|
||||
|
||||
- id: gitlink_get_repo_other_branch_readme_file_02
|
||||
title: 获取项目README文件 - 指定分支
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/readme.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
ref: ${branch_name}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertName:
|
||||
message: 断言接口name
|
||||
assert_type: ==
|
||||
expect_value: README.md
|
||||
type_jsonpath: $.name
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_readme_sha: $.sha
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建分支
|
||||
- gitlink_repo_new_branch_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,36 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_simple_01
|
||||
title: 项目详情(简版)
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/simple.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口响应存在identifier字段
|
||||
assert_type: contains
|
||||
expect_value: identifier
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_project_name: $.name
|
||||
@@ -1,91 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_sub_entries_01
|
||||
title: 获取项目默认分支的代码子目录或者文件
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/sub_entries.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
ref: ${default_branch}
|
||||
filepath: ${repo_file_path} # 必填参数
|
||||
type: dir # dir表示目录
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言接口返回存在entries字段
|
||||
assert_type: contains
|
||||
expect_value: entries
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:初始化文件目录
|
||||
env_vars:
|
||||
repo_file_dir: ${generate_words}_${generate_identifier}
|
||||
interface:
|
||||
# 前置条件:代码库上传文件(有父级目录),提交的分支是默认分支
|
||||
- gitlink_repo_upload_files_02
|
||||
teardown:
|
||||
# 后置处理:删除默认分支分支文件(无父级目录)
|
||||
interface: gitlink_repo_delete_files_02
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_get_repo_sub_entries_02
|
||||
title: 获取项目默认分支的某个文件信息
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/sub_entries.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
ref: ${default_branch}
|
||||
filepath: ${repo_file_name} # 必填参数
|
||||
type: file # file表示文件
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言接口返回存在entries字段
|
||||
assert_type: contains
|
||||
expect_value: entries
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_file_sha: $.entries.sha
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:代码库上传文件(无父级目录),提交的分支是默认分支
|
||||
- gitlink_repo_upload_files_01
|
||||
teardown:
|
||||
# 后置处理:删除默认分支分支文件(无父级目录)
|
||||
interface: gitlink_repo_delete_files_01
|
||||
@@ -1,34 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_contributors_01
|
||||
title: 获取项目贡献者列表
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/contributors.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言接口返回存在total_count字段
|
||||
assert_type: contains
|
||||
expect_value: total_count
|
||||
assert_sql:
|
||||
extract:
|
||||
@@ -1,231 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库新建文件/上传文件
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_upload_files_01
|
||||
title: 代码库上传文件(无父级目录),提交的分支是默认分支
|
||||
severity: Critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/create_file.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
filepath: 第1章 软件测试基础.pdf
|
||||
base64_filepath: ${get_base64_content('第1章 软件测试基础.pdf')} # 文件路径(base64加密后)
|
||||
branch: ${default_branch}
|
||||
content: ${get_file_base64('第1章 软件测试基础.pdf')} # 文件内容(Base64加密后)
|
||||
message: 代码库上传文件(无父级目录),提交的分支是默认分支 - 第1章 软件测试基础.pdf # commit信息
|
||||
files:
|
||||
wait_seconds: 12
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言提交者是当前登录用户
|
||||
assert_type: ==
|
||||
expect_value: ${login}
|
||||
type_jsonpath: $.commit.author.name
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_file_sha: $.sha
|
||||
repo_file_name: $.name
|
||||
case_dependence:
|
||||
teardown:
|
||||
# 后置处理:删除默认分支分支文件(无父级目录)
|
||||
interface: gitlink_repo_delete_files_01
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_upload_files_02
|
||||
title: 代码库上传文件(有父级目录),提交的分支是默认分支
|
||||
severity: Critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/create_file.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
filepath: ${repo_file_dir}/login_demo.yaml
|
||||
base64_filepath: ${get_base64_content('${repo_file_dir}/login_demo.yaml')} # 文件路径(base64加密后)
|
||||
branch: ${default_branch}
|
||||
content: ${get_file_base64('login_demo.yaml')} # 文件内容(Base64加密后)
|
||||
message: 代码库上传文件(有父级目录),提交的分支是默认分支 - login_demo.yaml # commit信息
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言提交者是当前登录用户
|
||||
assert_type: ==
|
||||
expect_value: ${login}
|
||||
type_jsonpath: $.commit.author.name
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_file_sha: $.sha
|
||||
repo_file_name: $.name
|
||||
case:
|
||||
type_jsonpath:
|
||||
repo_file_path: $.payload.filepath
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:初始化文件目录
|
||||
env_vars:
|
||||
repo_file_dir: ${generate_words}_${generate_identifier}
|
||||
teardown:
|
||||
# 后置处理:删除默认分支分支文件(有父级目录)
|
||||
interface: gitlink_repo_delete_files_02
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_upload_files_03
|
||||
title: 代码库上传文件(无父级目录),提交的分支是新的分支
|
||||
severity: Critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/create_file.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
filepath: demo_test_upload.yaml
|
||||
base64_filepath: ${get_base64_content('demo_test_upload.yaml')} # 文件路径(base64加密后)
|
||||
content: ${get_file_base64('demo_test_upload.yaml')} # 文件内容(Base64加密后)
|
||||
message: 代码库上传文件(无父级目录),提交的分支是新的分支 - demo_test_upload.yaml # commit信息
|
||||
branch: ${default_branch}
|
||||
new_branch: ${generate_words} # 新的分支名称
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言提交者是当前登录用户
|
||||
assert_type: ==
|
||||
expect_value: ${login}
|
||||
type_jsonpath: $.commit.author.name
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_file_sha: $.sha
|
||||
repo_file_name: $.name
|
||||
case:
|
||||
type_jsonpath:
|
||||
branch_name: $.payload.new_branch
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除指定分支文件(无父级目录),删除成功
|
||||
- gitlink_repo_delete_files_03
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_create_files_04
|
||||
title: 代码库新建文件(无父级目录),提交的分支默认分支
|
||||
severity: Critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/create_file.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
filepath: ${repo_file_path}
|
||||
base64_filepath: ${get_base64_content('${repo_file_path}')} # 文件路径(base64加密后)
|
||||
content: print('ok') # 文件内容(Base64加密后)
|
||||
message: 代码库新建文件(无父级目录),提交的分支默认分支 - ${repo_file_path} # commit信息
|
||||
branch: ${default_branch}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言提交者是当前登录用户
|
||||
assert_type: ==
|
||||
expect_value: ${login}
|
||||
type_jsonpath: $.commit.author.name
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_file_sha: $.sha
|
||||
repo_file_name: $.name
|
||||
case_dependence:
|
||||
setup:
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
teardown:
|
||||
# 后置处理:删除默认分支分支文件(无父级目录)
|
||||
interface: gitlink_repo_delete_files_01
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_create_files_05
|
||||
title: 代码库新建文件(无父级目录),提交的分支新分支
|
||||
severity: Critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/create_file.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
filepath: ${repo_file_path}
|
||||
base64_filepath: ${get_base64_content('${repo_file_path}')} # 文件路径(base64加密后)
|
||||
content: print("ok") # 文件内容(Base64加密后)
|
||||
message: 代码库新建文件(无父级目录),提交的分支新分支 - ${repo_file_path} # commit信息
|
||||
branch: ${default_branch}
|
||||
new_branch: ${generate_words} # 新的分支名称
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言提交者是当前登录用户
|
||||
assert_type: ==
|
||||
expect_value: ${login}
|
||||
type_jsonpath: $.commit.author.name
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_file_sha: $.sha
|
||||
repo_file_name: $.name
|
||||
case:
|
||||
type_jsonpath:
|
||||
branch_name: $.payload.new_branch
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除指定分支分支文件(无父级目录)
|
||||
- gitlink_repo_delete_files_03
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,117 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库删除文件
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_delete_files_01
|
||||
title: 删除默认分支文件(无父级目录)
|
||||
severity:
|
||||
run: true
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/delete_file.json
|
||||
method: delete
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
filepath: ${repo_file_name}
|
||||
branch: ${default_branch} # 分支名称
|
||||
sha: ${repo_file_sha} # 文件提交标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言message
|
||||
assert_type: ==
|
||||
expect_value: 文件删除成功
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
env_vars:
|
||||
# 环境变量, 创建文件的名称
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件(无父级目录),提交的分支默认分支
|
||||
- gitlink_repo_create_files_04
|
||||
|
||||
|
||||
- id: gitlink_repo_delete_files_02
|
||||
title: 删除默认分支分支文件(有父级目录)
|
||||
severity:
|
||||
run: true
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/delete_file.json
|
||||
method: delete
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
filepath: ${repo_file_path}
|
||||
branch: ${default_branch} # 分支名称
|
||||
sha: ${repo_file_sha} # 文件提交标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言message
|
||||
assert_type: ==
|
||||
expect_value: 文件删除成功
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:代码库上传文件(有父级目录),提交的分支是默认分支
|
||||
- gitlink_repo_upload_files_02
|
||||
|
||||
- id: gitlink_repo_delete_files_03
|
||||
title: 删除指定分支文件(无父级目录),删除成功
|
||||
severity:
|
||||
run: true
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/delete_file.json
|
||||
method: delete
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
filepath: ${repo_file_name}
|
||||
branch: ${branch_name} # 分支名称
|
||||
sha: ${repo_file_sha} # 文件提交标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言message
|
||||
assert_type: ==
|
||||
expect_value: 文件删除成功
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
# 前置条件:创建的新文件名称
|
||||
env_vars:
|
||||
repo_file_path: test_${generate_words}.py
|
||||
interface:
|
||||
# 前置条件:代码库新建文件(无父级目录),提交的分支新分支
|
||||
- gitlink_repo_create_files_05
|
||||
@@ -1,68 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库替换文件
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
# 替换文件:不支持预览的文件,可直接替换。替换的原理是删除原有文件,上传新的文件
|
||||
# 不支持预览的文件:docx, doc,pdf,ppt
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
# 前置条件:# 上传一个不支持预览的 可替换文件
|
||||
- gitlink_repo_upload_files_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除刚刚替换后的文件
|
||||
- gitlink_repo_delete_files_01
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_replace_files_01
|
||||
title: 在默认分支替换文件,替换成功
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/replace_file.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
filepath: demo_get_apply_information.yml
|
||||
base64_filepath: ${get_base64_content('demo_get_apply_information.yml')}
|
||||
branch: ${default_branch} # 提交的分支, 输入不存在的分支会自动新建一个
|
||||
content: ${get_file_base64('demo_get_apply_information.yml')} # 文件内容(Base64加密后)
|
||||
message: 替换文件 - demo_get_apply_information.yml # commit信息
|
||||
delete_file:
|
||||
filepath: ${repo_file_name}
|
||||
base64_filepath: ${get_base64_content('${repo_file_name}')} # 文件路径(base64加密后)
|
||||
branch: ${default_branch}
|
||||
sha: ${repo_file_sha}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertAutor:
|
||||
message: 断言message
|
||||
assert_type: ==
|
||||
expect_value: 替换成功
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case:
|
||||
type_jsonpath:
|
||||
repo_file_name: $.payload.filepath
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 获取项目默认分支的某个文件信息
|
||||
- gitlink_get_repo_sub_entries_02
|
||||
@@ -1,103 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 代码库更新文件
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- repo
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取测试仓库的默认分支
|
||||
- gitlink_get_repo_detail_full_01
|
||||
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_update_files_01
|
||||
title: 修改默认分支文件 - README.md
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/update_file.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
filepath: README.md
|
||||
base64_filepath: ${get_base64_content('README.md')} # 文件路径(base64加密后)
|
||||
content: ${generate_paragraph(nb=10)} # 文件内容(Base64加密后)
|
||||
message: auto update - ${repo_file_path} # commit信息
|
||||
branch: ${default_branch}
|
||||
sha: ${repo_readme_sha}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言message
|
||||
assert_type: ==
|
||||
expect_value: 更新成功
|
||||
type_jsonpath: $.message
|
||||
assertStatus:
|
||||
message: 断言status
|
||||
assert_type: ==
|
||||
expect_value: 1
|
||||
type_jsonpath: $.status
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取默认分支的readme文件的sha
|
||||
- gitlink_get_repo_default_branch_readme_file_01
|
||||
|
||||
- id: gitlink_repo_edit_files_02
|
||||
title: 修改指定分支文件 - README.md
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/update_file.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
filepath: README.md
|
||||
base64_filepath: ${get_base64_content('README.md')} # 文件路径(base64加密后)
|
||||
content: ${generate_paragraph(nb=10)} # 文件内容(Base64加密后)
|
||||
message: auto update - README.md # commit信息
|
||||
branch: ${branch_name}
|
||||
sha: ${repo_readme_sha}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言message
|
||||
assert_type: ==
|
||||
expect_value: 更新成功
|
||||
type_jsonpath: $.message
|
||||
assertStatus:
|
||||
message: 断言status
|
||||
assert_type: ==
|
||||
expect_value: 1
|
||||
type_jsonpath: $.status
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建分支
|
||||
- gitlink_repo_new_branch_01
|
||||
# 前置条件:获取新分支readme的sha
|
||||
- gitlink_get_repo_other_branch_readme_file_02
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除分支
|
||||
- gitlink_repo_delete_branch_01
|
||||
@@ -1,46 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 仓库设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
common_dependence:
|
||||
setup:
|
||||
# 新建私有仓库
|
||||
interface: gitlink_projects_new_project_02
|
||||
teardown:
|
||||
# 删除仓库
|
||||
interface: gitlink_projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
- id: gitlink_cancel_transfer_repo_01
|
||||
title: 仓库取消转移,取消成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${repo_owner}/${repo_identifier}/applied_transfer_projects/cancel.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口返回包括字段
|
||||
expect_value: project
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:仓库申请转移
|
||||
- gitlink_transfer_repo_01
|
||||
@@ -1,42 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 仓库设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
|
||||
case_info:
|
||||
- id: gitlink_get_repo_setting_01
|
||||
title: 获取仓库基本设置
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/edit.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段project_identifier
|
||||
expect_value: project_identifier
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_name: $.project_name
|
||||
repo_identifier: $.project_identifier
|
||||
repo_private: $.private
|
||||
repo_description: $.project_description
|
||||
repo_language_id: $.project_language_id
|
||||
repo_category_id: $.project_category_id
|
||||
case_dependence:
|
||||
@@ -1,45 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 仓库设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
common_dependence:
|
||||
setup:
|
||||
# 新建私有仓库
|
||||
interface: gitlink_projects_new_project_02
|
||||
teardown:
|
||||
# 删除仓库
|
||||
interface: gitlink_projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
- id: gitlink_transfer_repo_01
|
||||
title: 仓库申请转移,申请成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${repo_owner}/${repo_identifier}/applied_transfer_projects.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
# goal: 0
|
||||
owner_name: ${env_super_login} # 迁移对象标识
|
||||
identifier: ${repo_identifier}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
message: 断言接口返回包括字段
|
||||
expect_value: project
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,213 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 仓库设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
common_dependence:
|
||||
setup:
|
||||
# 前置条件:新建私有项目
|
||||
interface: gitlink_projects_new_project_02
|
||||
teardown:
|
||||
# 后置处理:删除项目
|
||||
interface: gitlink_projects_delete_project_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_update_repo_setting_01
|
||||
title: 更新仓库基本设置 - 更新项目名称
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: update-name-${generate_words} # 项目名称
|
||||
identifier: ${repo_identifier}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: False
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
|
||||
-
|
||||
id: gitlink_update_repo_setting_02
|
||||
title: 更新仓库基本设置 - 更新项目标识
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_name}
|
||||
identifier: update_${generate_identifier()}_${generate_identifier()} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertName:
|
||||
message: 断言接口返回的name
|
||||
expect_value: ${repo_name}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.name
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: False
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
|
||||
-
|
||||
id: gitlink_update_repo_setting_03
|
||||
title: 更新仓库基本设置 - 更新项目类别
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_name}
|
||||
identifier: ${repo_identifier}
|
||||
project_category_id: ${random.choice(${repo_category_ids})} # 项目类别ID
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: False
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取项目类别列表
|
||||
- gitlink_get_repo_category_01
|
||||
|
||||
-
|
||||
id: gitlink_update_repo_setting_04
|
||||
title: 更新仓库基本设置 - 更新项目语言
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_name}
|
||||
identifier: ${repo_identifier}
|
||||
project_language_id: ${random.choice(${repo_language_ids})} # 项目语言ID
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: False
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取项目语言列表
|
||||
- gitlink_get_repo_language_01
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_update_repo_setting_05
|
||||
title: 更新仓库基本设置 - 更新仓库公私有性, 私有仓库更新为公开
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_name}
|
||||
identifier: ${repo_identifier}
|
||||
private: False # 项目是否为私有项目
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: True
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 仓库设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
common_dependence:
|
||||
setup:
|
||||
# 新建公开仓库
|
||||
interface: gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface: gitlink_projects_delete_project_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_update_project_unit_01
|
||||
title: 更新仓库基本设置 - 更新项目导航栏
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}/project_units.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
unit_types:
|
||||
- issues
|
||||
- pulls
|
||||
- wiki
|
||||
- devops
|
||||
- versions
|
||||
- services
|
||||
- dataset
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,211 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 仓库设置
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
common_dependence:
|
||||
setup:
|
||||
# 前置条件:新建公开仓库
|
||||
interface: gitlink_projects_new_project_01
|
||||
teardown:
|
||||
# 后置处理:删除项目
|
||||
interface: gitlink_projects_delete_project_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_update_repo_setting_01
|
||||
title: 更新仓库基本设置 - 更新项目名称
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: update-name-${generate_words} # 项目名称
|
||||
identifier: ${repo_identifier}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: True
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
|
||||
-
|
||||
id: gitlink_update_repo_setting_02
|
||||
title: 更新仓库基本设置 - 更新项目标识
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
identifier: update_${generate_identifier()}_${generate_identifier()} # 项目标识
|
||||
name: ${repo_name}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertName:
|
||||
message: 断言接口返回的name
|
||||
expect_value: ${repo_name}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.name
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: True
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
|
||||
-
|
||||
id: gitlink_update_repo_setting_03
|
||||
title: 更新仓库基本设置 - 更新项目类别
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_name} # 项目名称
|
||||
project_category_id: ${random.choice(${repo_category_ids})} # 项目类别ID
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: True
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取项目类别列表
|
||||
- gitlink_get_repo_category_01
|
||||
|
||||
-
|
||||
id: gitlink_update_repo_setting_04
|
||||
title: 更新仓库基本设置 - 更新项目语言
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_project_name} # 项目名称
|
||||
project_language_id: ${random.choice(${repo_language_ids})} # 项目语言ID
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: True
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:获取项目语言列表
|
||||
- gitlink_get_repo_language_01
|
||||
|
||||
-
|
||||
id: gitlink_update_repo_setting_05
|
||||
title: 更新仓库基本设置 - 更新仓库公私有性, 公开仓库更新为私有
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_name} # 项目名称
|
||||
private: True # 项目是否为私有项目
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
message: 断言接口返回的is_public
|
||||
expect_value: False
|
||||
assert_type: ==
|
||||
type_jsonpath: $.is_public
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
repo_identifier: $.identifier
|
||||
repo_name: $.name
|
||||
case_dependence:
|
||||
@@ -1,92 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 标签
|
||||
case_markers:
|
||||
- gitlink
|
||||
- tags
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
# 通过发行版新建标签,删除标签之前需要先删除发行版
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_delete_tag_01
|
||||
title: 删除标签 - 当前标签无关联发行版,删除成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/tags/${tag_name}.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:创建发行版
|
||||
- gitlink_repo_new_release_01
|
||||
# 前置条件:获取发行版的相关信息, 如:release_id
|
||||
- gitlink_repo_get_release_list_01
|
||||
# 前置处理:删除发行版
|
||||
- gitlink_repo_delete_release_01
|
||||
|
||||
|
||||
- id: gitlink_repo_delete_tag_002
|
||||
title: 删除标签 - 当前标签关联了发行版,将发行失败
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/tags/${tag_name}.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=-1
|
||||
expect_value: -1
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 请先删除发行版!
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:创建发行版
|
||||
- gitlink_repo_new_release_01
|
||||
# 前置条件:获取发行版的相关信息, 如:release_id
|
||||
- gitlink_repo_get_release_list_01
|
||||
teardown:
|
||||
interface:
|
||||
# 数据清理:删除发行版
|
||||
- gitlink_repo_delete_release_01
|
||||
# 数据清理:删除标签
|
||||
- gitlink_repo_delete_tag_01
|
||||
@@ -1,49 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 标签
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- tags
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_tags_detail_01
|
||||
title: 获取项目标签详情
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/v1/${init_repo_owner}/${init_repo_identifier}/tags/${tag_name}.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertName:
|
||||
message: 断言接口返回name
|
||||
expect_value: ${tag_name}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.name
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:创建发行版
|
||||
- gitlink_repo_new_release_01
|
||||
# 前置条件:获取发行版的相关信息, 如:release_id
|
||||
- gitlink_repo_get_release_list_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除发行版
|
||||
- gitlink_repo_delete_release_01
|
||||
# 后置处理:删除标记
|
||||
- gitlink_repo_delete_tag_01
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 标签
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- tags
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_tags_list_01
|
||||
title: 获取项目标签列表
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/tags.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
page: 1
|
||||
limit: 10
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
tag_name: $.tags[0].name
|
||||
|
||||
-
|
||||
id: gitlink_repo_get_tags_list_all_02
|
||||
title: 获取项目标签列表(无分页)
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/tags.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
@@ -14,7 +14,7 @@ case_info:
|
||||
id: gitlink_projects_delete_project_01
|
||||
title: 删除项目
|
||||
severity: critical
|
||||
run: True
|
||||
run: False
|
||||
url: /api/${repo_owner}/${repo_identifier}.json
|
||||
method: DELETE
|
||||
headers:
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 关注项目
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- follow_project
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建项目(仅输入必填参数)
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_projects_follow_project_01
|
||||
title: 关注项目
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/watchers/follow.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
target_type: project
|
||||
id: ${project_id}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assertPraised:
|
||||
message: 断言接口返回watched=true
|
||||
expect_value: true
|
||||
assert_type: ==
|
||||
type_jsonpath: $.watched
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_projects_follow_project_02
|
||||
title: 关注项目 - 已关注过了继续关注
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/watchers/follow.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
target_type: project
|
||||
id: ${project_id}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=2
|
||||
expect_value: 2
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 你已关注了
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_projects_unfollow_project_03
|
||||
title: 取消关注项目
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/watchers/unfollow.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
target_type: project
|
||||
id: ${project_id}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assertPraised:
|
||||
message: 断言接口返回watched=false
|
||||
expect_value: false
|
||||
assert_type: ==
|
||||
type_jsonpath: $.watched
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,82 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 复刻(Fork)项目
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- fork_project
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
common_dependence:
|
||||
interface:
|
||||
# 删除刚刚fork成功的项目
|
||||
- projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
- id: gitlink_projects_fork_project_01
|
||||
title: fork项目
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/forks.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: fork项目成功
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
response:
|
||||
type_jsonpath:
|
||||
fork_identifier: $.identifier
|
||||
case_dependence:
|
||||
teardown:
|
||||
env_vars:
|
||||
repo_owner: ${env_login}
|
||||
repo_identifier: ${fork_identifier}
|
||||
|
||||
- id: gitlink_projects_fork_project_02
|
||||
title: fork项目 - 已经fork过了继续fork
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/forks.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: fork失败,你已拥有了这个项目 ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,32 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 获取项目基础数据
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 用例数据
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_ignores_01
|
||||
title: 获取gitignore列表数据
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/ignores.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
ignores_id: $.ignores[0].id
|
||||
ignores_name: $.ignores[0].name
|
||||
@@ -1,39 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 获取项目基础数据
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_language_01
|
||||
title: 获取项目语言
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/project_languages.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段project_languages
|
||||
expect_value: project_languages
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_language_ids: $.project_languages[*].id
|
||||
repo_language_id: $.project_languages[0].id
|
||||
repo_language_name: $.project_languages[0].name
|
||||
case_dependence:
|
||||
@@ -1,34 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 获取项目基础数据
|
||||
case_markers:
|
||||
- gitlink
|
||||
- gitea
|
||||
- projects
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 用例数据
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_licenses_01
|
||||
title: 获取开源许可证列表数据
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/licenses.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
licenses_ids: $.licenses[*].id
|
||||
licenses_id: $.licenses[0].id
|
||||
licenses_name: $.licenses[0].name
|
||||
@@ -1,118 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 项目
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- like_project
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建项目(仅输入必填参数)
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
- id: gitlink_projects_like_project_01
|
||||
title: 点赞项目
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/projects/${project_id}/praise_tread/like.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assertPraised:
|
||||
message: 断言接口返回praised=true
|
||||
expect_value: true
|
||||
assert_type: ==
|
||||
type_jsonpath: $.praised
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
- id: gitlink_projects_like_project_02
|
||||
title: 点赞项目 - 已点赞后继续点赞
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/projects/${project_id}/praise_tread/like.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=2
|
||||
expect_value: 2
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: 你已点过赞了
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
- id: gitlink_projects_like_project_03
|
||||
title: 取消点赞项目
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/projects/${project_id}/praise_tread/unlike.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assertMessage:
|
||||
message: 断言接口返回message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assertPraised:
|
||||
message: 断言接口返回praised=false
|
||||
expect_value: false
|
||||
assert_type: ==
|
||||
type_jsonpath: $.praised
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -13,15 +13,8 @@ case_common:
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 获取开源许可证
|
||||
- gitlink_get_repo_licenses_01
|
||||
# 获取gitignore
|
||||
- gitlink_get_repo_ignores_01
|
||||
# 获取项目类别
|
||||
- gitlink_get_repo_category_01
|
||||
# 获取项目语言
|
||||
- gitlink_get_repo_language_01
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_projects_new_project_01
|
||||
@@ -60,82 +53,33 @@ case_info:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
- id: gitlink_projects_new_project_02
|
||||
title: 正确输入各项必填参数,新建私有项目成功
|
||||
run: true
|
||||
title: 新建公开项目成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/projects.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${user_id}
|
||||
name: test_${generate_words()}_${generate_identifier()}
|
||||
repository_name: ${generate_identifier()}_test
|
||||
private: true
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
login:
|
||||
message: 断言接口返回的login
|
||||
expect_value: ${login}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.login
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_id: $.id
|
||||
repo_name: $.name
|
||||
repo_owner: $.login
|
||||
repo_identifier: $.identifier
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 清理数据:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
- id: gitlink_projects_new_project_03
|
||||
title: 输入所有参数,新建项目成功
|
||||
run: true
|
||||
url: /api/projects.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${user_id}
|
||||
name: test_${generate_words()}_${generate_identifier()}
|
||||
repository_name: ${generate_identifier()}_test
|
||||
description: ${generate_paragraph()}
|
||||
private: true
|
||||
ignoreFlag: true
|
||||
ignore_id: ${ignores_id}
|
||||
ignore: ${ignores_name}
|
||||
licenseFlag: true
|
||||
license_id: ${licenses_id}
|
||||
license: ${licenses_name}
|
||||
categoreFlag: true
|
||||
project_category_id: ${repo_category_id}
|
||||
project_category: ${repo_category_name}
|
||||
languageFlag: true
|
||||
project_language_id: ${repo_language_id}
|
||||
project_language: ${repo_language_name}
|
||||
# blockchain: false
|
||||
# blockchain_token_all: 10000
|
||||
# blockchain_init_token:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
login:
|
||||
message: 断言接口返回的login
|
||||
expect_value: ${login}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.login
|
||||
assertId:
|
||||
message: 断言接口返回的存在id
|
||||
expect_value: id
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_id: $.id
|
||||
project_id: $.id # 项目id
|
||||
repo_name: $.name
|
||||
repo_owner: $.login
|
||||
repo_identifier: $.identifier
|
||||
@@ -143,44 +87,4 @@ case_info:
|
||||
teardown:
|
||||
interface:
|
||||
# 清理数据:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
- id: gitlink_projects_new_project_04
|
||||
title: 正确输入各项必填参数,新建项目成功(校验数据库)
|
||||
severity: normal
|
||||
run: false
|
||||
url: /api/projects.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
user_id: ${user_id}
|
||||
name: test_${generate_words()}_${generate_identifier()}
|
||||
repository_name: ${generate_identifier()}_test
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
login:
|
||||
message: 断言接口返回的login
|
||||
expect_value: ${login}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.login
|
||||
assert_sql:
|
||||
eq:
|
||||
sql: select id,`name`, identifier from projects where user_id=${user_id} ORDER BY created_on DESC;
|
||||
$.id: ${pms_project_id}
|
||||
$.name: ${project_name}
|
||||
$.identifier: ${project_identifier}
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_id: $.id
|
||||
repo_name: $.name
|
||||
repo_owner: $.login
|
||||
repo_identifier: $.identifier
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 清理数据:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
- gitlink_projects_delete_project_01
|
||||
@@ -1,45 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Webhook
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- webhook
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限,当前仓库存在webhook
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_webhook_detail_01
|
||||
title: 仓库管理员获取Webhook详情,获取成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks/${repo_webhook_id}/edit.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段id
|
||||
expect_value: id
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 新建webhook
|
||||
- gitlink_repo_add_webhook_03
|
||||
teardown:
|
||||
interface:
|
||||
# 删除webhook
|
||||
- gitlink_repo_delete_webhook_01
|
||||
@@ -1,48 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Webhook
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- webhook
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限,当前仓库存在webhook
|
||||
|
||||
case_info:
|
||||
- id: gitlink_get_repo_webhook_history_list_01
|
||||
title: 仓库管理员获取Webhook历史推送列表,获取成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks/${repo_webhook_id}/tasks.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
page: 1
|
||||
limit: 10
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 新建webhook
|
||||
- gitlink_repo_add_webhook_03
|
||||
# 测试推送
|
||||
- gitlink_repo_webhook_test_01
|
||||
teardown:
|
||||
interface:
|
||||
# 删除webhook
|
||||
- gitlink_repo_delete_webhook_01
|
||||
@@ -1,39 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Webhook
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- webhook
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限,当前仓库存在webhook
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_webhook_list_01
|
||||
title: 仓库管理员获取Webhook列表,获取成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
page: 1
|
||||
limit: 10
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段total_count
|
||||
expect_value: total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,188 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Webhook
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- webhook
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 仅仓库管理员及以上角色才有权限
|
||||
|
||||
|
||||
case_info:
|
||||
- id: gitlink_repo_add_webhook_01
|
||||
title: 仓库管理员创建Webhook(push事件),创建成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
type: gitea # 选填,类型, 默认值gitea, 枚举值:gitea slack discord dingtalk telegram msteams feishu matrix jianmu softbot
|
||||
active: true # 必填,是否开启, 布尔值
|
||||
content_type: json # 必填,内容类型, 枚举值:json form
|
||||
http_method: ${random.choice(['GET', 'POST'])} # 必填,请求方式,枚举值:GET POST
|
||||
secret: ${generate_identifier} # 选填,密钥
|
||||
url: ${faker.uri()} # 必填,请求地址
|
||||
branch_filter: '*' # 必填,分支白名单 推送、创建,删除分支事件的分支白名单,使用 glob 模式匹配指定。若为空或 ,则将报告所有分支的事件。
|
||||
eventCondition: push
|
||||
events: # 必填,事件,枚举值:push create delete issues_only issue_assign issue_label issue_comment pull_request_only pull_request_assign pull_request_comment
|
||||
- push
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段id
|
||||
expect_value: id
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_webhook_id: $.id
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除webhook
|
||||
- gitlink_repo_delete_webhook_01
|
||||
|
||||
|
||||
- id: gitlink_repo_add_webhook_02
|
||||
title: 仓库管理员创建Webhook(所有事件),创建成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
type: gitea # 选填,类型, 默认值gitea, 枚举值:gitea slack discord dingtalk telegram msteams feishu matrix jianmu softbot
|
||||
active: true # 必填,是否开启, 布尔值
|
||||
content_type: json # 必填,内容类型, 枚举值:json form
|
||||
http_method: ${random.choice(['GET', 'POST'])} # 必填,请求方式,枚举值:GET POST
|
||||
secret: ${generate_identifier} # 选填,密钥
|
||||
url: ${faker.uri()} # 必填,请求地址
|
||||
branch_filter: '*' # 必填,分支白名单 推送、创建,删除分支事件的分支白名单,使用 glob 模式匹配指定。若为空或 ,则将报告所有分支的事件。
|
||||
eventCondition: all
|
||||
events: # 必填,事件,枚举值:push create delete issues_only issue_assign issue_label issue_comment pull_request_only pull_request_assign pull_request_comment
|
||||
- create
|
||||
- delete
|
||||
- push
|
||||
- pull_request_assign
|
||||
- pull_request_review
|
||||
- pull_request_only
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段id
|
||||
expect_value: id
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_webhook_id: $.id
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除webhook
|
||||
- gitlink_repo_delete_webhook_01
|
||||
|
||||
|
||||
- id: gitlink_repo_add_webhook_03
|
||||
title: 仓库管理员创建Webhook(所有自定义事件),创建成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
type: gitea # 选填,类型, 默认值gitea, 枚举值:gitea slack discord dingtalk telegram msteams feishu matrix jianmu softbot
|
||||
active: true # 必填,是否开启, 布尔值
|
||||
content_type: json # 必填,内容类型, 枚举值:json form
|
||||
http_method: ${random.choice(['GET', 'POST'])} # 必填,请求方式,枚举值:GET POST
|
||||
secret: ${generate_identifier} # 选填,密钥
|
||||
url: ${faker.uri()} # 必填,请求地址
|
||||
branch_filter: '*' # 必填,分支白名单 推送、创建,删除分支事件的分支白名单,使用 glob 模式匹配指定。若为空或 ,则将报告所有分支的事件。
|
||||
eventCondition: forevent
|
||||
events: # 必填,事件,枚举值:push create delete issues_only issue_assign issue_label issue_comment pull_request_only pull_request_assign pull_request_comment
|
||||
- create
|
||||
- delete
|
||||
- push
|
||||
- pull_request_assign
|
||||
- pull_request_comment
|
||||
- pull_request_only
|
||||
- issues_only
|
||||
- issue_label
|
||||
- issue_assign
|
||||
- issue_comment
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回包括字段id
|
||||
expect_value: id
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_webhook_id: $.id
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除webhook
|
||||
- gitlink_repo_delete_webhook_01
|
||||
|
||||
- id: gitlink_repo_add_webhook_04
|
||||
title: 非仓库管理员创建Webhook(所有自定义事件),创建成功
|
||||
severity: normal
|
||||
run: false
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
type: gitea # 选填,类型, 默认值gitea, 枚举值:gitea slack discord dingtalk telegram msteams feishu matrix jianmu softbot
|
||||
active: true # 必填,是否开启, 布尔值
|
||||
content_type: json # 必填,内容类型, 枚举值:json form
|
||||
http_method: ${random.choice(['GET', 'POST'])} # 必填,请求方式,枚举值:GET POST
|
||||
secret: ${generate_identifier} # 选填,密钥
|
||||
url: ${faker.uri()} # 必填,请求地址
|
||||
branch_filter: '*' # 必填,分支白名单 推送、创建,删除分支事件的分支白名单,使用 glob 模式匹配指定。若为空或 ,则将报告所有分支的事件。
|
||||
eventCondition: push
|
||||
events: # 必填,事件,枚举值:push create delete issues_only issue_assign issue_label issue_comment pull_request_only pull_request_assign pull_request_comment
|
||||
- push
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_status:
|
||||
message: 断言接口status=404
|
||||
expect_value: 404
|
||||
assert_type: ==
|
||||
type_jsonpath: $.status
|
||||
assert_message:
|
||||
message: 断言接口message
|
||||
expect_value: 您访问的页面不存在或已被删除
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_webhook_id: $.id
|
||||
case_dependence:
|
||||
@@ -1,48 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Webhook
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- webhook
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限,当前仓库存在webhook
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_delete_webhook_01
|
||||
title: 仓库管理员删除Webhook,删除成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks/${repo_webhook_id}.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建webhook
|
||||
- gitlink_repo_add_webhook_03
|
||||
@@ -1,59 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Webhook
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- webhook
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限,当前仓库存在webhook
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_update_webhook_01
|
||||
title: 仓库管理员更新Webhook,更新成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks/${repo_webhook_id}.json
|
||||
method: PATCH
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
type: gitea # 选填,类型, 默认值gitea, 枚举值:gitea slack discord dingtalk telegram msteams feishu matrix jianmu softbot
|
||||
active: true # 必填,是否开启, 布尔值
|
||||
content_type: json # 必填,内容类型, 枚举值:json form
|
||||
http_method: ${random.choice(['GET', 'POST'])} # 必填,请求方式,枚举值:GET POST
|
||||
secret: ${generate_identifier} # 选填,密钥
|
||||
url: ${faker.uri()} # 必填,请求地址
|
||||
branch_filter: '*' # 必填,分支白名单 推送、创建,删除分支事件的分支白名单,使用 glob 模式匹配指定。若为空或 ,则将报告所有分支的事件。
|
||||
events: push # 必填,事件,枚举值:push create delete issues_only issue_assign issue_label issue_comment pull_request_only pull_request_assign pull_request_comment
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 新建webhook
|
||||
- gitlink_repo_add_webhook_03
|
||||
teardown:
|
||||
interface:
|
||||
# 删除webhook
|
||||
- gitlink_repo_delete_webhook_01
|
||||
@@ -1,52 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Webhook
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- webhook
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:仅仓库管理员及以上角色才有权限,当前仓库存在webhook
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_webhook_test_01
|
||||
title: 仓库管理员测试Webhook推送,请求成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/${init_repo_owner}/${init_repo_identifier}/webhooks/${repo_webhook_id}/test.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${admin_cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
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:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 新建webhook
|
||||
- gitlink_repo_add_webhook_03
|
||||
teardown:
|
||||
interface:
|
||||
# 删除webhook
|
||||
- gitlink_repo_delete_webhook_01
|
||||
@@ -1,57 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Wiki
|
||||
case_markers:
|
||||
- gitlink
|
||||
- repo_wiki
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
- skip: 暂时跳过
|
||||
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
# 前置条件:新建项目
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface:
|
||||
# 后置处理:删除项目
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_delete_wiki_01
|
||||
title: 删除wiki页面
|
||||
severity: critical
|
||||
run: True
|
||||
url: ${wiki_host}/api/wiki/open/deleteWiki
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
owner: ${init_repo_owner} # 必填,仓库拥有者标识
|
||||
repo: ${init_repo_identifier} # 必填,仓库标识
|
||||
projectId: ${project_id} # 必填 gitlink项目id
|
||||
pageName: ${env_page_title} # 必填,当前页标题
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回的message
|
||||
expect_value: 204
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
env_vars:
|
||||
page_title: 新页面_${generate_words()}
|
||||
page_content: ${generate_paragraph}
|
||||
# 前置条件:新建wiki页面
|
||||
interface: gitlink_repo_new_wiki_01
|
||||
@@ -1,93 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Wiki
|
||||
case_markers:
|
||||
- gitlink
|
||||
- repo_wiki
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
- skip: 暂时跳过
|
||||
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface: gitlink_get_repo_simple_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_export_wiki_01
|
||||
title: 导出wiki库(pdf), 导出成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: ${wiki_host}/api/wikiExport/wikiExport-wrapper
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
owner: ${init_repo_owner} # 必填,仓库拥有者标识
|
||||
repoName: ${init_repo_identifier} # 必填,仓库标识
|
||||
projectId: ${project_id} # 必填 gitlink项目id
|
||||
projectName: ${repo_project_name} # 必填,项目名称
|
||||
type: pdf # 类型,pdf or markdown or html
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_export_wiki_02
|
||||
title: 导出wiki库(markdown), 导出成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: ${wiki_host}/api/wikiExport/wikiExport-wrapper
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
owner: ${init_repo_owner} # 必填,仓库拥有者标识
|
||||
repoName: ${init_repo_identifier} # 必填,仓库标识
|
||||
projectId: ${project_id} # 必填 gitlink项目id
|
||||
projectName: ${repo_project_name} # 必填,项目名称
|
||||
type: markdown # 类型,pdf or markdown or html
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
-
|
||||
id: gitlink_repo_export_wiki_03
|
||||
title: 导出wiki库(html), 导出成功
|
||||
severity: normal
|
||||
run: True
|
||||
url: ${wiki_host}/api/wikiExport/wikiExport-wrapper
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
owner: ${init_repo_owner} # 必填,仓库拥有者标识
|
||||
repoName: ${init_repo_identifier} # 必填,仓库标识
|
||||
projectId: ${project_id} # 必填 gitlink项目id
|
||||
projectName: ${repo_project_name} # 必填,项目名称
|
||||
type: html # 类型,pdf or markdown or html
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -1,53 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: Wiki
|
||||
case_markers:
|
||||
- gitlink
|
||||
- repo_wiki
|
||||
- gitea
|
||||
- usefixtures: gitlink_login
|
||||
- skip: 暂时跳过
|
||||
|
||||
# 前提条件:新建一个wiki页面,确保wiki库不为空
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
env_vars:
|
||||
env_page_title: 新页面_${generate_words()}
|
||||
env_page_content: ${generate_paragraph}
|
||||
interface: gitlink_repo_new_wiki_01
|
||||
teardown:
|
||||
interface: gitlink_repo_delete_wiki_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_wiki_detail_01
|
||||
title: 获取wiki页面详情
|
||||
severity: normal
|
||||
run: True
|
||||
url: ${wiki_host}/api/wiki/open/getWiki
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
Cookie: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
owner: ${init_repo_owner} # 必填,仓库拥有者标识
|
||||
repo: ${init_repo_identifier} # 必填,仓库标识
|
||||
projectId: ${project_id} # 必填 gitlink项目id
|
||||
pageName: ${wiki_page_sub_url} # 必填,当前页标题 (特殊字符处理后的标题)
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回的message
|
||||
expect_value: 200
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface: gitlink_repo_get_wiki_page_01
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user