调整gitlink相关接口用例
This commit is contained in:
@@ -16,20 +16,26 @@ ENV_VARS = {
|
||||
"env": ""
|
||||
},
|
||||
"test": {
|
||||
# 示例测试环境及示例测试账号
|
||||
# 环境相关域名
|
||||
"host": "https://testforgeplus.trustie.net",
|
||||
"wiki_host": "",
|
||||
"pms_host": "https://testpm.trustie.net",
|
||||
"client_id": "****client_id****", # 获取oauth_token需要的参数
|
||||
"client_secret": "****client_secret****", # 获取oauth_token需要的参数
|
||||
"green_code": "****green_code-test****", # 万能验证码
|
||||
# 获取oauth_token需要的参数
|
||||
"client_id": "****client_id****",
|
||||
"client_secret": "****client_secret****",
|
||||
# 万能验证码
|
||||
"green_code": "****green_code-test****",
|
||||
# 测试账号 - 普通用户
|
||||
"env_login": "autotest",
|
||||
"env_password": "****autotest_password_test****", # 运行时需要手动更改密码
|
||||
"env_nickname": "autotest",
|
||||
"env_user_id": 106,
|
||||
# 测试账号 - 超级管理员
|
||||
"env_super_login": "floraachy",
|
||||
"env_super_password": "****floraachy_password_test****", # 运行时需要手动更改密码
|
||||
"env_project_url": "/autotest/auotest",
|
||||
# 测试仓库 env_repo_owner/env_repo_identifier
|
||||
"env_repo_owner": "autotest",
|
||||
"env_repo_identifier": "auotest",
|
||||
"env_project_id": "59",
|
||||
# pms相关环境变量
|
||||
"env_pms_product_id": "215",
|
||||
@@ -52,20 +58,26 @@ ENV_VARS = {
|
||||
|
||||
},
|
||||
"pre": {
|
||||
# 示例测试环境及示例测试账号
|
||||
# 环境相关域名
|
||||
"host": "http://172.20.32.202:4000",
|
||||
"wiki_host": "http://172.20.32.202:8093",
|
||||
"pms_host": "https://testpm.trustie.net",
|
||||
"client_id": "****client_id-pre****", # 获取oauth_token需要的参数
|
||||
"client_secret": "****client_secret-pre****", # 获取oauth_token需要的参数
|
||||
"green_code": "****green_code-pre****", # 万能验证码
|
||||
# 获取oauth_token需要的参数
|
||||
"client_id": "****client_id-pre****",
|
||||
"client_secret": "****client_secret-pre****",
|
||||
# 万能验证码
|
||||
"green_code": "****green_code-pre****",
|
||||
# 测试账号 - 普通用户
|
||||
"env_login": "autotest",
|
||||
"env_password": "****autotest-pre****", # 运行时需要手动更改密码
|
||||
"env_nickname": "autotest",
|
||||
"env_user_id": 115,
|
||||
# 测试账号 - 超级管理员
|
||||
"env_super_login": "floraachy",
|
||||
"env_super_password": "****floraachy-pre****", # 运行时需要手动更改密码
|
||||
"env_project_url": "/floraachy/autotest",
|
||||
# 测试仓库 env_repo_owner/env_repo_identifier
|
||||
"env_repo_owner": "floraachy",
|
||||
"env_repo_identifier": "autotest",
|
||||
"env_project_id": "161",
|
||||
# pms相关环境变量
|
||||
"env_pms_product_id": "",
|
||||
@@ -88,19 +100,26 @@ ENV_VARS = {
|
||||
|
||||
},
|
||||
"live": {
|
||||
# 环境相关域名
|
||||
"host": "https://www.gitlink.org.cn",
|
||||
"wiki_host": "https://wiki.gitlink.org.cn",
|
||||
"pms_host": "https://*****",
|
||||
"client_id": "****client_id-live****", # 获取oauth_token需要的参数
|
||||
"client_secret": "****client_secret-live****", # 获取oauth_token需要的参数
|
||||
"green_code": "****green_code-live****", # 万能验证码
|
||||
# 获取oauth_token需要的参数
|
||||
"client_id": "****client_id-live****",
|
||||
"client_secret": "****client_secret-live****",
|
||||
# 万能验证码
|
||||
"green_code": "****green_code-live****",
|
||||
# 测试账号 - 普通用户
|
||||
"env_login": "floraachy",
|
||||
"env_password": "****floraachy-live****", # 运行时需要手动更改密码
|
||||
"env_nickname": "🌼陈银花",
|
||||
"env_user_id": 87611,
|
||||
# 测试账号 - 超级管理员
|
||||
"env_super_login": "chenyh",
|
||||
"env_super_password": "****chenyh-live****", # 运行时需要手动更改密码
|
||||
"env_project_url": "/floraachy/auotest",
|
||||
# 测试仓库 env_repo_owner/env_repo_identifier
|
||||
"env_repo_owner": "floraachy",
|
||||
"env_repo_identifier": "autotest",
|
||||
"env_project_id": "1445676",
|
||||
# pms相关环境变量
|
||||
"env_pms_product_id": "",
|
||||
|
||||
@@ -14,7 +14,7 @@ case_info:
|
||||
title: 获取项目分支列表
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${env_project_url}/branches.json
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/branches.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -14,7 +14,7 @@ case_info:
|
||||
title: 获取项目分支列表(无分页)
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${env_project_url}/branches/all.json
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/branches/all.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 删除一个项目分支
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${env_project_url}/branches/${branch}.json
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/branches/${branch}.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 创建一个项目分支
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${env_project_url}/branches.json
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/branches.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 更新项目默认分支
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${env_project_url}.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -13,7 +13,7 @@ case_info:
|
||||
title: 项目内获取疑修详情接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${env_project_url}/issues/${issue_id}
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/issues/${issue_id}
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -13,7 +13,7 @@ case_info:
|
||||
title: 项目内获取疑修列表接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${env_project_url}/issues/{issue_id}/journals?category=comment&page=${page}&limit=${limit}
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/issues/{issue_id}/journals?category=comment&page=${page}&limit=${limit}
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -13,7 +13,7 @@ case_info:
|
||||
title: 项目内获取疑修列表接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${env_project_url}/issues?participant_category=all&category=all&limit=${limit}&page=${page}
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/issues?participant_category=all&category=all&limit=${limit}&page=${page}
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -13,7 +13,7 @@ case_info:
|
||||
title: 项目内新建疑修评论接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${env_project_url}/issues/${issue_id}/journals
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/issues/${issue_id}/journals
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type": application/json; charset=utf-8;
|
||||
|
||||
@@ -13,7 +13,7 @@ case_info:
|
||||
title: 项目内新建疑修评论回复接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${env_project_url}/issues/${issue_id}/journals
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/issues/${issue_id}/journals
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -16,9 +16,10 @@ case_info:
|
||||
title: 项目内新建疑修接口
|
||||
run: True
|
||||
severity: normal
|
||||
url: /api/v1/${env_project_url}/issues
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/issues
|
||||
method: POST
|
||||
headers: {"Content-Type": "application/json; charset=utf-8;"}
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
request_type: json
|
||||
payload:
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 编辑一个合并请求
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${env_project_url}/edit/${pr_id}.json
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/edit/${pr_id}.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 创建一个合并请求
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${env_project_url}/pulls.json
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/pulls.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 合并一个合并请求
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${env_project_url}/edit/${pr_id}/pr_merge.json
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/edit/${pr_id}/pr_merge.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -14,7 +14,7 @@ case_info:
|
||||
title: 获取合并请求列表
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${env_project_url}/pulls.json
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/pulls.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 拒绝一个合并请求
|
||||
severity:
|
||||
run: True
|
||||
url: /api/v1/${env_project_url}/edit/${pr_id}/refuse_merge.json
|
||||
url: /api/v1/${env_repo_owner}/${env_repo_identifier}/edit/${pr_id}/refuse_merge.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 创建发行版
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${env_project_url}/releases.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/releases.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 代码库新建/上传文件,提交的分支是默认分支master
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${env_project_url}/create_file.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/create_file.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -14,7 +14,7 @@ case_info:
|
||||
title: 项目详情
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${env_project_url}/detail.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/detail.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -14,7 +14,7 @@ case_info:
|
||||
title: 项目详情(简版)
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${env_project_url}/simple.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/simple.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -14,7 +14,7 @@ case_info:
|
||||
title: 获取项目贡献者列表
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${env_project_url}/contributors.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/contributors.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -14,7 +14,7 @@ case_info:
|
||||
title: 获取项目代码目录
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${env_project_url}/entries.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/entries.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 获取项目代码子目录或者文件
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${env_project_url}/sub_entries.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/sub_entries.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -15,7 +15,7 @@ case_info:
|
||||
title: 代码库更新文件
|
||||
severity:
|
||||
run: True
|
||||
url: /api/${env_project_url}/update_file.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/update_file.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -9,6 +9,14 @@ case_common:
|
||||
- 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
|
||||
@@ -46,7 +54,74 @@ case_info:
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface: gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface: gitlink_projects_delete_project_01
|
||||
|
||||
|
||||
-
|
||||
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;
|
||||
cookies: ${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;
|
||||
cookies: ${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:
|
||||
@@ -8,7 +8,14 @@ case_common:
|
||||
- gitea
|
||||
- fork_project
|
||||
- usefixtures: gitlink_login
|
||||
- skip: 需要fork一个非本人的项目,先暂时略过
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
env_vars:
|
||||
repo_owner: ${env_login}
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
@@ -16,7 +23,7 @@ case_info:
|
||||
title: fork项目
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${repo_owner}/${repo_identifier}/forks.json
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/forks.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
@@ -43,8 +50,33 @@ case_info:
|
||||
repo_id: $.id
|
||||
repo_identifier: $.identifier
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface: gitlink_projects_delete_project_01
|
||||
|
||||
-
|
||||
id: gitlink_projects_fork_project_02
|
||||
title: fork项目 - 已经fork过了继续fork
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/${env_repo_owner}/${env_repo_identifier}/forks.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${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失败,你已拥有了这个项目 autotest
|
||||
assert_type: ==
|
||||
type_jsonpath: $.message
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
@@ -9,22 +9,30 @@ case_common:
|
||||
- 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;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
- 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;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertStatus:
|
||||
message: 断言接口返回status=0
|
||||
@@ -41,10 +49,69 @@ case_info:
|
||||
expect_value: true
|
||||
assert_type: ==
|
||||
type_jsonpath: $.praised
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface: gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface: gitlink_projects_delete_project_01
|
||||
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;
|
||||
cookies: ${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;
|
||||
cookies: ${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:
|
||||
@@ -9,6 +9,12 @@ case_common:
|
||||
- new_project
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 放置公共依赖 (仅yaml用例支持,excel用例不支持)
|
||||
common_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_projects_new_project_01
|
||||
@@ -42,11 +48,6 @@ case_info:
|
||||
repo_owner: $.login
|
||||
repo_identifier: $.identifier
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
sql:
|
||||
|
||||
-
|
||||
id: gitlink_projects_new_project_02
|
||||
title: 正确输入所有参数,新建私有项目成功
|
||||
@@ -95,11 +96,6 @@ case_info:
|
||||
repo_owner: $.login
|
||||
repo_identifier: $.identifier
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
sql:
|
||||
|
||||
-
|
||||
id: gitlink_projects_new_project_03
|
||||
title: 正确输入各项必填参数,新建项目成功(校验数据库)
|
||||
@@ -136,7 +132,3 @@ case_info:
|
||||
repo_owner: $.login
|
||||
repo_identifier: $.identifier
|
||||
case_dependence:
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
sql:
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 项目
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- unfollow_project
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_projects_unfollow_project_01
|
||||
title: 取消关注项目
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/watchers/unfollow.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${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:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
- gitlink_projects_follow_project_01
|
||||
teardown:
|
||||
interface: gitlink_projects_delete_project_01
|
||||
@@ -1,52 +0,0 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 项目
|
||||
case_markers:
|
||||
- gitlink
|
||||
- projects
|
||||
- gitea
|
||||
- unlike_project
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_projects_like_project_02
|
||||
title: 取消点赞项目
|
||||
severity: critical
|
||||
run: true
|
||||
url: /api/projects/${project_id}/praise_tread/unlike.json
|
||||
method: DELETE
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${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:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
- gitlink_projects_like_project_01
|
||||
teardown:
|
||||
interface: gitlink_projects_delete_project_01
|
||||
@@ -9,6 +9,13 @@ case_common:
|
||||
- new_wiki
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
env_vars:
|
||||
env_page_title: 新页面_${generate_words()}
|
||||
env_page_content: ${generate_paragraph}
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_projects_new_wiki_01
|
||||
@@ -19,17 +26,17 @@ case_info:
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookie}
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
owner: ${repo_owner}
|
||||
repo: ${repo_identifier}
|
||||
owner: ${env_repo_owner}
|
||||
repo: ${env_repo_identifier}
|
||||
projectId: ${env_project_id}
|
||||
pageName: 新页面_2023 # 当前页标题
|
||||
title: 新页面_2023 # 标题
|
||||
pageName: ${env_page_title} # 当前页标题
|
||||
title: ${env_page_title} # 标题
|
||||
message:
|
||||
content_base64: 5qyi6L+O5p2l5YiwV2lraQ==
|
||||
content_base64: ${string_to_base64('${env_page_content}')}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
@@ -41,8 +48,3 @@ case_info:
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface: gitlink_projects_delete_project_01
|
||||
Reference in New Issue
Block a user