作者 dengyuting

add

正在显示 61 个修改的文件 包含 535 行增加731 行删除
#base_url=https://ability-test.fjmaimaimai.com
#base_public_url = http://public-interface-test.fjmaimaimai.com/
#base_public_url = https://public-interface.fjmaimaimai.com/mmm-partnermg/
#base_business_url = https://suplus-business-admin-gateway-test.fjmaimaimai.com/
#base_worth_url = https://suplus-worth-web-gateway-test.fjmaimaimai.com/
#base_public_url = http://public-interface-test.fjmaimaimai.com
#base_public_url = https://public-interface.fjmaimaimai.com/mmm-partnermg
#base_business_url = https://suplus-business-admin-gateway-test.fjmaimaimai.com
#base_worth_url = https://suplus-worth-web-gateway-test.fjmaimaimai.com
#base_manager_url= https://public-interface.fjmaimaimai.com/mmm-partnermg
#base_manager_url=http://mmm-partnermg-test.fjmaimaimai.com/
base_manager_url=https://public-interface-test.fjmaimaimai.com/partnermg/
#base_manager_url=https://public-interface.fjmaimaimai.com/mmm-partnermg/
base_url = http://mmm-partner-test.fjmaimaimai.com/
\ No newline at end of file
base_manager_url=http://mmm-partnermg-test.fjmaimaimai.com
#base_manager_url=https://public-interface-test.fjmaimaimai.com/partnermg
#base_manager_url=https://public-interface.fjmaimaimai.com/mmm-partnermg
base_url = http://mmm-partner-test.fjmaimaimai.com/
base_ucenter=http://public-interface-test.fjmaimaimai.com
base_business_admin=http://suplus-business-admin-gateway-test.fjmaimaimai.com
companyId=214
adminphone=19911111111
\ No newline at end of file
... ...
name: 实际订单新增
base_url: ${ENV(base_manager_url)}
variables:
shipmentsId: '实发订单发货单号${get_nowtime()}'
partnerID: 1047
commissionProportion: 5
orderNum1: 100
univalence1: 15
partnerRatio1: 10
orderNum2: 200
univalence2: 15
partnerRatio2: 20
teardown_hooks:
- ${sleep(5)}
- ${sleep(2)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
orderId: ${get_nowtime()}
orderAmountAdjustmentCount: 13
orderNumCount: 29
shipmentsId: ${get_nowtime()}
buyer: 我是客户${get_second()}
orderDist: '福建一区'
partnerID: ${get_partner_id_from_database()}
partner: ${get_partner_name_from_database()}
commissionProportion: 10.1
orderId: '实发订单号${get_nowtime()}'
shipmentsId: $shipmentsId
partnerID: $partnerID
buyer: '客户名称${get_stringcode(5)}'
orderDist: '订单区域${get_stringcode(5)}'
commissionProportion: $commissionProportion
product:
- productName: 产品名称${get_second()}
orderNum: 18
univalence: 0.19
partnerRatio: 5.2
- productName: 产品名称${get_second()}
orderNum: 29
univalence: 0.19
partnerRatio: 5.2
- productName: 产品名称${get_stringcode(5)}
orderNum: $orderNum1
univalence: $univalence1
partnerRatio: $partnerRatio1
- productName: 产品名称${get_stringcode(5)}
orderNum: $orderNum2
univalence: $univalence2
partnerRatio: $partnerRatio2
method: POST
url: v1/order/actual/update
url: /v1/order/actual/update
validate:
- eq:
- content.msg
... ...
name: 删除实际订单
base_url: ${ENV(base_manager_url)}
variables:
id: ${get_actual_id_from_database()}
id: 1021
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -10,7 +10,7 @@ request:
json:
id: $id
method: POST
url: v1/order/actual/del
url: /v1/order/actual/del
validate:
- eq:
- content.msg
... ...
name: 查看实际订单详情
base_url: ${ENV(base_manager_url)}
variables:
id: ${get_actual_id_from_database()}
id: '1020'
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
id: ${convert_to_string($id)}
id: $id
method: POST
url: v1/order/actual/detail
url: /v1/order/actual/detail
validate:
- eq:
- content.msg
... ...
name: 合伙人搜索——实际订单列表
base_url: ${ENV(base_manager_url)}
variables:
partner: ${get_partner_id_from_database()}
partner_id: 1047
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -10,10 +10,10 @@ request:
json:
pageNumber: 1
pageSize: 10
partner: $partner
partner: $partner_id
searchText: ''
method: POST
url: v1/order/actual/list
url: /v1/order/actual/list
validate:
- eq:
- content.msg
... ...
name: 搜索发货单号——实际订单列表
base_url: ${ENV(base_manager_url)}
variables:
searchText: ${get_actual_delivery_code_from_database()}
partner: ${get_partner_id_from_database()}
searchText: '发货单'
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -11,7 +10,7 @@ request:
json:
pageNumber: 1
pageSize: 10
partner: $partner
partner: 1047
searchText: $searchText
method: POST
url: v1/order/actual/list
... ...
name: 管理员详情
name: 实际订单编辑
base_url: ${ENV(base_manager_url)}
variables:
id: ${get_admin_id_from_database()}
id: 1020
teardown_hooks:
- ${sleep(2)}
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -9,12 +11,24 @@ request:
Authorization: Bearer ${get_m_accesstoken()}
json:
id: $id
orderId: '订单号修改${get_nowtime()}'
shipmentsId: '发货单号修改${get_nowtime()}'
partnerID: 1047
buyer: '客户名称修改${get_stringcode(5)}'
orderDist: '订单区域修改${get_stringcode(5)}'
commissionProportion: 5.1
product:
- productName: 产品名称修改${get_stringcode(5)}
orderNum: 101
univalence: 15.1
partnerRatio: 10.1
- productName: 产品名称修改${get_stringcode(5)}
orderNum: 201
univalence: 15.1
partnerRatio: 20.1
method: POST
url: v1/admin/detail
url: /v1/order/actual/update
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.status
- 1
\ No newline at end of file
... ...
name: 管理员列表
base_url: ${ENV(base_manager_url)}
variables:
searchText: ${get_account_from_database()}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
searchText: $searchText
pageNumber: 1
pageSize: 10
method: POST
url: v1/admin/list
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.lists.0.statue
- 1
\ No newline at end of file
name: 管理员修改
base_url: ${ENV(base_manager_url)}
variables:
account: ${get_account_from_database()}
id: ${get_admin_id_from_database()}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
account: $account
status: 1
id: $id
permissionType: [2,3,6]
method: POST
url: v1/admin/update
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
name: 管理员新增
base_url: ${ENV(base_manager_url)}
variables:
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
account: ${convert_to_string($account)}
status: 1
# id: 6
permissionType: [2,3]
method: POST
url: v1/admin/update
name: 管理员禁用
name: 事业分红详情
base_url: ${ENV(base_manager_url)}
variables:
id: ${get_admin_id_from_database()}
id: '1051'
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -9,10 +9,11 @@ request:
Authorization: Bearer ${get_m_accesstoken()}
json:
id: $id
statue: 0
method: POST
url: v1/admin/forbidden
url: /v1/dividends/detail
# extract:
# - num: content.data.gridResult.totalRow
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
- ok
... ...
name: 禁用合伙人
name: 事业分红列表
base_url: ${ENV(base_manager_url)}
variables:
id: ${get_partner_id_from_database()}
#variables:
# orderid: ${get_actual_id_from_database()}
# msg: ok
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
status: 1
id: $id
pageNumber: 1
pageSize: 500
partner: ''
searchText: ''
method: POST
url: v1/partners/set-status
url: /v1/dividends/list
# extract:
# - num: content.data.gridResult.totalRow
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
- ok
... ...
name: 账号登录
base_url: ${ENV(base_manager_url)}
variables:
username: ${convert_to_string(10000000001)}
password: 7c4a8d09ca3762af61e59520943dc26494f8941b
teardown_hooks:
- ${teardown_hook_get_m_accesstoken($response)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
json:
password: $password
username: $username
method: POST
url: v1/auth/login
validate:
- eq:
- content.msg
- ok
name: 修改密码
name: 切换公司:/v1/auth/change_company
base_url: ${ENV(base_manager_url)}
variables:
msg: 成功
teardown_hooks:
- ${teardown_hook_get_m_accesstoken($response)}
- ${teardown_hook_get_m_refreshtoken($response)}
request:
headers:
Content-Type: application/json;charset=utf-8
Authorization: ${get_m_accesstoken()}
x-mmm-refreshtoken: ${get_m_refreshtoken()}
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
pwd: '7c4a8d09ca3762af61e59520943dc26494f8941b'
company_id: 4
method: POST
url: v1/auth/login
url: /v1/auth/change_company
validate:
- eq:
- content.msg
- ok
- $msg
\ No newline at end of file
... ...
name: 分红管理-编辑
base_url: ${ENV(base_manager_url)}
name: 选择公司登录
base_url: ${ENV(base_business_admin)}
variables:
orderid: ${get_actual_id_from_database()}
msg: ok
companyId: ${ENV(companyId)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
Authorization: Bearer $pwdLogintoken
json:
id: $orderid
dividendPayment:
- quantityControl:
stateOfPayment: 2
remark:
productId: ${get_dividends_ID_from_database(0)}
- quantityControl:
stateOfPayment: 2
remark:
productId: ${get_dividends_ID_from_database(1)}
companyId: $companyId
method: POST
url: v1/dividends/edit
url: /auth/anonymousLogin
extract:
anonymousLogintoken: content.data.access.token
validate:
- eq:
- content.msg
- $msg
- eq:
- content.msg
- $msg
\ No newline at end of file
... ...
name: 启用合伙人
base_url: ${ENV(base_manager_url)}
name: 单点登录
base_url: ${ENV(base_business_admin)}
variables:
id: ${get_partner_id_from_database()}
msg: ok
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
Authorization: Bearer $anonymousLogintoken
json:
status: 2
id: $id
companyId: 214
method: POST
url: v1/partners/set-status
url: /auth/getSingleLoginMenus
extract:
url: content.data.list.0.url
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
- eq:
- content.msg
- $msg
\ No newline at end of file
... ...
name: 管理员禁启用
name: 账号登录:/auth/login
base_url: ${ENV(base_manager_url)}
variables:
id: ${get_admin_id_from_database()}
secret: ${get_secret($url)}
msg: ok
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
id: $id
statue: 1
code: $secret
method: POST
url: v1/admin/forbidden
url: /v1/auth/login
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
- eq:
- content.msg
- $msg
\ No newline at end of file
... ...
name: 账号登录:/auth/login
base_url: ${ENV(base_business_admin)}
variables:
phone: ${ENV(adminphone)}
password: 7c4a8d09ca3762af61e59520943dc26494f8941b
msg: ok
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
json:
username: ${phone}
password: ${password}
method: POST
url: /auth/pwdLogin
extract:
pwdLogintoken: content.data.access.token
validate:
- eq:
- content.msg
- $msg
\ No newline at end of file
... ...
... ... @@ -5,18 +5,17 @@ request:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
#
json:
partnerName: '卞信华'
partnerType: 3
area: '福建省福州市XXXXX区'
account: $account
partnerName: '合伙人姓名${get_stringcode(5)}'
partnerType: [1,2,3,4]
area: '合伙人所属区域${get_stringcode(5)}'
account: 155${get_randint(10000000,99999999)}
state: 1
cooperationTime: ${get_today()}
salesmanName: '小小'
phone: ${convert_to_string($account)}
salesmanName: '业务员姓名${get_stringcode(5)}'
phone: 155${get_randint(10000000,99999999)}
method: POST
url: v1/partners/add
url: /v1/partners/add
validate:
- eq:
- content.msg
... ...
name: 合伙人查看
base_url: ${ENV(base_manager_url)}
variables:
id: ${get_admin_id_from_database()}
id: 1045
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -10,11 +10,8 @@ request:
json:
id: $id
method: POST
url: v1/partners/detail
url: /v1/partners/detail
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.state
- $status
\ No newline at end of file
- ok
\ No newline at end of file
... ...
name: 合伙人编辑
base_url: ${ENV(base_manager_url)}
variables:
account: ${get_partner_account_from_database()}
id: ${get_partner_id_from_database()}
partnerName: ${get_partner_name_from_database()}
area: ${get_area_from_database()}
salesmanName: ${get_salesman_from_database()}
phone: ${get_partner_account_from_database()}
id: 1046
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
partnerName: $partnerName
partnerType: 1
area: $area
account: $account
state: 1
partnerName: '合伙人姓名修改${get_stringcode(5)}'
partnerType: [1,2,3,4]
area: '合伙人所属区域修改${get_stringcode(5)}'
account: 155${get_randint(10000000,99999999)}
state: 0
cooperationTime: ${get_today()}
salesmanName: $salesmanName
phone: $phone
salesmanName: '业务员姓名修改${get_stringcode(5)}'
phone: 155${get_randint(10000000,99999999)}
id: $id
method: POST
url: v1/partners/edit
url: /v1/partners/edit
validate:
- eq:
- content.msg
... ...
name: /v1/partners/list
base_url: ${ENV(base_manager_url)}
variables:
status: ${get_status_from_database()}
partnerName: ${get_partner_name_from_database()}
partnerName: '合伙人'
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -10,7 +9,7 @@ request:
Authorization: Bearer ${get_m_accesstoken()}
json:
partnerName: $partnerName
partnerType: 1
partnerType:
pageNumber: 1
pageSize: 10
method: POST
... ... @@ -18,7 +17,4 @@ request:
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.lists.0.state
- $status
\ No newline at end of file
- ok
\ No newline at end of file
... ...
name: /v1/partners/list
base_url: ${ENV(base_manager_url)}
variables:
status: ${get_status_from_database()}
partnerType: 2
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -9,15 +9,12 @@ request:
Authorization: Bearer ${get_m_accesstoken()}
json:
partnerName: ""
partnerType: 1
partnerType: $partnerType
pageNumber: 1
pageSize: 10
method: POST
url: v1/partners/list
url: /v1/partners/list
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.lists.0.state
- $status
\ No newline at end of file
- ok
\ No newline at end of file
... ...
name: 意向订单新增
base_url: ${ENV(base_manager_url)}
variables:
orderId: '意向订单号${get_nowtime()}'
partnerID: 1047
commissionProportion: 5
orderNum1: 100
univalence1: 15
partnerRatio1: 10
orderNum2: 200
univalence2: 15
partnerRatio2: 20
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
orderId: ${get_nowtime()}
buyer: 我是客户${get_second()}
orderDist: '福建二区'
partnerID: ${get_partner_id_from_database()}
# partnerID: 003
commissionProportion: 10.2
orderId: '意向订单号${get_nowtime()}'
buyer: '客户名称${get_stringcode(5)}'
orderDist: '订单区域${get_stringcode(5)}'
partnerID: $partnerID
commissionProportion: $commissionProportion
product:
- productName: 产品名称${get_second()}
orderNum: 33
univalence: 1.12
partnerRatio: 1.27
- productName: 产品名称${get_second()}
orderNum: 45
univalence: 2.22
partnerRatio: 5.7
- productName: 产品名称${get_stringcode(5)}
orderNum: $orderNum1
univalence: $univalence1
partnerRatio: $partnerRatio1
- productName: 产品名称${get_stringcode(5)}
orderNum: $orderNum2
univalence: $univalence2
partnerRatio: $partnerRatio2
# - productName: 产品名称${get_second()}
# orderNum: 3
# univalence: 3.22
... ... @@ -218,7 +227,7 @@ request:
# univalence: 2.22
# partnerRatio: 5.2
method: POST
url: v1/order/purpose/update
url: /v1/order/purpose/update
validate:
- eq:
- content.msg
... ...
name: 删除意向订单
base_url: ${ENV(base_manager_url)}
variables:
id: ${get_actual_id_from_database()}
id: 1027
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -10,7 +10,7 @@ request:
json:
id: $id
method: POST
url: v1/order/purpose/del
url: /v1/order/purpose/del
validate:
- eq:
- content.msg
... ...
name: 查看意向订单详情
base_url: ${ENV(base_manager_url)}
variables:
id: ${get_purpose_id_from_database()}
id: '1025'
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
id: ${convert_to_string($id)}
id: $id
method: POST
url: v1/order/purpose/detail
url: /v1/order/purpose/detail
validate:
- eq:
- content.msg
... ...
name: 意向订单编辑
base_url: ${ENV(base_manager_url)}
variables:
orderid: ${get_purpose_id_from_database()}
partner: ${get_partner_name_from_database()}
id: 1025
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
orderId: ${get_nowtime()}
buyer: 我是客户${get_second()}
orderDist: '福建二区'
partnerID: ${get_partner_id_from_database()}
partner: $partner
id: $orderid
commissionProportion: 10.2
orderId: '意向订单号编辑${get_nowtime()}'
buyer: '客户名称编辑${get_stringcode(5)}'
orderDist: '订单区域编辑${get_stringcode(5)}'
partnerID: 1047
commissionProportion: 5.1
id: $id
product:
- id: ${get_ID_from_database(0)}
productName: 产品名称${get_second()}
orderNum: 33
univalence: 1.12
partnerRatio: 1.27
- id: ${get_ID_from_database(1)}
productName: 产品名称${get_second()}
orderNum: 45
univalence: 2.22
partnerRatio: 5.7
- productName: 产品名称修改${get_stringcode(5)}
orderNum: 101
univalence: 15.1
partnerRatio: 10.1
- productName: 产品名称修改${get_stringcode(5)}
orderNum: 201
univalence: 15.1
partnerRatio: 20.1
method: POST
url: v1/order/purpose/update
url: /v1/order/purpose/update
validate:
- eq:
- content.msg
... ...
name: 合伙人搜索——意向订单列表
base_url: ${ENV(base_manager_url)}
variables:
partner: ${get_partner_id_from_database()}
partner_id: 1047
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -10,10 +10,10 @@ request:
json:
pageNumber: 1
pageSize: 10
partner: $partner
partner: $partner_id
searchText: ''
method: POST
url: v1/order/purpose/list
url: /v1/order/purpose/list
validate:
- eq:
- content.msg
... ...
name: 搜索订单号——意向订单列表
base_url: ${ENV(base_manager_url)}
variables:
searchText: ${get_purpose_orderId_from_database(order)}
searchText: '合伙人123'
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -13,7 +13,7 @@ request:
partner: 29
searchText: $searchText
method: POST
url: v1/order/purpose/list
url: /v1/order/purpose/list
validate:
- eq:
- content.msg
... ...
name: 意向订单发货
base_url: ${ENV(base_manager_url)}
variables:
orderid: ${get_purpose_id_from_database()}
#variables:
# orderid: ${get_purpose_id_from_database()}
# id: 1026
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
shipmentsId: ${get_nowtime()}
id: ${convert_to_string($orderid)}
shipmentsId: '意向订单发货${get_nowtime()}'
id: '1026'
productDetail:
- id: ${get_ID_from_database(0)}
productName: ${get_productName_from_database(0)}
orderNum: ${get_orderNum_from_database(0)}
univalence: ${get_univalence_from_database(0)}
partnerRatio: ${get_partnerRatio_from_database(0)}
- id: ${get_ID_from_database(1)}
productName: ${get_productName_from_database(1)}
orderNum: ${get_orderNum_from_database(1)}
univalence: ${get_univalence_from_database(1)}
partnerRatio: ${get_partnerRatio_from_database(1)}
- productName: '意向订单发货产品名称${get_stringcode(5)}'
orderNum: 105
univalence: 15.5
partnerRatio: 10.5
id: 2048
method: POST
url: v1/order/purpose/sendout
url: /v1/order/purpose/sendout
validate:
- eq:
- content.msg
... ...
import random
import string
import time,datetime
from urllib import parse
from helpfunc.login_func import *
from helpfunc.pg_db_func import *
from helpfunc.db_func import *
... ... @@ -86,6 +88,37 @@ def get_Decembe_timestamp():
return int(time.mktime(time.strptime('2021-3-31 23:59:59', '%Y-%m-%d %H:%M:%S'))*1000)
#获取secret用于子系统单点登录
def get_secret(url):
urllist = url.split('code=',1)
code = urllist[1]
de_code = parse.unquote(code)
return de_code
def get_stringcode(n):
"""
随机生成n位数字符串
:param n:
:return:
"""
ran_str = ''.join(random.sample(string.ascii_letters + string.digits, n))
return ran_str
def get_randint(value1, value2):
return randint(value1, value2)
# print(get_Decembe_timestamp())
def add(x, y):
"""
对两个数相加
:param x:
:param y:
:return:
"""
return int(int(x)+y)
def convert_to_string(value):
return str(value)
\ 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/actual/m_add_order_actual_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/actual/m_order_actual_partner_list_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/actual/m_order_actual_searchText_list_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/actual/m_order_actual_detail_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/actual/m_order_actual_del_api.yml
validate:
- eq:
- content.msg
- ok
config:
name: COM001-新增实际订单
base_url: ${ENV(base_manager_url)}
variables:
shipmentsId: '实发订单发货单号${get_nowtime()}'
partnerID: 1047
commissionProportion: 5
orderNum1: 100
univalence1: 15
partnerRatio1: 10
orderNum2: 200
univalence2: 15
partnerRatio2: 20
export:
- actual_id
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 新增实发订单
api: api/m_api/actual/m_add_order_actual_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_partner_list_api.yml
extract:
- actual_id: content.data.gridResult.lists.0.id
validate:
- eq:
- content.data.gridResult.lists.0.shipmentsId
- $shipmentsId
\ No newline at end of file
... ...
config:
name: m_login_testcases
# base_url: ${ENV(base_manager_url)}
variables:
phone: ${ENV(adminphone)}
teststeps:
- name: $phone 登录企业平台
api: api/m_api/m_login_api/m_pwdLogin_api.yml
extract:
pwdLogintoken: content.data.access.token
validate:
- eq:
- content.msg
- ok
- name: 选择公司登录
variables:
companyId: ${ENV(companyId)}
api: api/m_api/m_login_api/m_anonymousLogin_api.yml
extract:
anonymousLogintoken: content.data.access.token
validate:
- eq:
- content.msg
- ok
- name: 单点登录,获取secret用于登录子系统
api: api/m_api/m_login_api/m_getSingleLoginMenus_api.yml
extract:
url: content.data.list.1.url
validate:
- eq:
- content.msg
- ok
- name: 使用secret登录合伙人系统
api: api/m_api/m_login_api/m_login_api.yml
teardown_hooks:
- ${teardown_hook_get_m_accesstoken($response)}
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
config:
name: 已收明细——分红订单
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_partner_account_from_database()}
order_code: ${get_detailAction_0_order_code_from_database()}
plan_order_amount: ${get_detailAction_0_plan_order_amount_from_database()}
use_partner_bonus: ${get_detailAction_0_use_partner_bonus_amount_from_database()}
msg: 成功
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/login_testcases.yml
- name: $phone 已收明细——分红订单
api: api/app_api/dividend/orders001.api.yml
validate:
- eq:
- content.msg
- $msg
- eq:
- content.data.list.0.deliveryNo
- $order_code
- eq:
- content.data.list.0.orderAmount
- $plan_order_amount
- eq:
- content.data.list.0.dividendReceivable
- $use_partner_bonus
\ No newline at end of file
config:
name: 未收明细——分红订单
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_partner_account_from_database()}
order_code: ${get_detailAction_1_order_code_from_database()}
plan_order_amount: ${get_detailAction_0_plan_order_amount_from_database()}
use_partner_bonus: ${get_detailAction_0_use_partner_bonus_amount_from_database()}
msg: 成功
teardown_hooks:
- ${sleep(3)}
teststeps:
- name: $phone 登录系统
testcase: testcases/login_testcases.yml
- name: $phone 未收明细——分红订单
api: api/app_api/dividend/orders002.api.yml
validate:
- eq:
- content.msg
- $msg
- eq:
- content.data.list.0.deliveryNo
- $order_code
- eq:
- content.data.list.0.orderAmount
- $plan_order_amount
- eq:
- content.data.list.0.dividendReceivable
- $use_partner_bonus
\ No newline at end of file
config:
name: 分红统计
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_partner_account_from_database()}
receivable: ${get_receivable_from_database()}
received: ${get_received_from_database()}
outstanding: ${get_outstanding_from_database()}
msg: 成功
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/login_testcases.yml
- name: $phone 分红统计
api: api/app_api/dividend/statistics_api.yml
validate:
- eq:
- content.msg
- $msg
- eq:
- content.data.statistics.receivable
- $receivable
- eq:
- content.data.statistics.quarters.1.received
- $received
- eq:
- content.data.statistics.quarters.1.outstanding
- $outstanding
\ No newline at end of file
config:
name: DIV001-事业分红列表-数据源来自于实发订单
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/dividends/m_dividends_list_api.yml
extract:
- num1: content.data.gridResult.totalRow
- name: 新增实发订单
api: api/m_api/actual/m_add_order_actual_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看事业分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.totalRow
- ${add($num1,1)}
\ No newline at end of file
... ...
config:
name: DIV002-事业分红列表-数据源不来自于意向订单
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/dividends/m_dividends_list_api.yml
extract:
- num1: content.data.gridResult.totalRow
- name: 新增意向订单
api: api/m_api/purpose/m_order_purpose_add_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看事业分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.totalRow
- ${add($num1,0)}
\ No newline at end of file
... ...
config:
name: DIV003-事业分红详情-各个值计算正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: 新增实际订单
testcase: testcases/common/COM001_actual_add_testcases.yml
export:
- actual_id
- name: 查看该订单的事业分红详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/dividends/m_dividends_detail_api.yml
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
config:
name: 分红管理-编辑
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_partner_account_from_database()}
msg: ok
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 分红管理-编辑
api: api/m_api/dividends/m_order_dividends_edit_api.yml
validate:
- eq:
- content.msg
- $msg
\ No newline at end of file
config:
name: login_testcases
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teststeps:
- name: $phone 登录系统
api: api/m_api/m_login_api.yml
teardown_hooks:
- ${teardown_hook_get_m_accesstoken($response)}
validate:
- eq:
- content.msg
- ok
config:
name: login_testcases
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
teststeps:
- name: $phone 登录系统
api: api/m_api/m_login_api.yml
teardown_hooks:
- ${teardown_hook_get_m_accesstoken($response)}
validate:
- eq:
- content.msg
- ok
- name: $phone 修改密码
api: api/m_api/m_pwd_update_api.yml
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
config:
name: ACT001-实际订单-各个值计算正确
base_url: ${ENV(base_manager_url)}
variables:
shipmentsId: '实发订单发货单号${get_nowtime()}'
partnerID: 1047
commissionProportion: 5
orderNum1: 100
univalence1: 15
partnerRatio1: 10
orderNum2: 200
univalence2: 15
partnerRatio2: 20
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 新增实发订单
api: api/m_api/actual/m_add_order_actual_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_partner_list_api.yml
extract:
- actual_id: content.data.gridResult.lists.0.id
validate:
- eq:
- content.data.gridResult.lists.0.shipmentsId
- $shipmentsId
- name: 查看实际订单详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/actual/m_order_actual_detail_api.yml
validate:
- eq:
- content.data.orderNumCount
- ${add($orderNum1,$orderNum2)}
- eq:
- content.data.orderAmountAdjustmentCount
- 4500
- eq:
- content.data.product.0.orderPrice
- 1500
- eq:
- content.data.product.1.orderPrice
- 3000
\ No newline at end of file
... ...
config:
name: 订单详情
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_partner_account_from_database()}
msg: 成功
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/login_testcases.yml
- name: $phone 订单详情
api: api/app_api/order/details_api.yml
validate:
- eq:
- content.msg
- $msg
\ No newline at end of file
config:
name: 实发订单列表
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_partner_account_from_database()}
total: ${get_total_from_database()}
msg: 成功
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/login_testcases.yml
- name: $phone 实发订单列表
api: api/app_api/order/list_api.yml
validate:
- eq:
- content.msg
- $msg
- eq:
- content.data.total
- $total
\ No newline at end of file
config:
name: 订单统计
base_url: ${ENV(base_url)}
variables:
phone: ${get_partner_account_from_database()}
todayRealQuantity: ${get_todayRealQuantity_from_database()}
todayRealMoney: ${get_todayRealMoney_from_database()}
cumulativeQuantity: ${get_cumulativeQuantity_from_database()}
cumulativeMoney: ${get_cumulativeMoney_from_database()}
msg: 成功
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: 登录系统
testcase: testcases/login_testcases.yml
- name: $phone 订单统计
api: api/app_api/order/statistics_api.yml
validate:
- eq:
- content.msg
- $msg
- eq:
- content.data.statistics.cumulativeMoney
- $cumulativeMoney
- eq:
- content.data.statistics.cumulativeQuantity
- $cumulativeQuantity
- eq:
- content.data.statistics.todayRealMoney
- $todayRealMoney
- eq:
- content.data.statistics.todayRealQuantity
- $todayRealQuantity
\ No newline at end of file
config:
name: ACT001-实际订单-各个值计算正确
base_url: ${ENV(base_manager_url)}
variables:
orderId: '意向订单号${get_nowtime()}'
partnerID: 1047
commissionProportion: 5
orderNum1: 100
univalence1: 15
partnerRatio1: 10
orderNum2: 200
univalence2: 15
partnerRatio2: 20
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 新增意向订单
api: api/m_api/purpose/m_order_purpose_add_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看意向订单列表
api: api/m_api/purpose/m_order_purpose_partner_list_api.yml
extract:
- pur_id: content.data.gridResult.lists.0.id
validate:
- eq:
- content.data.gridResult.lists.0.orderId
- $orderId
- name: 查看意向订单详情
variables:
id: ${convert_to_string($pur_id)}
api: api/m_api/purpose/m_order_purpose_detail_api.yml
validate:
- eq:
- content.data.orderNumCount
- ${add($orderNum1,$orderNum2)}
- eq:
- content.data.orderAmountAdjustmentCount
- 4500
- eq:
- content.data.product.0.orderPrice
- 1500
- eq:
- content.data.product.1.orderPrice
- 3000
\ 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/purpose/m_order_purpose_add_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/purpose/m_order_purpose_edit_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/purpose/m_order_purpose_partner_list_api.yml
validate:
- eq:
- content.msg
- ok
config:
name: 搜索订单号——意向订单列表
base_url: ${ENV(base_manager_url)}
variables:
phone: ${get_admin_account_from_database(admin_user)}
orderStatue: ${get_purpose_order_status_from_database(order)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 搜索订单号——意向订单列表
api: api/m_api/purpose/m_order_purpose_searchText_list_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.lists.0.orderStatue
- $orderStatue
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/purpose/m_order_purpose_sendout_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/purpose/m_order_purpose_detail_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/purpose/m_order_purpose_del_api.yml
validate:
- eq:
- content.msg
- ok
\ No newline at end of file