|
|
|
@ -0,0 +1,34 @@ |
|
|
|
*** Settings *** |
|
|
|
Library RequestsLibrary |
|
|
|
Library Collections |
|
|
|
Library urllib3 |
|
|
|
|
|
|
|
*** Variables *** |
|
|
|
&{cloudfactory_customer_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer} |
|
|
|
${yytclient} https://api-client-yyt-test.qniao.cn |
|
|
|
|
|
|
|
*** Test Cases *** |
|
|
|
customer_create_order_credit_payment |
|
|
|
Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} |
|
|
|
${customer_enterprise_shipping_address_receiver} Set Variable autotest_receiver |
|
|
|
${customer_enterprise_shipping_address_receiverMobile} Set Variable 13800138000 |
|
|
|
${customer_enterprise_shipping_address_detail} Set Variable autotest_customer_enterprise_shipping_address_detail |
|
|
|
${customer_enterprise_shipping_address_provinceid} Set Variable 440000 |
|
|
|
${customer_enterprise_shipping_address_cityid} Set Variable 440100 |
|
|
|
${customer_enterprise_shipping_address_districtid} Set Variable 440106 |
|
|
|
${customer_enterprise_shipping_address_streetid} Set Variable 440106003 |
|
|
|
${customer_enterprise_shipping_address_provincename} Set Variable 广东省 |
|
|
|
${customer_enterprise_shipping_address_cityname} Set Variable 广州市 |
|
|
|
${customer_enterprise_shipping_address_districtname} Set Variable 天河区 |
|
|
|
${customer_enterprise_shipping_address_streetname} Set Variable 车陂街道 |
|
|
|
${customer_create_order_paymentMethod} Set Variable 2 #支付方式 1微信支付 2授信支付 3线下支付 4飞算支付 |
|
|
|
${customer_create_order_realPayPrice} Set Variable |
|
|
|
${customer_create_order_totalOfferPrice} Set Variable |
|
|
|
${customer_create_order_productSkuList} Set Variable [{"gramWeight":"678","width":"787","length":"1092","quantity":5000,"buyTon":2.9134,"productName":"${paper_name}","unitPrice":${product_price_sku_new}*1.03,"bootFee":0,"cuttingFee":0,"freightFee":0,"serviceFee":0,"otherFee":0,"totalOfferPrice":20373.41,"remark":"autotest_customer_create_order_remark","productSkuId":"${product_price_sku_id}"}] |
|
|
|
${body} Set Variable {"receiverMobile":"${customer_enterprise_shipping_address_receiverMobile}","receiver":"${customer_enterprise_shipping_address_receiver}","deliveryProvinceId":${customer_enterprise_shipping_address_provinceid},"deliveryProvinceName":"${customer_enterprise_shipping_address_provincename}","deliveryCityId":${customer_enterprise_shipping_address_cityid},"deliveryCityName":"${customer_enterprise_shipping_address_cityname}","deliveryDistrictId":${customer_enterprise_shipping_address_districtid},"deliveryDistrictName":"${customer_enterprise_shipping_address_districtname}","deliveryStreetId":${customer_enterprise_shipping_address_streetid},"deliveryStreetName":"${customer_enterprise_shipping_address_streetname}","deliveryId":"${customer_enterprise_shipping_address_id}","deliveryDetails":"${customer_enterprise_shipping_address_detail}","paymentMethod":2,"realPayPrice":56.61,"totalOfferPrice":56.61,"password":"${customer_credit_password_new}","productSkuList":${customer_create_order_productSkuList.encode("utf-8")}} |
|
|
|
${response} POST On Session uecclient /trading-center/buyer/create/order ${body.encode("utf-8")} |
|
|
|
log ${response.json()} |
|
|
|
Should Be Equal As Numbers 200 ${response.status_code} |
|
|
|
Should Be Equal As Strings successful ${response.json()["message"]} |
|
|
|
${customer_create_order_id} Get From Dictionary ${response.json()["data"]} orderId |
|
|
|
Set Global Variable ${customer_enterprise_shipping_address_id} |