Browse Source
Merge pull request 'test' (#18) from test into master
Merge pull request 'test' (#18) from test into master
Reviewed-on: http://git.qniao.cn/automated-test-scripts/yyt-trading-rf-api/pulls/18master
20 changed files with 862 additions and 109 deletions
Unified View
Diff Options
-
14000_get_current_datetime.robot
-
15001_login_get_info/login_customer.robot
-
15001_login_get_info/login_supplier.robot
-
8001_login_get_info/login_supplier_focus.robot
-
34002_user_register/customer_user_register.robot
-
12002_user_register/supplier_user_register.robot
-
16003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot
-
184004_enterprise_open_account_supplier/supplier_paper_open_account.robot
-
62006_get_credit/customer_credit_password.robot
-
25011_product_price_config/product_price_config_qniao_and_feisuan.robot
-
40012_product_price_update/product_price_batch_update_purchaseprice.robot
-
0013_paper_list_and_details/customer_get_paper_list_and_detail.robot
-
49014_shinpping_address/customer_enterprise_shipping_address.robot
-
32015_customer_create_order/customer_create_order_credit_payment.robot
-
148016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot
-
201017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot
-
33018_payable_and_receivable/customer_bill.robot
-
37018_payable_and_receivable/payable.robot
-
38018_payable_and_receivable/receivable.robot
-
8test_data_clear.robot
@ -0,0 +1,25 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} |
||||
|
${yytclient} https://api-client-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
product_price_config_qniao_and_feisuan_list |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${response} Get On Session yytclient /cloud-print-user-center/get/settlement-interval/two-dimension/list |
||||
|
Log ${response.status_code} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
product_price_config_qniao_and_feisuan_update_log_list |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${response} Get On Session yytclient /cloud-print-user-center/get/paper/premium-rate/history/page |
||||
|
Log ${response.status_code} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
@ -0,0 +1,40 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} |
||||
|
${yytclient} https://api-client-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
product_price_sku_list |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${response} Get On Session yytclient /trading-center/get/seller/product-sku-list |
||||
|
Log ${response.status_code} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
product_price_sku_list_search |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${param} Set Variable salesEnterpriseId=${supplier_paper_id}&name=${paper_name} |
||||
|
${response} Get On Session yytclient /trading-center/get/seller/product-sku-list params=${param} |
||||
|
Log ${response.status_code} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${product_price_sku_id} Get From Dictionary ${response.json()["data"]["records"][0]} skuId |
||||
|
Set Global Variable ${product_price_sku_id} |
||||
|
|
||||
|
product_price_sku_batch_update_purchaseprice |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${product_price_sku_alterType} Set Variable 1 #变更类型 1统一修改 2增加价格 3减少价格 |
||||
|
${product_price_sku_new} Set Variable 6789 |
||||
|
${body} Set Variable {"skuids":["${product_price_sku_id}"],"alterType":${product_price_sku_alterType},"price":${product_price_sku_new}} |
||||
|
${response} POST On Session yytclient /trading-center/product/unify/alter/purchasing-cost ${body.encode("utf8")} |
||||
|
Set Global Variable ${product_price_sku_new} |
||||
|
Log ${response.status_code} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
@ -0,0 +1,49 @@ |
|||||
|
*** 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} |
||||
|
${uecclient} https://api-client-uec-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
customer_enterprise_shipping_address_list |
||||
|
Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} |
||||
|
${response} Get On Session uecclient /uec/get/enterprise-shipping-address-list/by-userId |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
customer_enterprise_save_shipping_address |
||||
|
Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} |
||||
|
${customer_enterprise_shipping_address_isDefault} Set Variable 1 #是否默认地址 0否 1是 |
||||
|
${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 车陂街道 |
||||
|
${body} Set Variable {"isDefault":${customer_enterprise_shipping_address_isDefault},"receiver":"${customer_enterprise_shipping_address_receiver}","receiverMobile":${customer_enterprise_shipping_address_receiverMobile},"detail":"${customer_enterprise_shipping_address_detail}","provinceId":${customer_enterprise_shipping_address_provinceid},"cityId":${customer_enterprise_shipping_address_cityid},"districtId":${customer_enterprise_shipping_address_districtid},"streetId":${customer_enterprise_shipping_address_streetid},"provinceName":"${customer_enterprise_shipping_address_provincename}","cityName":"${customer_enterprise_shipping_address_cityname}","districtName":"${customer_enterprise_shipping_address_districtname}","streetName":"${customer_enterprise_shipping_address_streetname}"} |
||||
|
${response} POST On Session uecclient /uec/save/enterprise-shipping-address ${body.encode("utf-8")} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_receiver} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_receiverMobile} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_detail} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_provinceid} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_cityid} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_streetid} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_districtid} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_provincename} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_cityname} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_districtname} |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_streetname} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${customer_enterprise_shipping_address_id} Get From Dictionary ${response.json()} data |
||||
|
Set Global Variable ${customer_enterprise_shipping_address_id} |
||||
@ -0,0 +1,32 @@ |
|||||
|
*** 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 yytclient ${yytclient} 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_productSkuList} Set Variable [{"gramWeight":"678","width":"787","length":"1092","quantity":5000,"buyTon":2.9134,"productName":"${paper_name}","unitPrice":6992.67,"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 yytclient /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_create_order_id} |
||||
@ -0,0 +1,148 @@ |
|||||
|
*** 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} |
||||
|
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} |
||||
|
&{cloud_factory_supplier_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier} |
||||
|
${yytclient} https://api-client-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
customer_add_enquiry |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} |
||||
|
${customer_enquiryContent} Set Variable autotest_enquiryContent |
||||
|
${customer_deliveryDay} Set Variable 48 |
||||
|
${customer_deliveryArea} Set Variable 广东省 广州市 天河区 |
||||
|
${body} Set Variable {"enquiryContent":"${customer_enquiryContent}","picUrl":"","deliveryDay":${customer_deliveryDay},"deliveryArea":"${customer_deliveryArea}"} |
||||
|
${response} POST On Session yytclient /trading-center/add/enquiry-order ${body.encode("utf-8")} |
||||
|
Set Global Variable ${customer_enquiryContent} |
||||
|
Set Suite Variable ${customer_deliveryDay} |
||||
|
Set Suite Variable ${customer_deliveryArea} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${customer_enquiry_id} Get From Dictionary ${response.json()} data |
||||
|
Set Global Variable ${customer_enquiry_id} |
||||
|
sleep 1 |
||||
|
|
||||
|
supplierfocus_get_enquiry_list |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${response} Get On Session yytclient /trading-center/get/enquiry-order/order-list |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
supplierfocus_get_enquiry_list_search |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${enquiry_status} Set Variable 0 #是否报价 0待报价 1已报价 |
||||
|
${enquiry_valid_status} Set Variable 0 #是否有效 0生效 1失效 |
||||
|
${param} Set Variable searchValue=${customer_enquiryContent}&status=${enquiry_status}&valid=${enquiry_valid_status} |
||||
|
${response} Get On Session yytclient /trading-center/get/enquiry-order/order-list params=${param} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
Should Be Equal As Strings ${customer_enquiry_id} ${response.json()["data"]["records"][0]["id"]} |
||||
|
|
||||
|
supplierfocus_edit_enquiry_details |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} |
||||
|
${customer_enquiry_remark} Set Variable autotest_remark |
||||
|
${body} Set Variable {"addList":[{"deliveryId":null,"deliveryProvinceId":null,"deliveryProvinceName":null,"deliveryCityId":null,"deliveryCityName":null,"deliveryDistrictId":null,"deliveryDistrictName":null,"deliveryStreetId":null,"deliveryStreetName":null,"deliveryDetails":null,"deliveryReceiver":null,"deliveryReceiverMobile":null,"brandId":"${paper_brand_id}","gramWeight":678,"width":787,"length":1000,"quantity":5000,"brandName":"${paper_name}","enquiryId":"${customer_enquiry_id}","remark":"${customer_enquiry_remark}"},{"deliveryId":null,"deliveryProvinceId":null,"deliveryProvinceName":null,"deliveryCityId":null,"deliveryCityName":null,"deliveryDistrictId":null,"deliveryDistrictName":null,"deliveryStreetId":null,"deliveryStreetName":null,"deliveryDetails":null,"deliveryReceiver":null,"deliveryReceiverMobile":null,"brandId":"${paper_brand_id}","gramWeight":678,"width":787,"length":1092,"quantity":5000,"brandName":"${paper_name}","enquiryId":"${customer_enquiry_id}","remark":"${customer_enquiry_remark}"}],"delList":[],"updateList":[],"id":"${customer_enquiry_id}","askEnterprise":"${printing_packaging_factory_id}","belongEnterpriseName":"${printing_packaging_factory_name}","deliveryDay":${customer_deliveryDay},"deliveryArea":"${customer_deliveryArea}","enquiryContent":"${customer_enquiryContent}","picUrl":null,"receiver":null,"receiverMobile":null,"deliveryProvinceId":null,"deliveryCityId":null,"deliveryDistrictId":null,"deliveryStreetId":null,"deliveryProvinceName":null,"deliveryCityName":null,"deliveryDistrictName":null,"deliveryStreetName":null,"deliveryDetail":null,"deliveryId":null,"deliveryDetails":null,"deliveryReceiver":null,"deliveryReceiverMobile":null} |
||||
|
${response} POST On Session yytclient /trading-center/update/enquiry-order ${body.encode("utf-8")} |
||||
|
Set Global Variable ${customer_enquiry_remark} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
sleep 1 |
||||
|
|
||||
|
supplierfocus_distribute_enquiry_details |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} |
||||
|
${body} Set Variable {"id":"${customer_enquiry_id}"} |
||||
|
${response} POST On Session yytclient /trading-center/distribute/enquiry-reply ${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"]} |
||||
|
sleep 1 |
||||
|
|
||||
|
supplierfocus_get_enquiry_details |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${response} Get On Session yytclient /trading-center/get/enquiry-order/${customer_enquiry_id} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
Should Be Equal As Numbers 1 ${response.json()["data"]["isDistribute"]} #是否分发 0否 1是 |
||||
|
|
||||
|
supplierfocus_get_obtain_paper_quotes_list |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${param} Set Variable enquiryId=${customer_enquiry_id} |
||||
|
${response} Get On Session yytclient /trading-center/get/obtain-paper-quotes/list params=${param} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${paper_quotes_item_id1} Get From Dictionary ${response.json()["data"][0]["replyList"][0]} id |
||||
|
Set Global Variable ${paper_quotes_item_id1} |
||||
|
${paper_quotes_item_id2} Get From Dictionary ${response.json()["data"][0]["replyList"][1]} id |
||||
|
Set Global Variable ${paper_quotes_item_id2} |
||||
|
${paperQuotedPriceId} Get From Dictionary ${response.json()["data"][0]["replyList"][0]} paperQuotedPriceId |
||||
|
Set Global Variable ${paperQuotedPriceId} |
||||
|
|
||||
|
supplierfocus_submit_paper_quotation |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${supplierfocus_paper_quotation_remark} Set Variable autotest_supplierfocus_paper_quotation_remark |
||||
|
${body} Set Variable {"addList":[],"delList":[],"enquiryId":"${customer_enquiry_id}","updateList":[{"enquiryId":"${customer_enquiry_id}","paperQuotedPriceId":"${paperQuotedPriceId}","id":"${paper_quotes_item_id1}","productSkuId":"${product_price_sku_id}","paperId":null,"brandId":"${paper_brand_id}","paperName":null,"brandName":"${paper_name}","productName":null,"gramWeight":678,"quantity":5000,"length":1000,"width":787,"weight":2.6679,"unitFee":5150,"totalPrice":"13739.69","createTime":"${current_date_second.encode('utf-8')}","updateTime":"${current_date_second.encode('utf-8')}","effectiveTime":"${current_date_second.encode('utf-8')}","salesEnterpriseId":"${supplier_paper_id}","remark":"${customer_enquiry_remark}","purchasePrice":5000,"otherFee":0,"repEnterprise":"553652487819759617","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":5100},{"enquiryId":"${customer_enquiry_id}","paperQuotedPriceId":"${paperQuotedPriceId}","id":"${paper_quotes_item_id2}","productSkuId":"${product_price_sku_id}","paperId":null,"brandId":"${paper_brand_id}","paperName":null,"brandName":"${paper_name}","productName":null,"gramWeight":678,"quantity":5000,"length":1092,"width":787,"weight":2.9134,"unitFee":5150,"totalPrice":"15004.01","createTime ":"${current_date_second.encode('utf-8')}","updateTime":"${current_date_second.encode('utf-8')}","effectiveTime":"${current_date_second.encode('utf-8')}","salesEnterpriseId":"${supplier_paper_id}","remark":"${customer_enquiry_remark}","purchasePrice":5000,"otherFee":0,"repEnterprise":"${supplier_paper_id}","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":5100}],"remark":"${supplierfocus_paper_quotation_remark}"} |
||||
|
${response} POST On Session yytclient /trading-center/submit/paper-quotation ${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"]} |
||||
|
sleep 1 |
||||
|
|
||||
|
supplier_enquiry_reply_batch |
||||
|
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header} |
||||
|
${supplier_paper_quotation_remark} Set Variable autotest_supplier_paper_quotation_remark |
||||
|
${body} Set Variable {"enquiryId":"${customer_enquiry_id}","replyList":[{"brandName":"${paper_name}","brandId":"${paper_brand_id}","width":787,"length":1000,"gramWeight":678,"quantity":5000,"weight":2.6679,"unitFee":5000,"otherFee":0,"totalPrice":13339.5,"remark":"${customer_enquiry_remark}"},{"brandName":"${paper_name}","brandId":"${paper_brand_id}","width":787,"length":1092,"gramWeight":678,"quantity":5000,"weight":2.9134,"unitFee":5000,"otherFee":0,"totalPrice":14567,"remark":"${customer_enquiry_remark}"}],"remark":"${supplier_paper_quotation_remark}"} |
||||
|
${response} POST On Session yytclient /trading-center/wechatapplet/add/enquiry-reply-batch ${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"]} |
||||
|
sleep 1 |
||||
|
|
||||
|
supplierfocus_get_supplier_quotation_record_list |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${param} Set Variable enquiryId=${customer_enquiry_id} |
||||
|
${response} Get On Session yytclient /trading-center/get/supplier-quotation-record/list params=${param} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
customer_get_enquiry_result |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} |
||||
|
${response} Get On Session yytclient /trading-center/get/enquiry-result/${customer_enquiry_id} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
customer_enquiry_create_order_credit_payment |
||||
|
Create Session yytclient ${yytclient} 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_enquiry_create_order_productSkuList} Set Variable [{"enquiryReplyId":"${paper_quotes_item_id1}","enquiryId":"${customer_enquiry_id}","gramWeight":678,"width":787,"length":1000,"quantity":5000,"buyTon":2.6679,"productName":null,"purchasePrice":5000,"unitPrice":5150,"bootFee":0,"cuttingFee":0,"freightFee":0,"serviceFee":0,"otherFee":0,"totalOfferPrice":13739.69,"remark":"","productSkuId":"${product_price_sku_id}"},{"enquiryReplyId":"${paper_quotes_item_id2}","enquiryId":"${customer_enquiry_id}","gramWeight":678,"width":787,"length":1092,"quantity":5000,"buyTon":2.9134,"productName":null,"purchasePrice":5000,"unitPrice":5150,"bootFee":0,"cuttingFee":0,"freightFee":0,"serviceFee":0,"otherFee":0,"totalOfferPrice":15004.01,"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":${customer_create_order_paymentMethod},"realPayPrice":28743.7,"totalOfferPrice":28743.7,"password":"${customer_credit_password_new}","productSkuList":${customer_enquiry_create_order_productSkuList.encode("utf-8")}} |
||||
|
${response} POST On Session yytclient /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_enquiry_create_order_id} Get From Dictionary ${response.json()["data"]} orderId |
||||
|
Set Global Variable ${customer_enquiry_create_order_id} |
||||
|
${customer_enquiry_create_order_contractNo} Get From Dictionary ${response.json()["data"]} contractNo |
||||
|
Set Global Variable ${customer_enquiry_create_order_contractNo} |
||||
@ -0,0 +1,201 @@ |
|||||
|
*** 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} |
||||
|
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} |
||||
|
&{cloud_factory_supplier_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 |
||||
|
${uecclient} https://api-client-uec-test.qniao.cn |
||||
|
${yytclient} https://api-client-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
customer_get_order_list |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} |
||||
|
${response} Get On Session yytclient /trading-center/buyer/get/self-enterprise-order-page |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
customer_get_order_list_search |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} |
||||
|
${param} Set Variable status=2 #客户获取订单状态 2待发货 3待收货 5已完成 7待评价 |
||||
|
${response} Get On Session yytclient /trading-center/buyer/get/self-enterprise-order-page params=${param} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
Should Be Equal As Strings ${customer_enquiry_create_order_id} ${response.json()["data"]["records"][0]["orderId"]} |
||||
|
|
||||
|
customer_get_order_detail2 |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} |
||||
|
${response} Get On Session yytclient /trading-center/buyer/get/order-detail/${customer_enquiry_create_order_id} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
Should Be Equal As Numbers 2 ${response.json()["data"]["showStatus"]} |
||||
|
${customer_order_totalPrice} Get From Dictionary ${response.json()["data"]["supplierPrice"]} totalPrice |
||||
|
Set Global Variable ${customer_order_totalPrice} |
||||
|
|
||||
|
supplierfocus_get_order_list |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${response} Get On Session yytclient /trading-center/get/supplier/order-management/page |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
supplierfocus_get_order_list_search |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${param} Set Variable clientContractNo=${customer_enquiry_create_order_contractNo} |
||||
|
${response} Get On Session yytclient /trading-center/get/supplier/order-management/page params=${param} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
Should Be Equal As Strings ${customer_enquiry_create_order_id} ${response.json()["data"]["records"][0]["id"]} |
||||
|
|
||||
|
supplierfocus_get_order_order-item-list |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${response} Get On Session yytclient /trading-center/get/order-item-list/by/${customer_enquiry_create_order_id} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${supply_order_item_id1} Get From Dictionary ${response.json()["data"][0]} id |
||||
|
Set Global Variable ${supply_order_item_id1} |
||||
|
${supply_order_item_id2} Get From Dictionary ${response.json()["data"][1]} id |
||||
|
Set Global Variable ${supply_order_item_id2} |
||||
|
|
||||
|
supplierfocus_create_supplier_order_batch |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${supplier_order_remark} Set Variable autotest_supplier_order_remark |
||||
|
${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 车陂街道 |
||||
|
${body} Set Variable {"orderItemList":[{"deliveryId":"${customer_enterprise_shipping_address_id}","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}","deliveryDetails":"${customer_enterprise_shipping_address_detail}","receiver":"${customer_enterprise_shipping_address_receiver}","receiverMobile":"${customer_enterprise_shipping_address_receiverMobile}","otherFee":0,"remark":"autotest_supplier_order_remark","unitPrice":5000,"supplyOrderItemId":"${supply_order_item_id1}"},{"deliveryId":"${customer_enterprise_shipping_address_id}","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}","deliveryDetails":"${customer_enterprise_shipping_address_detail}","receiver":"${customer_enterprise_shipping_address_receiver}","receiverMobile":"${customer_enterprise_shipping_address_receiverMobile}","otherFee":0,"remark":"autotest_supplier_order_remark","unitPrice":5000,"supplyOrderItemId":"${supply_order_item_id2}"}]} |
||||
|
${response} POST On Session yytclient /trading-center/seller/create/supplier-order-batch ${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"]} |
||||
|
sleep 1 |
||||
|
|
||||
|
supplier_phone |
||||
|
#去除警告 |
||||
|
Disable Warnings |
||||
|
#创建会话 会话别名 baseurl headers |
||||
|
Create Session uecclient ${uecclient} headers=${cloud_factory_supplier_header} |
||||
|
#变量名称 设置用例变量 变量值 |
||||
|
${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号 |
||||
|
${account} Set Variable 13123456789 |
||||
|
${body} Set Variable {"accountType":${accounttype},"account":"${account}","captcha":"888888"} |
||||
|
#变量接收响应结果 post请求 会话别名 uri 传参 |
||||
|
${response} POST On Session uecclient /uec/authorize/by-captcha ${body} |
||||
|
#日志 |
||||
|
Log ${response.status_code} |
||||
|
#日志 |
||||
|
Log ${response.text} |
||||
|
#日志 |
||||
|
Log ${response.json()} |
||||
|
#断言数字 预期结果 实际结果 |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
#断言字符串 预期结果 实际结果 |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
#变量接收token 获取字典内容 响应结果 token-key |
||||
|
${gettoken_supplier} Get From Dictionary ${response.json()["data"]} token |
||||
|
#日志 |
||||
|
log ${gettoken_supplier} |
||||
|
#设置token变量 未转业务线 |
||||
|
Set Suite Variable ${gettoken_supplier} |
||||
|
#变量接收供应商userid 获取字典内容 响应结果 userid-key |
||||
|
${userid_supplier} Get From Dictionary ${response.json()["data"]} userId |
||||
|
#日志 |
||||
|
log ${userid_supplier} |
||||
|
#设置token变量 |
||||
|
Set Suite Variable ${userid_supplier} |
||||
|
#设置带token的请求头 |
||||
|
&{cloudfactorysupplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier} |
||||
|
#设置token变量 |
||||
|
Set Suite Variable ${cloudfactorysupplierheader} |
||||
|
|
||||
|
supplier_login_token |
||||
|
Disable Warnings |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactorysupplierheader} |
||||
|
${body} Set Variable {"loginToken":"${gettoken_supplier}"} |
||||
|
${response} POST On Session yytclient /cloud-print-user-center/authorize/get/product-line-token/by/login-token ${body.encode("utf8")} |
||||
|
Log ${response.status_code} |
||||
|
Log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${getlogintoken_supplier} Get From Dictionary ${response.json()} data |
||||
|
log ${getlogintoken_supplier} |
||||
|
#全局token |
||||
|
Set Global Variable ${getlogintoken_supplier} |
||||
|
&{cloudfactory_supplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier} |
||||
|
Set Suite Variable ${cloudfactory_supplierheader} |
||||
|
|
||||
|
supplier_get_order_list |
||||
|
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header} |
||||
|
${response} Get On Session yytclient /trading-center/wechatapplet/get/supplier-order-page |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
supplier_get_order_list_search |
||||
|
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header} |
||||
|
${param} Set Variable status=2 #供应商获取订单状态 2待送货 |
||||
|
${response} Get On Session yytclient /trading-center/wechatapplet/get/supplier-order-page params=${param} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${supplier_order_id} Get From Dictionary ${response.json()["data"]["records"][0]} orderId |
||||
|
Set Global Variable ${supplier_order_id} |
||||
|
|
||||
|
supplier_get_order_detail2 |
||||
|
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header} |
||||
|
${response} Get On Session yytclient /trading-center/wechatapplet/get/supplier-order-detail/${supplier_order_id} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
Should Be Equal As Numbers 1 ${response.json()["data"]["showStatus"]} |
||||
|
${supplier_order_totalPrice} Get From Dictionary ${response.json()["data"]["supplierPrice"]} totalPrice |
||||
|
Set Global Variable ${supplier_order_totalPrice} |
||||
|
|
||||
|
supplier_confirm_order |
||||
|
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header} |
||||
|
${body} Set Variable {"orderId":"${supplier_order_id}"} |
||||
|
${response} POST On Session yytclient /trading-center/seller/confirm/supplier-order-and-sign ${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"]} |
||||
|
sleep 1 |
||||
|
|
||||
|
supplierfocus_get_order_detail |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${response} Get On Session yytclient /trading-center/seller/get/customer-order-detail/${customer_enquiry_create_order_id} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
supplierfocus_confirm_supplier_order_shipping |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${body} Set Variable {"orderId":"${supplier_order_id}"} |
||||
|
${response} POST On Session yytclient /trading-center/seller/confirm/supplier-order-shipping ${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"]} |
||||
|
sleep 1 |
||||
|
|
||||
|
supplierfocus_confirm_supplier_order_receipt |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${body} Set Variable {"orderId":"${supplier_order_id}"} |
||||
|
${response} POST On Session yytclient /trading-center/seller/confirm/supplier-order-receipt ${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"]} |
||||
|
sleep 1 |
||||
@ -0,0 +1,33 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{operationpsc_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${gettoken_operate_psc} |
||||
|
${pscops} https://api-ops-psc-test.qniao.cn |
||||
|
${yytops} https://api-ops-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
operate_get_customer_bill_list |
||||
|
Create Session yytops ${yytops} headers=${operationpsc_header} |
||||
|
${response} Get On Session yytops /trading-center/admin/get/bill-list |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
operate_get_customer_bill_list_search |
||||
|
Create Session yytops ${yytops} headers=${operationpsc_header} |
||||
|
${param} Set Variable customerEnterpriseName=${printing_packaging_factory_name} |
||||
|
${response} Get On Session yytops /trading-center/admin/get/bill-list params=${param} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
operate_get_customer_detail |
||||
|
Create Session yytops ${yytops} headers=${operationpsc_header} |
||||
|
${param} Set Variable customerEnterpriseId=${printing_packaging_factory_id}&month=${current_date_month} |
||||
|
${response} Get On Session yytops /trading-center/admin/get/bill-detail params=${param} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
@ -0,0 +1,37 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{operationpsc_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${gettoken_operate_psc} |
||||
|
${pscops} https://api-ops-psc-test.qniao.cn |
||||
|
${yytops} https://api-ops-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
operate_get_payable_list |
||||
|
Create Session yytops ${yytops} headers=${operationpsc_header} |
||||
|
${response} Get On Session yytops /trading-center/admin/get/payable-list |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
operate_get_payable_list_search |
||||
|
Create Session yytops ${yytops} headers=${operationpsc_header} |
||||
|
${param} Set Variable enterpriseName=${supplier_paper_name} |
||||
|
${response} Get On Session yytops /trading-center/admin/get/payable-list params=${param} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${payable_id} Get From Dictionary ${response.json()["data"]["records"][0]} id |
||||
|
Set Suite Variable ${payable_id} |
||||
|
|
||||
|
operate_confirm_payable |
||||
|
Create Session yytops ${yytops} headers=${operationpsc_header} |
||||
|
${payable_fundProvider} Set Variable 1 #付款资金方 1千鸟互联 2千纸鹤 |
||||
|
${payable_remark} Set Variable autotest_remark |
||||
|
${bady} Set Variable {"fundProvider":${payable_fundProvider},"id":"${payable_id}","realAmount":${supplier_order_totalPrice},"remark":"${payable_remark}"} |
||||
|
${response} POST On Session yytops /trading-center/admin/confirm/payable ${bady} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
@ -0,0 +1,38 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{operationpsc_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${gettoken_operate_psc} |
||||
|
${pscops} https://api-ops-psc-test.qniao.cn |
||||
|
${yytops} https://api-ops-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
operate_get_receivable_list |
||||
|
Create Session yytops ${yytops} headers=${operationpsc_header} |
||||
|
${response} Get On Session yytops /trading-center/admin/get/receivable-list |
||||
|
Log ${response.status_code} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
operate_get_receivable_list_search |
||||
|
Create Session yytops ${yytops} headers=${operationpsc_header} |
||||
|
${param} Set Variable enterpriseName=${printing_packaging_factory_name} |
||||
|
${response} Get On Session yytops /trading-center/admin/get/receivable-list params=${param} |
||||
|
Log ${response.status_code} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${receivable_id} Get From Dictionary ${response.json()["data"]["records"][0]} id |
||||
|
Set Suite Variable ${receivable_id} |
||||
|
|
||||
|
operate_confirm_receivable |
||||
|
Create Session yytops ${yytops} headers=${operationpsc_header} |
||||
|
${receivable_remark} Set Variable autotest_remark |
||||
|
${bady} Set Variable {"id":"${receivable_id}","realAmount":${customer_order_totalPrice},"remark":"${receivable_remark}"} |
||||
|
${response} POST On Session yytops /trading-center/admin/confirm/receivable ${bady} |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
Write
Preview
Loading…
Cancel
Save