作者 dengyuting

add partner

name: 合伙人添加
base_url: ${ENV(base_manager_url)}
times: 50
#times: 50
teardown_hooks:
- ${sleep(1)}
request:
... ... @@ -10,13 +10,22 @@ request:
Authorization: Bearer ${get_m_accesstoken()}
json:
partnerName: '合伙人姓名${get_stringcode(5)}'
partnerType: [1,2,3,4]
partnerType:
- id: 1
code: 事业合伙人编号${get_stringcode(8)}
- id: 2
code: 业务合伙人编号${get_stringcode(8)}
- id: 3
code: 研发合伙人编号${get_stringcode(8)}
- id: 4
code: 业务产品应用合伙人编号${get_stringcode(8)}
area: '合伙人所属区域${get_stringcode(5)}'
account: 155${get_randint(10000000,99999999)}
state: 1
cooperationTime: ${get_today()}
salesmanName: '业务员姓名${get_stringcode(5)}'
phone: 155${get_randint(10000000,99999999)}
remark: '系统自动添加'
method: POST
url: /v1/partners/add
validate:
... ...
... ... @@ -9,7 +9,11 @@ request:
Authorization: Bearer ${get_m_accesstoken()}
json:
partnerName: '合伙人姓名修改${get_stringcode(5)}'
partnerType: [1,2,3,4]
partnerType:
- id: 1
code: 事业合伙人编号${get_stringcode(8)}
- id: 2
code: 业务合伙人编号${get_stringcode(8)}
area: '合伙人所属区域修改${get_stringcode(5)}'
account: 155${get_randint(10000000,99999999)}
state: 0
... ... @@ -17,6 +21,7 @@ request:
salesmanName: '业务员姓名修改${get_stringcode(5)}'
phone: 155${get_randint(10000000,99999999)}
id: $id
remark: '系统自动修改'
method: POST
url: /v1/partners/edit
validate:
... ...
name: 合伙人移除
base_url: ${ENV(base_manager_url)}
variables:
id: 1172
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
id: $id
method: POST
url: /v1/partners/remove
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
config:
name: PARTNERS005-合伙人增删改查流程
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_add_api.yml
extract:
- partnerid: content.data.id
validate:
- equals:
- content.msg
- ok
- name: 查看合伙列表
variables:
partnerType:
partnerName: ''
api: api/m_api/partners/m_partner_list_api.yml
# extract:
# - totalRow: content.data.gridResult.totalRow
validate:
- equals:
- content.data.gridResult.lists.0.id
- $partnerid
- length_equals:
- content.data.gridResult.lists.0.partnerType
- 4
- name: 编辑合伙人
variables:
id: $partnerid
api: api/m_api/partners/m_partner_edit_api.yml
validate:
- equals:
- content.msg
- ok
- name: 查看合伙列表
variables:
partnerType:
partnerName: ''
api: api/m_api/partners/m_partner_list_api.yml
# extract:
# - totalRow: content.data.gridResult.totalRow
validate:
- equals:
- content.data.gridResult.lists.0.id
- $partnerid
- length_equals:
- content.data.gridResult.lists.0.partnerType
- 2
- name: 删除合伙人
variables:
id: $partnerid
api: api/m_api/partners/m_partner_remove_api.yml
validate:
- equals:
- content.msg
- ok
- name: 查看合伙列表
variables:
partnerType:
partnerName: ''
api: api/m_api/partners/m_partner_list_api.yml
# extract:
# - totalRow: content.data.gridResult.totalRow
validate:
- not_equals:
- content.data.gridResult.lists.0.id
- $partnerid
\ No newline at end of file
... ...
... ... @@ -71,6 +71,9 @@ testcases:
- name: PARTNERS004-合伙人批量启用
testcase: testcases/partners/PARTNERS004_list_partner_batchDisabled_testcases.yml
- name: PARTNERS005-合伙人增删改查流程
testcase: testcases/partners/PARTNERS005_partner_testcases.yml
#################################合伙人管理结束################################
#################################成员管理开始################################
- name: ADMIN001-查看所有成员列表,数据正确
... ...