You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
2.3 KiB
49 lines
2.3 KiB
*** Settings ***
|
|
Documentation 提现申请
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
|
|
*** Variables ***
|
|
${URL} http://api-client-psc-test.qniao.cn/
|
|
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528','Authorization':'${gettoken}'}
|
|
|
|
*** Test Cases ***
|
|
get_balance
|
|
#查看账户余额
|
|
Create Session ZTBT ${URL} ${header}
|
|
${reps} Get On Session ZTBT payment-settlement-center/balance/get/balance
|
|
log ${reps.json()}
|
|
|
|
get_order-withdrawal-list
|
|
#获取可提现单列表
|
|
Create Session ZTBT ${URL} ${header}
|
|
${reps_data} Get On Session ZTBT payment-settlement-center/balance/get/order-withdrawal-list
|
|
log ${reps_data.json()}
|
|
${tradeOrderId} Get From Dictionary ${reps_data.json()["data"]["orderWithdrawalList"][-1]} tradeOrderId #交易订单号
|
|
${提现订单id} Get From Dictionary ${reps_data.json()["data"]["orderWithdrawalList"][-1]} id #提现订单id
|
|
#${orderWithdrawalList} Get From Dictionary ${reps_data.json()["data"]} orderWithdrawalList
|
|
#${value} Evaluate random.choice(${orderWithdrawalList} ) random
|
|
#log to console \nvalue: ${value}
|
|
Set Global Variable ${tradeOrderId}
|
|
Set Global Variable ${提现订单id}
|
|
|
|
getBankCardList
|
|
#获取银行卡列表
|
|
Create Session ZTBT ${URL} ${header}
|
|
${reps} Get On Session ZTBT payment-settlement-center/bankcard/getBankCardList
|
|
${data_list} Get From Dictionary ${reps.json()} data #银行卡列表
|
|
log ${data_list}
|
|
${value} Evaluate random.choice(${data_list}) random
|
|
log to console \nvalue: ${value}
|
|
${银行卡id} Get From Dictionary ${value} id #银行卡id
|
|
Set Global Variable ${银行卡id}
|
|
|
|
order_withdraw
|
|
#提交申请提现
|
|
Create Session ZTBT ${URL} ${header}
|
|
${data} Set Variable {"bankId":"${银行卡id} ","ids":["${提现订单id} "]}
|
|
${reps} Post On Session ZTBT payment-settlement-center/balance/order/withdraw ${data}
|
|
#log ${reps.json()}
|
|
${markedWords} Get From Dictionary ${reps.json()["data"]} markedWords
|
|
log ${markedWords}
|
|
Should Be Equal As Strings ${reps.json()["message"]} successful
|