7 changed files with 224 additions and 10 deletions
Unified View
Diff Options
-
2001_login_get_info/login_customer.robot
-
2001_login_get_info/login_supplier.robot
-
6001_login_get_info/login_supplier_focus.robot
-
11014_shinpping_address/customer_enterprise_shipping_address.robot
-
8015_customer_create_order/customer_create_order_credit_payment.robot
-
147016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot
-
58017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot
@ -0,0 +1,147 @@ |
|||||
|
*** 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_name}","gramWeight":678,"width":787,"length":1000,"quantity":5000,"brandName":"${paper_brand_id}","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")} |
||||
|
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 param=${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}","updateTime":"${current_date}","effectiveTime":"${current_date}","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}","updateTime":"${current_date}","effectiveTime":"${current_date}","salesEnterpriseId":"652564100836102144","remark":"${customer_enquiry_remark}","purchasePrice :5000,"otherFee":0,"repEnterprise":"${supplier_paper_id}","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":5100,}],"remark":"${customer_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 param=${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,58 @@ |
|||||
|
*** 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_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"]}${customer_enquiry_create_order_id} |
||||
|
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"]} |
||||
|
|
||||
|
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_customer_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"]}${customer_enquiry_create_order_id} |
||||
|
Should Be Equal As Strings ${customer_enquiry_create_order_id} ${response.json()["data"]["records"][0]["orderId"]} |
||||
|
|
||||
|
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"]} |
||||
Write
Preview
Loading…
Cancel
Save