作者 dengyuting

add

正在显示 34 个修改的文件 包含 316 行增加264 行删除
... ... @@ -12,3 +12,4 @@ base_ucenter=http://public-interface-test.fjmaimaimai.com
base_business_admin=http://suplus-business-admin-gateway-test.fjmaimaimai.com
companyId=214
adminphone=19911111111
partnerphone=15510101010
\ No newline at end of file
... ...
name: 获取统一用户中心公司(登录凭证)
base_url: ${ENV(base_url)}
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
access_token: ''
sign: ${make_sign($currtime, $uuid,$access_token)}
grantType: signInPassword
phone: ${ENV(partnerphone)}
password: 7c4a8d09ca3762af61e59520943dc26494f8941b
#teardown_hooks:
# - ${teardown_hook_get_authcode($response)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $access_token
X-MMM-AppName: com.mmm.partner
X-MMM-AppProject: ability
X-MMM-DeviceType: '1'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 0.1.0
json:
phone: $phone
grantType: $grantType
password: $password
clientId: 'pdf233Znkjo'
method: POST
url: /v1/auth/centerCompanys
... ...
name: 账号登录:/v1/auth/login
name: 账号登录(废弃):/v1/auth/login
base_url: ${ENV(base_url)}
variables:
currtime: ${make_time()}
... ... @@ -7,9 +7,9 @@ variables:
sign: ${make_sign($currtime, $uuid,$access_token)}
grantType: signInPassword
phone: ${get_partner_account_from_database()}
password: ${get_partner_password_from_database()}
teardown_hooks:
- ${teardown_hook_get_authcode($response)}
password: 7c4a8d09ca3762af61e59520943dc26494f8941b
#teardown_hooks:
# - ${teardown_hook_get_authcode($response)}
request:
headers:
Content-Type: application/json;charset=utf-8
... ...
name: 管理员列表
base_url: ${ENV(base_manager_url)}
variables:
searchText: ''
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
pageNumber: 1
pageSize: 100
searchText: $searchText
method: POST
url: /v1/admin/list
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
name: 管理员权限前置接口
base_url: ${ENV(base_manager_url)}
variables:
searchText: ''
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
pageNumber: 1
method: POST
url: /v1/admin/permission
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
name: 合伙人添加
base_url: ${ENV(base_manager_url)}
times: 50
teardown_hooks:
- ${sleep(1)}
request:
headers:
Content-Type: application/json;charset=utf-8
... ...
name: 合伙人批量禁用:/v1/partners/batchDisabled
name: 合伙人批量禁用/启用:/v1/partners/batchDisabled
base_url: ${ENV(base_manager_url)}
variables:
id:
- 1
- 2
status: 1
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -11,6 +12,7 @@ request:
Authorization: Bearer ${get_m_accesstoken()}
json:
id: $id
status: $status
method: POST
url: /v1/partners/batchDisabled
validate:
... ...
name: 合伙人查看
name: 合伙人详情
base_url: ${ENV(base_manager_url)}
variables:
id: 1045
... ...
config:
name: 新增管理员
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 管理员新增
api: api/m_api/admin/m_admin_update(new)_api.yml
validate:
- eq:
- content.msg
- ok
config:
name: ADMIN001-查看所有成员列表,数据正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 管理员列表
api: api/m_api/admin/m_admin_list_api.yml
extract:
- totalRow: content.data.gridResult.totalRow
validate:
- length_equals:
- content.data.gridResult.lists
- $totalRow
... ...
config:
name: 编辑管理员
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 管理员编辑
api: api/m_api/admin/m_admin_update(edit)_api.yml
validate:
- eq:
- content.msg
- ok
config:
name: ADMIN002-查看成员列表-空列表返回正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 管理员列表
variables:
searchText: '!@#$%'
api: api/m_api/admin/m_admin_list_api.yml
extract:
- totalRow: content.data.gridResult.totalRow
validate:
- length_equals:
- content.data.gridResult.lists
- $totalRow
- eq:
- content.code
- 0
... ...
config:
name: ADMIN003-查看权限
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 查看登陆者权限
api: api/m_api/admin/m_admin_permission_api.yml
validate:
- length_equals:
- content.data
- 7
- eq:
- content.code
- 0
... ...
config:
name: 搜索管理员
base_url: ${ENV(base_manager_url)}
variables:
phone: ${convert_to_string(10000000001)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 管理员搜索
api: api/m_api/admin/m_admin_list_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.lists.0.statue
- 1
config:
name: 查看管理员
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 管理员查看
api: api/m_api/admin/m_admin_detail_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.status
- 1
config:
name: 禁用管理员
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 管理员禁用
api: api/m_api/admin/m_admin_forbidden_0_api.yml
validate:
- eq:
- content.msg
- ok
config:
name: 启用管理员
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 管理员启用
api: api/m_api/admin/m_admin_forbidden_1_api.yml
validate:
- eq:
- content.msg
- ok
... ... @@ -29,7 +29,7 @@ teststeps:
- ok
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_partner_list_api.yml
api: api/m_api/actual/m_order_actual_list_api.yml
extract:
- actual_id: content.data.gridResult.lists.0.id
validate:
... ...
... ... @@ -140,7 +140,7 @@ teststeps:
- 1
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_partner_list_api.yml
api: api/m_api/actual/m_order_actual_list_api.yml
validate:
- eq:
- content.data.gridResult.lists.0.id
... ...
... ... @@ -136,7 +136,7 @@ teststeps:
- 1
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_partner_list_api.yml
api: api/m_api/actual/m_order_actual_list_api.yml
validate:
- eq:
- content.data.gridResult.lists.0.id
... ...
... ... @@ -167,7 +167,7 @@ teststeps:
- 1
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_partner_list_api.yml
api: api/m_api/actual/m_order_actual_list_api.yml
validate:
- eq:
- content.data.gridResult.lists.0.id
... ...
... ... @@ -25,7 +25,7 @@ teststeps:
- ok
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_partner_list_api.yml
api: api/m_api/actual/m_order_actual_list_api.yml
extract:
- actual_id: content.data.gridResult.lists.0.id
validate:
... ...
config:
name: 新增合伙人
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teardown_hooks:
- ${sleep(2)}
teststeps:
#- name: $phone 登录系统
# testcase: testcases/m_login_testcases.yml
- name: $phone 合伙人新增
api: api/m_api/partners/m_partner_add_api.yml
validate:
- eq:
- content.msg
- ok
config:
name: PARTNERS001-查看合伙人列表,数据正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 查看合伙列表
api: api/m_api/partners/m_partner_list_api.yml
extract:
- totalRow: content.data.gridResult.totalRow
validate:
- length_equals:
- content.data.gridResult.lists
- $totalRow
... ...
config:
name: 合伙人编辑
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 编辑合伙人
api: api/m_api/partners/m_partner_edit_api.yml
validate:
- eq:
- content.msg
- ok
config:
name: PARTNERS002-合伙人查询无数据时,返回正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 查看合伙列表
variables:
partnerType: 2
partnerName: '!@#¥%'
api: api/m_api/partners/m_partner_list_api.yml
extract:
- totalRow: content.data.gridResult.totalRow
validate:
- length_equals:
- content.data.gridResult.lists
- $totalRow
... ...
config:
name: PARTNERS003-合伙人批量禁用
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 查看合伙列表,获取合伙人id
variables:
partnerType:
partnerName: ''
api: api/m_api/partners/m_partner_list_api.yml
extract:
- totalRow: content.data.gridResult.totalRow
- partner_id1: content.data.gridResult.lists.0.id
- partner_id2: content.data.gridResult.lists.1.id
validate:
- length_equals:
- content.data.gridResult.lists
- $totalRow
- name: 合伙人批量禁用
variables:
id:
- $partner_id1
- $partner_id2
status: 0
api: api/m_api/partners/m_partner_batchDisabled_api.yml
validate:
- equals:
- content.code
- 0
- name: 查看合伙人 $partner_id1 详情,状态为禁用
variables:
id: $partner_id1
api: api/m_api/partners/m_partner_detail_api.yml
validate:
- eq:
- content.data.state
- 0
- name: 查看合伙人 $partner_id2 详情,状态为禁用
variables:
id: $partner_id2
api: api/m_api/partners/m_partner_detail_api.yml
validate:
- eq:
- content.data.state
- 0
\ No newline at end of file
... ...
config:
name: 搜索合伙类型
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
status: ${get_status_from_database()}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 搜索合伙类型
api: api/m_api/partners/m_partner_partnertype_list_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.lists.0.state
- $status
config:
name: PARTNERS004-合伙人批量启用
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 查看合伙列表,获取合伙人id
variables:
partnerType:
partnerName: ''
api: api/m_api/partners/m_partner_list_api.yml
extract:
- totalRow: content.data.gridResult.totalRow
- partner_id1: content.data.gridResult.lists.0.id
- partner_id2: content.data.gridResult.lists.1.id
validate:
- length_equals:
- content.data.gridResult.lists
- $totalRow
- name: 合伙人批量禁用
variables:
id:
- $partner_id1
- $partner_id2
status: 1
api: api/m_api/partners/m_partner_batchDisabled_api.yml
validate:
- equals:
- content.code
- 0
- name: 查看合伙人 $partner_id1 详情,状态为禁用
variables:
id: $partner_id1
api: api/m_api/partners/m_partner_detail_api.yml
validate:
- eq:
- content.data.state
- 1
- name: 查看合伙人 $partner_id2 详情,状态为禁用
variables:
id: $partner_id2
api: api/m_api/partners/m_partner_detail_api.yml
validate:
- eq:
- content.data.state
- 1
\ No newline at end of file
... ...
config:
name: 搜索合伙人名称
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
status: ${get_status_from_database()}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 搜索合伙人名称
api: api/m_api/partners/m_partner_partnerName_list_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.lists.0.state
- $status
config:
name: 查看合伙人
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
status: ${get_status_from_database()}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 查看合伙人
api: api/m_api/partners/m_partner_detail_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.state
- $status
config:
name: 禁用合伙人
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 禁用合伙人
api: api/m_api/partners/m_partner_set-status_1_api.yml
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
config:
name: 启用合伙人
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 启用合伙人
api: api/m_api/partners/m_partner_set-status_2_api.yml
validate:
- eq:
- content.msg
- ok
... ... @@ -33,3 +33,28 @@ testcases:
#
#- name: PUR002-意向订单-发货(已废弃)
# testcase: testcases/order/purpose/PUR002_pur_sendout_testcases.yml
#################################合伙人管理开始################################
- name: PARTNERS001-查看合伙人列表,数据正确
testcase: testcases/partners/PARTNERS001_list_partner_testcases.yml
- name: PARTNERS002-合伙人查询无数据时,返回正确
testcase: testcases/partners/PARTNERS002_list_partner_search_null_testcases.yml
- name: PARTNERS003-合伙人批量禁用
testcase: testcases/partners/PARTNERS003_list_partner_batchDisabled_testcases.yml
- name: PARTNERS004-合伙人批量启用
testcase: testcases/partners/PARTNERS004_list_partner_batchDisabled_testcases.yml
#################################合伙人管理结束################################
#################################成员管理开始################################
- name: ADMIN001-查看所有成员列表,数据正确
testcase: testcases/admin/ADMIN001_list_admin_testcases.yml
- name: ADMIN002-查看成员列表-空列表返回正确
testcase: testcases/admin/ADMIN002_list_admin_search_null_testcases.yml
- name: ADMIN003-查看权限
testcase: testcases/admin/ADMIN003_list_admin_permission_testcases.yml
#################################成员管理结束################################
\ No newline at end of file
... ...