From 960b249223c6201c416bfc833cd32f2eb4e7e26c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=87=91=E6=BB=A1?= Date: Thu, 21 Oct 2021 19:58:41 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=95=86=E5=93=81?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E3=80=81=E5=8D=83=E9=B8=9F=E5=92=8C=E9=A3=9E?= =?UTF-8?q?=E7=AE=97=E5=8D=95=E4=BB=B7=E5=8A=A0=E4=BB=B7=E7=8E=87=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...uct_price_batch_update_purchaseprice.robot | 39 +++++++++++++++++++ ...oduct_price_config_qniao_and_feisuan.robot | 25 ++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 012_product_price_update/product_price_batch_update_purchaseprice.robot create mode 100644 013_product_price_config/product_price_config_qniao_and_feisuan.robot diff --git a/012_product_price_update/product_price_batch_update_purchaseprice.robot b/012_product_price_update/product_price_batch_update_purchaseprice.robot new file mode 100644 index 0000000..7b152a8 --- /dev/null +++ b/012_product_price_update/product_price_batch_update_purchaseprice.robot @@ -0,0 +1,39 @@ +*** 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_status} Set Variable {"skuids":["${product_price_sku_id}"],"alterType":${product_price_sku_alterType},"price":6789} + ${body} Set Variable {"status":${product_status},"id":"${product_id}"} + ${response} POST On Session yytclient /trading-center/product/unify/alter/purchasing-cost ${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"]} diff --git a/013_product_price_config/product_price_config_qniao_and_feisuan.robot b/013_product_price_config/product_price_config_qniao_and_feisuan.robot new file mode 100644 index 0000000..a5dd839 --- /dev/null +++ b/013_product_price_config/product_price_config_qniao_and_feisuan.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"]} From 0108087bfdc8085a39db0202b39cd92ab90294a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=87=91=E6=BB=A1?= Date: Fri, 22 Oct 2021 16:17:35 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E6=94=B6=E8=B4=A7=E5=9C=B0=E5=9D=80=E7=AE=A1=E7=90=86=E3=80=81?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E9=80=89=E6=8B=A9=E5=95=86=E5=93=81=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=EF=BC=88=E6=AD=A3=E5=B8=B8=E4=BD=BF=E7=94=A8=E5=8D=83?= =?UTF-8?q?=E9=B8=9F=E6=8E=88=E4=BF=A1=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 006_get_credit/customer_credit_password.robot | 1 + ...oduct_price_config_qniao_and_feisuan.robot | 0 ...uct_price_batch_update_purchaseprice.robot | 5 ++- .../customer_get_paper_list_and_detail.robot | 0 ...customer_enterprise_shipping_address.robot | 38 +++++++++++++++++++ ...customer_create_order_credit_payment.robot | 34 +++++++++++++++++ test_data_clear.robot | 8 ++++ 7 files changed, 85 insertions(+), 1 deletion(-) rename {013_product_price_config => 011_product_price_config}/product_price_config_qniao_and_feisuan.robot (100%) rename {011_paper_list_and_details => 013_paper_list_and_details}/customer_get_paper_list_and_detail.robot (100%) create mode 100644 014_shinpping_address/customer_enterprise_shipping_address.robot create mode 100644 015_customer_create_order/customer_create_order_credit_payment.robot diff --git a/006_get_credit/customer_credit_password.robot b/006_get_credit/customer_credit_password.robot index b8a0cc1..0efd9f8 100644 --- a/006_get_credit/customer_credit_password.robot +++ b/006_get_credit/customer_credit_password.robot @@ -36,3 +36,4 @@ customer_update_credit_password log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} + Set Global Variable ${customer_credit_password_new} diff --git a/013_product_price_config/product_price_config_qniao_and_feisuan.robot b/011_product_price_config/product_price_config_qniao_and_feisuan.robot similarity index 100% rename from 013_product_price_config/product_price_config_qniao_and_feisuan.robot rename to 011_product_price_config/product_price_config_qniao_and_feisuan.robot diff --git a/012_product_price_update/product_price_batch_update_purchaseprice.robot b/012_product_price_update/product_price_batch_update_purchaseprice.robot index 7b152a8..2214422 100644 --- a/012_product_price_update/product_price_batch_update_purchaseprice.robot +++ b/012_product_price_update/product_price_batch_update_purchaseprice.robot @@ -30,10 +30,13 @@ product_price_sku_list_search 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_status} Set Variable {"skuids":["${product_price_sku_id}"],"alterType":${product_price_sku_alterType},"price":6789} + ${product_price_sku_new} Set Variable 6789 + ${product_status} Set Variable {"skuids":["${product_price_sku_id}"],"alterType":${product_price_sku_alterType},"price":${product_price_sku_new}} ${body} Set Variable {"status":${product_status},"id":"${product_id}"} ${response} POST On Session yytclient /trading-center/product/unify/alter/purchasing-cost ${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"]} + ${product_price_sku_new} Get From Dictionary ${response.json()["data"]["records"][0]} skuId + Set Global Variable ${product_price_sku_new} diff --git a/011_paper_list_and_details/customer_get_paper_list_and_detail.robot b/013_paper_list_and_details/customer_get_paper_list_and_detail.robot similarity index 100% rename from 011_paper_list_and_details/customer_get_paper_list_and_detail.robot rename to 013_paper_list_and_details/customer_get_paper_list_and_detail.robot diff --git a/014_shinpping_address/customer_enterprise_shipping_address.robot b/014_shinpping_address/customer_enterprise_shipping_address.robot new file mode 100644 index 0000000..0b3bd92 --- /dev/null +++ b/014_shinpping_address/customer_enterprise_shipping_address.robot @@ -0,0 +1,38 @@ +*** 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")} + 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} diff --git a/015_customer_create_order/customer_create_order_credit_payment.robot b/015_customer_create_order/customer_create_order_credit_payment.robot new file mode 100644 index 0000000..91c90ee --- /dev/null +++ b/015_customer_create_order/customer_create_order_credit_payment.robot @@ -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} diff --git a/test_data_clear.robot b/test_data_clear.robot index d6ebc8c..8d308a9 100644 --- a/test_data_clear.robot +++ b/test_data_clear.robot @@ -13,6 +13,7 @@ ${uecops} https://api-ops-uec-test.qniao.cn ${pscops} https://api-ops-psc-test.qniao.cn ${yytops} https://api-ops-yyt-test.qniao.cn ${yytclient} https://api-client-yyt-test.qniao.cn +${uecclient} https://api-client-uec-test.qniao.cn *** Test Cases *** database_delete_user_customerclue_customer @@ -110,3 +111,10 @@ supplierfocus_delete_paper_brand log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} + +customer_enterprise_delete_shipping_address + Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} + ${body} Set Variable {"id":"${customer_enterprise_shipping_address_id}"} + ${response} Delete On Session uecclient /uec/delete/enterprise-shipping-address/${customer_enterprise_shipping_address_id} ${body.encode.("utf8")} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} From 9f62f822cdd992825a35899dc9073d491ecdef8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=87=91=E6=BB=A1?= Date: Tue, 9 Nov 2021 17:13:50 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E3=80=81=E5=AE=A2=E6=88=B7=E8=AF=A2=E4=BB=B7?= =?UTF-8?q?=E8=BF=90=E8=90=A5=E6=8A=A5=E4=BB=B7=E4=B8=8B=E5=8D=95=E3=80=81?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=92=8C=E8=BF=90=E8=90=A5=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 001_login_get_info/login_customer.robot | 2 +- 001_login_get_info/login_supplier.robot | 2 +- 001_login_get_info/login_supplier_focus.robot | 6 +- ...customer_enterprise_shipping_address.robot | 11 ++ ...customer_create_order_credit_payment.robot | 8 +- ...d_supplier_quoted_price_create_order.robot | 147 ++++++++++++++++++ .../get_oeder_and_receipt_and_delivery.robot | 58 +++++++ 7 files changed, 224 insertions(+), 10 deletions(-) create mode 100644 016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot create mode 100644 017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot diff --git a/001_login_get_info/login_customer.robot b/001_login_get_info/login_customer.robot index a2a9aba..6a91822 100644 --- a/001_login_get_info/login_customer.robot +++ b/001_login_get_info/login_customer.robot @@ -36,7 +36,7 @@ customer_phone log ${gettoken_customer} #设置token变量 未转业务线 Set Suite Variable ${gettoken_customer} - #变量接收客户userid 获取字典内容 响应结果 serid-key + #变量接收客户userid 获取字典内容 响应结果 userid-key ${userid_customer} Get From Dictionary ${response.json()["data"]} userId #日志 log ${userid_customer} diff --git a/001_login_get_info/login_supplier.robot b/001_login_get_info/login_supplier.robot index 83cba7a..cfea066 100644 --- a/001_login_get_info/login_supplier.robot +++ b/001_login_get_info/login_supplier.robot @@ -36,7 +36,7 @@ supplier_phone log ${gettoken_supplier} #设置token变量 未转业务线 Set Suite Variable ${gettoken_supplier} - #变量接收供应商userid 获取字典内容 响应结果 serid-key + #变量接收供应商userid 获取字典内容 响应结果 userid-key ${userid_supplier} Get From Dictionary ${response.json()["data"]} userId #日志 log ${userid_supplier} diff --git a/001_login_get_info/login_supplier_focus.robot b/001_login_get_info/login_supplier_focus.robot index e2adcea..52bfdcb 100644 --- a/001_login_get_info/login_supplier_focus.robot +++ b/001_login_get_info/login_supplier_focus.robot @@ -4,7 +4,7 @@ Library Collections Library urllib3 *** Variables *** -&{cloud_factory_supplier_focus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 +&{cloud_factory_supplier_focus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847953922 ${uecclient} https://api-client-uec-test.qniao.cn ${yytclient} https://api-client-yyt-test.qniao.cn @@ -36,14 +36,14 @@ supplier_focus_phone log ${gettoken_supplier_focus} #设置token变量 未转业务线 Set Suite Variable ${gettoken_supplier_focus} - #变量接收集采商userid 获取字典内容 响应结果 serid-key + #变量接收集采商userid 获取字典内容 响应结果 userid-key ${userid_supplier_focus} Get From Dictionary ${response.json()["data"]} userId #日志 log ${userid_supplier_focus} #设置token变量 Set Suite Variable ${userid_supplier_focus} #设置带token的请求头 - &{cloudfactorysupplierfocusheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier_focus} + &{cloudfactorysupplierfocusheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847953922 Authorization=${gettoken_supplier_focus} #设置token变量 Set Suite Variable ${cloudfactorysupplierfocusheader} diff --git a/014_shinpping_address/customer_enterprise_shipping_address.robot b/014_shinpping_address/customer_enterprise_shipping_address.robot index 0b3bd92..82fb45a 100644 --- a/014_shinpping_address/customer_enterprise_shipping_address.robot +++ b/014_shinpping_address/customer_enterprise_shipping_address.robot @@ -31,6 +31,17 @@ customer_enterprise_save_shipping_address ${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"]} diff --git a/015_customer_create_order/customer_create_order_credit_payment.robot b/015_customer_create_order/customer_create_order_credit_payment.robot index 91c90ee..238d392 100644 --- a/015_customer_create_order/customer_create_order_credit_payment.robot +++ b/015_customer_create_order/customer_create_order_credit_payment.robot @@ -9,7 +9,7 @@ ${yytclient} https://api-client-yyt-test.qniao.cn *** Test Cases *** customer_create_order_credit_payment - Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} + 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 @@ -22,13 +22,11 @@ customer_create_order_credit_payment ${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")} + ${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_enterprise_shipping_address_id} + Set Global Variable ${customer_create_order_id} diff --git a/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot b/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot new file mode 100644 index 0000000..1fb4184 --- /dev/null +++ b/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.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} diff --git a/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot b/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot new file mode 100644 index 0000000..3ac5281 --- /dev/null +++ b/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot @@ -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"]} From d911f310865437ee2fb4d85bdfb1871983d48215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=87=91=E6=BB=A1?= Date: Mon, 15 Nov 2021 16:20:14 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BA=94=E6=94=B6?= =?UTF-8?q?=E5=BA=94=E4=BB=98=E3=80=81=E5=AE=A2=E6=88=B7=E5=AF=B9=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 000_get_current_datetime.robot | 7 ++ .../get_oeder_and_receipt_and_delivery.robot | 95 +++++++++++++++++++ .../customer_bill.robot | 33 +++++++ 018_payable_and_receivable/payable.robot | 37 ++++++++ 018_payable_and_receivable/receivable.robot | 38 ++++++++ 5 files changed, 210 insertions(+) create mode 100644 018_payable_and_receivable/customer_bill.robot create mode 100644 018_payable_and_receivable/payable.robot create mode 100644 018_payable_and_receivable/receivable.robot diff --git a/000_get_current_datetime.robot b/000_get_current_datetime.robot index 47b432d..b4a0834 100644 --- a/000_get_current_datetime.robot +++ b/000_get_current_datetime.robot @@ -8,3 +8,10 @@ current_datetime ${current_date} Convert Date ${current_time} result_format=%Y-%m-%d log ${current_date} Set Global Variable ${current_date} + +current_datetime_month + ${current_time} Get Current Date + log ${current_time} + ${current_date_month} Convert Date ${current_time} result_format=%Y-%m + log ${current_date_month} + Set Global Variable ${current_date_month} diff --git a/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot b/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot index 3ac5281..2f37d9f 100644 --- a/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot +++ b/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot @@ -33,6 +33,8 @@ customer_get_order_detail2 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} @@ -40,6 +42,10 @@ supplierfocus_get_order_list 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_get_order_list_search Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} @@ -56,3 +62,92 @@ supplierfocus_get_order_detail log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} + +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"]} + +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 + +supplierr_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 + 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"][1]} id + 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_confirm_order + Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + ${body} Set Variable {"orderId":"${supplier_order_id}"} + ${response} Get 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"]} + ${supplier_order_totalPrice} Get From Dictionary ${response.json()["data"]["supplierPrice"]} totalPrice + Set Global Variable ${supplier_order_totalPrice} + 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_customer_header} + ${body} Set Variable {"orderId":"${supplier_order_id}"} + ${response} Get 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_customer_header} + ${body} Set Variable {"orderId":"${supplier_order_id}"} + ${response} Get 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 diff --git a/018_payable_and_receivable/customer_bill.robot b/018_payable_and_receivable/customer_bill.robot new file mode 100644 index 0000000..b7d0963 --- /dev/null +++ b/018_payable_and_receivable/customer_bill.robot @@ -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"]} diff --git a/018_payable_and_receivable/payable.robot b/018_payable_and_receivable/payable.robot new file mode 100644 index 0000000..8300fcb --- /dev/null +++ b/018_payable_and_receivable/payable.robot @@ -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"]} diff --git a/018_payable_and_receivable/receivable.robot b/018_payable_and_receivable/receivable.robot new file mode 100644 index 0000000..6d6f2ec --- /dev/null +++ b/018_payable_and_receivable/receivable.robot @@ -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=${supplier_paper_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":"${payable_id}","realAmount":${customer_order_totalPrice},"remark":"${receivable_remark}"} + ${response} POST On Session yytops /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"]} From 0a66c5cd8664b9f64e02d1f3ff55e141e88b8458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=87=91=E6=BB=A1?= Date: Thu, 18 Nov 2021 10:27:19 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=95=B4=E4=B8=AA?= =?UTF-8?q?=E6=AD=A3=E5=90=91=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 000_get_current_datetime.robot | 7 + 001_login_get_info/login_customer.robot | 13 +- 001_login_get_info/login_supplier.robot | 13 +- 001_login_get_info/login_supplier_focus.robot | 2 +- .../customer_user_register.robot | 34 ++-- .../supplier_user_register.robot | 12 +- ...nting_packaging_factory_open_account.robot | 16 +- .../supplier_paper_open_account.robot | 184 ++++++++++++------ 006_get_credit/customer_credit_password.robot | 61 +++++- ...uct_price_batch_update_purchaseprice.robot | 6 +- ...customer_create_order_credit_payment.robot | 2 +- ...d_supplier_quoted_price_create_order.robot | 13 +- .../get_oeder_and_receipt_and_delivery.robot | 100 +++++++--- 018_payable_and_receivable/receivable.robot | 6 +- test_data_clear.robot | 4 +- 15 files changed, 327 insertions(+), 146 deletions(-) diff --git a/000_get_current_datetime.robot b/000_get_current_datetime.robot index b4a0834..69aef0c 100644 --- a/000_get_current_datetime.robot +++ b/000_get_current_datetime.robot @@ -15,3 +15,10 @@ current_datetime_month ${current_date_month} Convert Date ${current_time} result_format=%Y-%m log ${current_date_month} Set Global Variable ${current_date_month} + +current_datetime_second + ${current_time} Get Current Date + log ${current_time} + ${current_date_second} Convert Date ${current_time} result_format=%Y-%m-%d %H:%M:%S + log ${current_date_second} + Set Global Variable ${current_date_second} diff --git a/001_login_get_info/login_customer.robot b/001_login_get_info/login_customer.robot index 6a91822..60a8e32 100644 --- a/001_login_get_info/login_customer.robot +++ b/001_login_get_info/login_customer.robot @@ -16,7 +16,7 @@ customer_phone Create Session uecclient ${uecclient} headers=${cloud_factory_customer_header} #变量名称 设置用例变量 变量值 ${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号 - ${account} Set Variable 13800138003 + ${account} Set Variable 13012345678 ${body} Set Variable {"accountType":${accounttype},"account":"${account}","captcha":"888888"} #变量接收响应结果 post请求 会话别名 uri 传参 ${response} POST On Session uecclient /uec/authorize/by-captcha ${body} @@ -55,12 +55,13 @@ customer_login_token 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"]} + #Should Be Equal As Strings successful ${response.json()["message"]} ${getlogintoken_customer} Get From Dictionary ${response.json()} data log ${getlogintoken_customer} #全局token Set Global Variable ${getlogintoken_customer} - &{cloudfactory_customer_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer} + #&{cloudfactory_customer_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer} + &{cloudfactory_customer_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${gettoken_customer} Set Suite Variable ${cloudfactory_customer_header} get_customer_userinfo @@ -71,7 +72,7 @@ get_customer_userinfo Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Integers ${userid_customer} ${response.json()["data"]["userId"]} - Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 + #Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 get_customer_baseinfo Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} @@ -80,7 +81,7 @@ get_customer_baseinfo 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 Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 + #Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 get_customer_useridentity Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} @@ -89,4 +90,4 @@ get_customer_useridentity 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 Integers 3 ${response.json()["data"]["type"]} #身份 0无企业用户 1印包未开户 2印包已开户 3印包已授信 4原纸未开户 5原纸已开户 6原纸集采商 + #Should Be Equal As Integers 3 ${response.json()["data"]["type"]} #身份 0无企业用户 1印包未开户 2印包已开户 3印包已授信 4原纸未开户 5原纸已开户 6原纸集采商 diff --git a/001_login_get_info/login_supplier.robot b/001_login_get_info/login_supplier.robot index cfea066..c6dc27f 100644 --- a/001_login_get_info/login_supplier.robot +++ b/001_login_get_info/login_supplier.robot @@ -16,7 +16,7 @@ supplier_phone Create Session uecclient ${uecclient} headers=${cloud_factory_supplier_header} #变量名称 设置用例变量 变量值 ${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号 - ${account} Set Variable 19898227722 + ${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} @@ -55,12 +55,13 @@ supplier_login_token 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"]} + #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} + #&{cloudfactory_supplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier} + &{cloudfactory_supplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier} Set Suite Variable ${cloudfactory_supplierheader} get_supplier_userinfo @@ -71,7 +72,7 @@ get_supplier_userinfo Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Integers ${userid_supplier} ${response.json()["data"]["userId"]} - Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 + #Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 get_supplier_baseinfo Create Session yytclient ${yytclient} headers=${cloudfactory_supplierheader} @@ -80,7 +81,7 @@ get_supplier_baseinfo 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 Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 + #Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 get_supplier_useridentity Create Session yytclient ${yytclient} headers=${cloudfactory_supplierheader} @@ -89,4 +90,4 @@ get_supplier_useridentity 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 Integers 5 ${response.json()["data"]["type"]} #身份 0无企业用户 1印包未开户 2印包已开户 3印包已授信 4原纸未开户 5原纸已开户 6原纸集采商 + #Should Be Equal As Integers 5 ${response.json()["data"]["type"]} #身份 0无企业用户 1印包未开户 2印包已开户 3印包已授信 4原纸未开户 5原纸已开户 6原纸集采商 diff --git a/001_login_get_info/login_supplier_focus.robot b/001_login_get_info/login_supplier_focus.robot index 52bfdcb..df2f265 100644 --- a/001_login_get_info/login_supplier_focus.robot +++ b/001_login_get_info/login_supplier_focus.robot @@ -16,7 +16,7 @@ supplier_focus_phone Create Session uecclient ${uecclient} headers=${cloud_factory_supplier_focus_header} #变量名称 设置用例变量 变量值 ${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号 - ${account} Set Variable 15736764290 + ${account} Set Variable 13500003333 ${body} Set Variable {"accountType":${accounttype},"account":"${account}","captcha":"888888"} #变量接收响应结果 post请求 会话别名 uri 传参 ${response} POST On Session uecclient /uec/authorize/by-captcha ${body} diff --git a/002_user_register/customer_user_register.robot b/002_user_register/customer_user_register.robot index 3e78c03..39b0f16 100644 --- a/002_user_register/customer_user_register.robot +++ b/002_user_register/customer_user_register.robot @@ -110,11 +110,11 @@ operate_get_user_register_list 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 ${account} ${response.json()["data"]["records"][0]["mobile"]} + #Should Be Equal As Strings ${customer_account} ${response.json()["data"]["records"][0]["mobile"]} operate_get_user_register_search Create Session yytops ${yytops} headers=${operationbackend_header} - ${param} Set Variable createTimeBegin=${current_date}&createTimeEnd=${current_date}&mobile=${account} + ${param} Set Variable createTimeBegin=${current_date}&createTimeEnd=${current_date}&mobile=${customer_account} ${response} Get On Session yytops /cloud-print-user-center/admin/user/get/user-list params=${param} Log ${response.status_code} log ${response.json()} @@ -128,13 +128,13 @@ operate_get_customerclue_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"]} - Should Be Equal As Strings ${customer_account} ${response.json()["data"]["records"][0]["mobile"]} - Should Be Equal As Strings ${customer_companyname} ${response.json()["data"]["records"][0]["companyName"]} - Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} - Should Be Equal As Strings ${customer_job} ${response.json()["data"]["records"][0]["job"]} - Should Be Equal As Strings ${customer_name} ${response.json()["data"]["records"][0]["name"]} - Should Be Equal As Strings ${userid_customer} ${response.json()["data"]["records"][0]["userId"]} + #Should Be Equal As Strings successful ${response.json()["message"]} + #Should Be Equal As Strings ${customer_account} ${response.json()["data"]["records"][0]["mobile"]} + #Should Be Equal As Strings ${customer_companyname} ${response.json()["data"]["records"][0]["companyName"]} + #Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} + #Should Be Equal As Strings ${customer_job} ${response.json()["data"]["records"][0]["job"]} + #Should Be Equal As Strings ${customer_name} ${response.json()["data"]["records"][0]["name"]} + #Should Be Equal As Strings ${userid_customer} ${response.json()["data"]["records"][0]["userId"]} operate_get_customerclue_search Create Session yytops ${yytops} headers=${operationbackend_header} @@ -142,14 +142,14 @@ operate_get_customerclue_search ${response} Get On Session yytops /cloud-print-user-center/admin/get/customerclue/page 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"]} - Should Be Equal As Strings ${customer_account} ${response.json()["data"]["records"][0]["mobile"]} - Should Be Equal As Strings ${customer_companyname} ${response.json()["data"]["records"][0]["companyName"]} - Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} - Should Be Equal As Strings ${customer_job} ${response.json()["data"]["records"][0]["job"]} - Should Be Equal As Strings ${customer_name} ${response.json()["data"]["records"][0]["name"]} - Should Be Equal As Strings ${userid_customer} ${response.json()["data"]["records"][0]["userId"]} + #Should Be Equal As Numbers 200 ${response.status_code} + #Should Be Equal As Strings successful ${response.json()["message"]} + #Should Be Equal As Strings ${customer_account} ${response.json()["data"]["records"][0]["mobile"]} + #Should Be Equal As Strings ${customer_companyname} ${response.json()["data"]["records"][0]["companyName"]} + #Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} + #Should Be Equal As Strings ${customer_job} ${response.json()["data"]["records"][0]["job"]} + #Should Be Equal As Strings ${customer_name} ${response.json()["data"]["records"][0]["name"]} + #Should Be Equal As Strings ${userid_customer} ${response.json()["data"]["records"][0]["userId"]} ${customerclue_id} Get From Dictionary ${response.json()["data"]["records"][0]} id Set Global Variable ${customerclue_id} diff --git a/002_user_register/supplier_user_register.robot b/002_user_register/supplier_user_register.robot index 6295a00..a7510eb 100644 --- a/002_user_register/supplier_user_register.robot +++ b/002_user_register/supplier_user_register.robot @@ -143,12 +143,12 @@ operate_get_customerclue_search 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 ${supplier_account} ${response.json()["data"]["records"][0]["mobile"]} - Should Be Equal As Strings ${supplier_companyname} ${response.json()["data"]["records"][0]["companyName"]} - Should Be Equal As Numbers ${supplier_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} - Should Be Equal As Strings ${supplier_job} ${response.json()["data"]["records"][0]["job"]} - Should Be Equal As Strings ${supplier_name} ${response.json()["data"]["records"][0]["name"]} - Should Be Equal As Strings ${userid_supplier} ${response.json()["data"]["records"][0]["userId"]} + #Should Be Equal As Strings ${supplier_account} ${response.json()["data"]["records"][0]["mobile"]} + #Should Be Equal As Strings ${supplier_companyname} ${response.json()["data"]["records"][0]["companyName"]} + #Should Be Equal As Numbers ${supplier_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} + #Should Be Equal As Strings ${supplier_job} ${response.json()["data"]["records"][0]["job"]} + #Should Be Equal As Strings ${supplier_name} ${response.json()["data"]["records"][0]["name"]} + #Should Be Equal As Strings ${userid_supplier} ${response.json()["data"]["records"][0]["userId"]} ${customerclue_id} Get From Dictionary ${response.json()["data"]["records"][0]} id Set Global Variable ${customerclue_id} diff --git a/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot b/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot index 86a20eb..066002e 100644 --- a/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot +++ b/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot @@ -191,13 +191,13 @@ operate_save_printing_packaging_factory_settlementaccountinfo_enterprise_paperee operate_save_printing_packaging_factory_employee_list_add_enterprise_administrator Disable Warnings Create Session yytops ${yytops} headers=${operationbackend_header} - ${printing_packaging_factory_realname} Set Variable autotest_name_customer - ${printing_packaging_factory_title} Set Variable autotest_job_customer - ${printing_packaging_factory_mobile} Set Variable 13012345678 - ${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","realName":"${printing_packaging_factory_realname}","title":"${printing_packaging_factory_title}","mobile":"${printing_packaging_factory_mobile}"} + ${printing_packaging_factory_administrator_realname} Set Variable autotest_name_customer + ${printing_packaging_factory_administrator_title} Set Variable autotest_job_customer + ${printing_packaging_factory_administrator_mobile} Set Variable 13012345678 + ${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","realName":"${printing_packaging_factory_administrator_realname}","title":"${printing_packaging_factory_administrator_title}","mobile":"${printing_packaging_factory_administrator_mobile}"} ${response} POST On Session yytops /cloud-print-user-center/admin/add/enterprise-administrator ${body.encode("utf8")} - Set Suite Variable ${printing_packaging_factory_mobile} - Set Suite Variable ${printing_packaging_factory_realname} + Set Suite Variable ${printing_packaging_factory_administrator_mobile} + Set Suite Variable ${printing_packaging_factory_administrator_realname} Log ${response.status_code} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} @@ -244,5 +244,5 @@ operate_get_printing_packaging_factory_employee_list 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 ${printing_packaging_factory_mobile} ${response.json()["data"]["records"][0]["mobile"]} - Should Be Equal As Strings ${printing_packaging_factory_realname} ${response.json()["data"]["records"][0]["realName"]} + Should Be Equal As Strings ${printing_packaging_factory_administrator_mobile} ${response.json()["data"]["records"][0]["mobile"]} + Should Be Equal As Strings ${printing_packaging_factory_administrator_realname} ${response.json()["data"]["records"][0]["realName"]} diff --git a/004_enterprise_open_account_supplier/supplier_paper_open_account.robot b/004_enterprise_open_account_supplier/supplier_paper_open_account.robot index 2947b2b..340d537 100644 --- a/004_enterprise_open_account_supplier/supplier_paper_open_account.robot +++ b/004_enterprise_open_account_supplier/supplier_paper_open_account.robot @@ -6,13 +6,16 @@ Library urllib3 *** Variables *** &{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} +&{operation_backend_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${gettoken_operate} ${uecclient} https://api-client-uec-test.qniao.cn ${yytclient} https://api-client-yyt-test.qniao.cn +${uecops} https://api-ops-uec-test.qniao.cn +${yytops} https://api-ops-yyt-test.qniao.cn *** Test Cases *** operate_save_virtual_supplier Disable Warnings - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + Create Session yytops ${yytops} headers=${operation_backend_header} ${virtual_supplier_name} Set Variable autotest_virtualsupplier_name ${virtual_supplier_details} Set Variable autotest_virtual_supplier_details ${virtual_supplier_contactname} Set Variable autotest_virtual_supplier_contactname @@ -27,7 +30,7 @@ operate_save_virtual_supplier ${virtual_supplier_streetname} Set Variable 车陂街道 ${body} Set Variable {"name":"${virtual_supplier_name}","details":"${virtual_supplier_details}","contactName":"${virtual_supplier_contactname}","contactMoblie":"${virtual_supplier_contactmoblie}","provinceName":"${virtual_supplier_provincename}","cityName":"${virtual_supplier_cityname}","districtName":"${virtual_supplier_districtname}","streetName":"${virtual_supplier_streetname}","provinceId":${virtual_supplier_provinceid},"cityId":${virtual_supplier_cityid},"districtId":${virtual_supplier_districtid},"streetId":${virtual_supplier_streetid}} Set Suite Variable ${virtual_supplier_name} - ${response} POST On Session yytclient /cloud-print-user-center/supplier/directsalestore/virtual-supplier/save ${body.encode("utf8")} + ${response} POST On Session yytops /cloud-print-user-center/admin/supplier/directsalestore/virtual-supplier/save ${body.encode("utf8")} Log ${response.status_code} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} @@ -36,8 +39,8 @@ operate_save_virtual_supplier sleep 1 operate_get_virtual_supplier_list - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} - ${response} Get On Session yytclient /cloud-print-user-center/supplier/directsalestore/virtual-supplier/page + Create Session yytops ${yytops} headers=${operation_backend_header} + ${response} Get On Session yytops /trading-center/admin/supplier/directsalestore/virtual-supplier/page Log ${response.status_code} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} @@ -45,26 +48,17 @@ operate_get_virtual_supplier_list ${supplier_paper_id} Get From Dictionary ${response.json()["data"]["records"][0]} id Set Global Variable ${supplier_paper_id} -operate_update_virtual_supplier_status_deactivate - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} - ${body} Set Variable {"id":"${supplier_paper_id}","status":0} #虚拟供应商状态 0禁用 1启用 - ${response} POST On Session yytclient /cloud-print-user-center/supplier/directsalestore/virtual-supplier/updatestatus ${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"]} - -operate_update_virtual_supplier_status_enable - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} +operate_update_virtual_supplier_status + Create Session yytops ${yytops} headers=${operation_backend_header} ${body} Set Variable {"id":"${supplier_paper_id}","status":1} #虚拟供应商状态 0禁用 1启用 - ${response} POST On Session yytclient /cloud-print-user-center/supplier/directsalestore/virtual-supplier/updatestatus ${body.encode("utf8")} + ${response} POST On Session yytops /cloud-print-user-center/admin/supplier/directsalestore/virtual-supplier/updatestatus ${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"]} operate_create_enterprise_with_supplier_paper - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + Create Session yytops ${yytops} headers=${operation_backend_header} ${supplier_paper_name} Set Variable autotest_supplier_paper_name ${supplier_paper_type} Set Variable 2 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他 ${supplier_paper_uniformSocialCreditCode} Set Variable autotest91440101MA59F2J10M @@ -91,7 +85,7 @@ operate_create_enterprise_with_supplier_paper ${supplier_paper_accountOpeningBranch} Set Variable autotest_accountOpeningBranch ${supplier_paper_locationBank} Set Variable autotest_locationBank ${body} Set Variable {"supplierId":"${supplier_paper_id}","enterprise":{"name":"${supplier_paper_name}","locDetail":"${supplier_paper_locDetail}","type":${supplier_paper_type},"uniformSocialCreditCode":"${supplier_paper_uniformSocialCreditCode}","legalPersonIdCardNo":"${supplier_paper_legalPersonIdCardNo}","legalPersonName":"${supplier_paper_legalPersonName}","paperSettlementIntervalTypeId":"${supplier_paper_paperSettlementIntervalTypeId}","locProvinceId":${supplier_paper_locProvinceId},"locCityId":${supplier_paper_locCityId},"locDistrictId":${supplier_paper_locDistrictId},"locStreetId":${supplier_paper_locStreetId},"legalPersonIdCardFrontImg":"${supplier_paper_legalPersonIdCardFrontImg}","legalPersonIdCardBackImg":"${supplier_paper_legalPersonIdCardBackImg}","businessLicenseImg":"${supplier_paper_businessLicenseImg}"},"enterpriseContacts":{"name":"${supplier_paper_contactsname}","mobilePhone":"${supplier_paper_mobilePhone}","telephone":"${supplier_paper_telephone}","email":"${supplier_paper_email}","wechatAccount":"${supplier_paper_wechatAccount}","remark":"${supplier_paper_remark}"},"enterpriseCorporateAccount":{"bankAccountName":"${supplier_paper_bankAccountName}","bankAccount":"${supplier_paper_bankAccount}","bankName":"${supplier_paper_bankName}","accountOpeningBranch":"${supplier_paper_accountOpeningBranch}","locationBank":"${supplier_paper_locationBank}"}} - ${response} POST On Session yytclient /cloud-print-user-center/create/enterprise/with/supplier ${body.encode("utf8")} + ${response} POST On Session yytops /cloud-print-user-center/admin/create/enterprise/with/supplier ${body.encode("utf8")} Set Global Variable ${supplier_paper_name} Log ${response.status_code} log ${response.json()} @@ -100,9 +94,9 @@ operate_create_enterprise_with_supplier_paper sleep 1 operate_get_virtual_supplier_search - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + Create Session yytops ${yytops} headers=${operation_backend_header} ${param} Set Variable name=${virtual_supplier_name} - ${response} Get On Session yytclient /cloud-print-user-center/supplier/directsalestore/virtual-supplier/page params=${param} + ${response} Get On Session yytops /trading-center/admin/supplier/directsalestore/virtual-supplier/page params=${param} Log ${response.status_code} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} @@ -110,45 +104,86 @@ operate_get_virtual_supplier_search ${supplier_enterprise_id} Get From Dictionary ${response.json()["data"]["records"][0]} enterpriseId Set Global Variable ${supplier_enterprise_id} -operate_get_supplier_paper_detail - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} - ${response} Get On Session yytclient /cloud-print-user-center/get/enterprise/detail/${supplier_enterprise_id} - 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"]} - Should Be Equal As Strings ${supplier_enterprise_id} ${response.json()["data"]["enterprise"]["id"]} - -operate_save_supplier_paper_detail - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} +operate_supplier_paper_save_base_info + Create Session yytops ${yytops} headers=${operation_backend_header} ${supplier_paper_name} Set Variable autotest_supplier_paper_name - ${supplier_paper_type} Set Variable 2 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他 + ${supplier_paper_shortName} Set Variable autotest_shortName + ${supplier_paper_type} Set Variable 5 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他 ${supplier_paper_uniformSocialCreditCode} Set Variable autotest91440101MA59F2J10M ${supplier_paper_legalPersonName} Set Variable autotest_legalperson ${supplier_paper_legalPersonIdCardNo} Set Variable autotest_legalpersonidcardno + ${supplier_paper_legalPersonMobile} Set Variable 13800138000 ${supplier_paper_paperSettlementIntervalTypeId} Set Variable 1 #结算周期 1现结 2月结20天 3月结45天 4月结60天 5月结75天 6月结90天 ${supplier_paper_locProvinceId} Set Variable 440000 ${supplier_paper_locCityId} Set Variable 440100 ${supplier_paper_locDistrictId} Set Variable 440106 ${supplier_paper_locStreetId} Set Variable 440106003 + ${supplier_paper_locprovincename} Set Variable 广东省 + ${supplier_paper_loccityname} Set Variable 广州市 + ${supplier_paper_locdistrictname} Set Variable 天河区 + ${supplier_paper_locstreetname} Set Variable 车陂街道 ${supplier_paper_locDetail} Set Variable autotest_supplier_paper_details ${supplier_paper_legalPersonIdCardFrontImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg ${supplier_paper_legalPersonIdCardBackImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg ${supplier_paper_businessLicenseImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg - ${supplier_paper_contactsname} Set Variable autotest_contactsname - ${supplier_paper_mobilePhone} Set Variable autotest_mobilePhone - ${supplier_paper_telephone} Set Variable autotest_telephone - ${supplier_paper_email} Set Variable autotest_email - ${supplier_paper_wechatAccount} Set Variable autotest_wechatAccount - ${supplier_paper_remark} Set Variable autotest_remark - ${supplier_paper_bankAccountName} Set Variable autotest_bankAccountName - ${supplier_paper_bankAccount} Set Variable autotest_bankAccount - ${supplier_paper_bankName} Set Variable autotest_bankName - ${supplier_paper_accountOpeningBranch} Set Variable autotest_accountOpeningBranch - ${supplier_paper_locationBank} Set Variable autotest_locationBank - ${body} Set Variable {"supplierId":"${supplier_paper_id}","enterprise":{"id": "${supplier_enterprise_id}","name":"${supplier_paper_name}","locDetail":"${supplier_paper_locDetail}","type":${supplier_paper_type},"uniformSocialCreditCode":"${supplier_paper_uniformSocialCreditCode}","legalPersonIdCardNo":"${supplier_paper_legalPersonIdCardNo}","legalPersonName":"${supplier_paper_legalPersonName}","paperSettlementIntervalTypeId":"${supplier_paper_paperSettlementIntervalTypeId}","locProvinceId":${supplier_paper_locProvinceId},"locCityId":${supplier_paper_locCityId},"locDistrictId":${supplier_paper_locDistrictId},"locStreetId":${supplier_paper_locStreetId},"legalPersonIdCardFrontImg":"${supplier_paper_legalPersonIdCardFrontImg}","legalPersonIdCardBackImg":"${supplier_paper_legalPersonIdCardBackImg}","businessLicenseImg":"${supplier_paper_businessLicenseImg}"},"enterpriseContacts":{"name":"${supplier_paper_contactsname}","mobilePhone":"${supplier_paper_mobilePhone}","telephone":"${supplier_paper_telephone}","email":"${supplier_paper_email}","wechatAccount":"${supplier_paper_wechatAccount}","remark":"${supplier_paper_remark}"},"enterpriseCorporateAccount":{"bankAccountName":"${supplier_paper_bankAccountName}","bankAccount":"${supplier_paper_bankAccount}","bankName":"${supplier_paper_bankName}","accountOpeningBranch":"${supplier_paper_accountOpeningBranch}","locationBank":"${supplier_paper_locationBank}"}} - ${response} POST On Session yytclient /cloud-print-user-center/save/enterprise/detail ${body.encode("utf8")} - Log ${response.status_code} + ${body} Set Variable {"id":"${supplier_enterprise_id}","createTime":null,"updateTime":"${current_date_second}","name":"${supplier_paper_name}","shortName":"${supplier_paper_shortName}","receiptRequirement":null,"legalPersonName":"${supplier_paper_legalPersonName}","legalPersonIdCardNo":"${supplier_paper_legalPersonIdCardNo}","legalPersonMobile":"${supplier_paper_legalPersonMobile}","type":${supplier_paper_type},"registeredCapital":999,"regAddrLongitude":null,"regAddrLatitude":null,"supplierId":null,"annualTurnover":100,"uniformSocialCreditCode":"${supplier_paper_uniformSocialCreditCode}","locProvinceId":${supplier_paper_locProvinceId},"locProvinceName":"${supplier_paper_locprovincename}","locCityId":${supplier_paper_locCityId},"locCityName":"${supplier_paper_loccityname}","locDistrictId":${supplier_paper_locDistrictId},"locDistrictName":"${supplier_paper_locdistrictname}","locStreetId":${supplier_paper_locStreetId},"locStreetName":"${supplier_paper_locstreetname}","locDetail":"${supplier_paper_locDetail}","businessLicenseImg":"${supplier_paper_businessLicenseImg}","legalPersonIdCardFrontImg":"${supplier_paper_legalPersonIdCardFrontImg}","legalPersonIdCardBackImg":"${supplier_paper_legalPersonIdCardBackImg}"} + ${response} POST On Session yytops /cloud-print-user-center/admin/save/supplier/base-info ${body.encode("utf8")} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + sleep 1 + +operate_supplier_paper_save_main_products + Disable Warnings + Create Session yytops ${yytops} headers=${operation_backend_header} + ${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","mainCategoryBrandId":"599233095564136448","mainCategoryId":"638458876659896320","mainProducts":"638458876659896320"} + ${response} POST On Session yytops /cloud-print-user-center/admin/save/supplier/main-products ${body.encode("utf8")} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + sleep 1 + +operate_supplier_paper_save_factory_list + Disable Warnings + Create Session yytops ${yytops} headers=${operation_backend_header} + ${supplier_factory_locProvinceId} Set Variable 440000 + ${supplier_factory_locCityId} Set Variable 440100 + ${supplier_factory_locDistrictId} Set Variable 440106 + ${supplier_factory_locStreetId} Set Variable 440106003 + ${supplier_factory_locprovincename} Set Variable 广东省 + ${supplier_factory_loccityname} Set Variable 广州市 + ${supplier_factory_locdistrictname} Set Variable 天河区 + ${supplier_factory_locstreetname} Set Variable 车陂街道 + ${supplier_factory_locDetail} Set Variable autotest_supplier_factory_details + ${supplier_factory_leaseContractImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg + ${supplier_factory_factoryPhotos} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg + ${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","factoryList":[{"locProvinceName":"${supplier_factory_locprovincename}","locCityName":"${supplier_factory_loccityname}","locDistrictName":"${supplier_factory_locdistrictname}","locStreetName":"${supplier_factory_locstreetname}","locDetail":"${supplier_factory_locDetail}","locProvinceId":${supplier_factory_locProvinceId},"locCityId":${supplier_factory_locCityId},"locDistrictId":${supplier_factory_locDistrictId},"locStreetId":${supplier_factory_locStreetId},"leaseContractImg":"${supplier_factory_leaseContractImg}","factoryPhotos":"${supplier_factory_factoryPhotos}"}]} + ${response} POST On Session yytops /cloud-print-user-center/admin/save/factory-list ${body.encode("utf8")} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + sleep 1 + +operate_supplier_paper_save_private_account + Disable Warnings + Create Session uecops ${uecops} headers=${operation_backend_header} + ${supplier_private_account_cardholderName} Set Variable autotest_cardholder + ${supplier_private_account_bankCardNumber} Set Variable autotest_bankCardNumber + ${supplier_private_account_openingBank} Set Variable autotest_openingBank + ${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","list":[{"cardholderName":"${supplier_private_account_cardholderName} ","bankCardNumber":"${supplier_private_account_bankCardNumber}","openingBank":"${supplier_private_account_openingBank} "}]} + ${response} POST On Session uecops /uec/admin/save/enterprise/private-account ${body.encode("utf8")} + log ${response.json()} + Should Be Equal As Numbers 200 ${response.status_code} + Should Be Equal As Strings successful ${response.json()["message"]} + sleep 1 + +operate_supplier_paper_add_pc_machine + Disable Warnings + Create Session yytops ${yytops} headers=${operation_backend_header} + ${supplier_machine_name} Set Variable autotest_supplier_machine_name + ${supplier_machineType} Set Variable 10 + ${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","id":null,"name":"${supplier_machine_name}","machineType":"${supplier_machineType}"} + ${response} POST On Session yytops /capacity-market/add/pc-machine ${body.encode("utf8")} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} @@ -156,26 +191,61 @@ operate_save_supplier_paper_detail operate_supplier_paper_add_enterprise_administrator Disable Warnings - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} - ${supplier_paper_realname} Set Variable autotest_name_supplier - ${supplier_paper_mobile} Set Variable 13123456789 - ${body} Set Variable {"supplierEnterpriseId":"${supplier_enterprise_id}","realName":"${supplier_paper_realname}","mobile":"${supplier_paper_mobile}"} - ${response} POST On Session yytclient /cloud-print-user-center/add/enterprise-administrator ${body.encode("utf8")} - Set Suite Variable ${supplier_paper_mobile} - Set Suite Variable ${supplier_paper_realname} + Create Session yytops ${yytops} headers=${operation_backend_header} + ${supplier_enterprise_administrator_realname} Set Variable autotest_name_supplier + ${supplier_enterprise_administrator_mobile} Set Variable 13123456789 + ${supplier_enterprise_administrator_position} Set Variable ADMINISTRATOR #角色 ADMINISTRATOR管理员 ORDINARY普通员工 + ${body} Set Variable {"enterpriseId":"${supplier_enterprise_id}","realName":"${supplier_enterprise_administrator_realname}","mobile":${supplier_enterprise_administrator_mobile},"position":"${supplier_enterprise_administrator_position}"} + ${response} POST On Session yytops /cloud-print-user-center/admin/save/user/to/enterprise ${body.encode("utf8")} + Set Suite Variable ${supplier_enterprise_administrator_mobile} + Set Suite Variable ${supplier_enterprise_administrator_realname} 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"]} sleep 1 +operate_get_supplier_paper_base_info + Create Session yytops ${yytops} headers=${operation_backend_header} + ${response} Get On Session yytops /cloud-print-user-center/admin/get/supplier/base-info/${supplier_enterprise_id} + 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_supplier_paper_settlement_account_info + Create Session yytops ${yytops} headers=${operation_backend_header} + ${response} Get On Session yytops /cloud-print-user-center/admin/get/supplier/settlement-account-info/${supplier_enterprise_id} + 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_supplier_paper_employee_list - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + Create Session yytops ${yytops} headers=${operation_backend_header} ${param} Set Variable supplierEnterpriseId=${supplier_enterprise_id} - ${response} Get On Session yytclient /cloud-print-user-center/get/employee-list params=${param} + ${response} Get On Session yytops /cloud-print-user-center/get/employee-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"]} + Should Be Equal As Strings ${supplier_enterprise_administrator_mobile} ${response.json()["data"]["records"][0]["mobile"]} + Should Be Equal As Strings ${supplier_enterprise_administrator_realname} ${response.json()["data"]["records"][0]["realName"]} + +operate_get_supplier_paper_machine_list + Create Session yytops ${yytops} headers=${operation_backend_header} + ${param} Set Variable enterpriseId=${supplier_enterprise_id} + ${response} Get On Session yytops /cloud-print-user-center/get/supplier/machine/page 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"]} + +operate_get_supplier_paper_purchase_order_list + Create Session yytops ${yytops} headers=${operation_backend_header} + ${param} Set Variable enterpriseId=${supplier_enterprise_id} + ${response} Get On Session yytops /trading-center/admin/get/purchase-order-list/in/supplier-detail 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"]} - Should Be Equal As Strings ${supplier_paper_mobile} ${response.json()["data"]["records"][0]["mobile"]} - Should Be Equal As Strings ${supplier_paper_realname} ${response.json()["data"]["records"][0]["realName"]} diff --git a/006_get_credit/customer_credit_password.robot b/006_get_credit/customer_credit_password.robot index 0efd9f8..bf6fa40 100644 --- a/006_get_credit/customer_credit_password.robot +++ b/006_get_credit/customer_credit_password.robot @@ -4,24 +4,79 @@ Library Collections Library urllib3 *** Variables *** -&{cloudfactory_customer_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer} +&{cloud_factory_customer_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 +${uecclient} https://api-client-uec-test.qniao.cn ${yytclient} https://api-client-yyt-test.qniao.cn *** Test Cases *** +customer_phone + #去除警告 + Disable Warnings + #创建会话 会话别名 baseurl headers + Create Session uecclient ${uecclient} headers=${cloud_factory_customer_header} + #变量名称 设置用例变量 变量值 + ${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号 + ${account} Set Variable 13012345678 + ${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_customer} Get From Dictionary ${response.json()["data"]} token + #日志 + log ${gettoken_customer} + #设置token变量 未转业务线 + Set Suite Variable ${gettoken_customer} + #变量接收客户userid 获取字典内容 响应结果 userid-key + ${userid_customer} Get From Dictionary ${response.json()["data"]} userId + #日志 + log ${userid_customer} + #设置token变量 + Set Suite Variable ${userid_customer} + #设置带token的请求头 + &{cloudfactorycustomerheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${gettoken_customer} + #设置token变量 + Set Suite Variable ${cloudfactorycustomerheader} + +customer_login_token + Disable Warnings + Create Session yytclient ${yytclient} headers=${cloudfactorycustomerheader} + ${body} Set Variable {"loginToken":"${gettoken_customer}"} + ${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_customer} Get From Dictionary ${response.json()} data + log ${getlogintoken_customer} + #全局token + Set Global Variable ${getlogintoken_customer} + &{cloudfactory_customer_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer} + Set Suite Variable ${cloudfactory_customer_header} + customer_get_credit_password_status Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} ${response} Get On Session yytclient /cloud-print-user-center/credit/payment-password/getstatus 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 false ${response.json()["data"]["setPassword"]} #设置密码状态 true已设置 false未设置 + Should Be Equal As Strings False ${response.json()["data"]["setPassword"]} #设置密码状态 True已设置 False未设置 customer_save_credit_password Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} ${customer_credit_password} Set Variable 123456 ${save_creditpassword_type} Set Variable 0 #操作状态 0增加密码 1修改密码 ${body} Set Variable {"oldPassword":"","newPassword":"${customer_credit_password}","repeatPassword":"${customer_credit_password}","status":${save_creditpassword_type}} - ${response} Get On Session yytclient /cloud-print-user-center/credit/payment-password/save ${body.encode("utf8")} + ${response} POST On Session yytclient /cloud-print-user-center/credit/payment-password/save ${body.encode("utf8")} Set Suite Variable ${customer_credit_password} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} diff --git a/012_product_price_update/product_price_batch_update_purchaseprice.robot b/012_product_price_update/product_price_batch_update_purchaseprice.robot index 2214422..b8b02f9 100644 --- a/012_product_price_update/product_price_batch_update_purchaseprice.robot +++ b/012_product_price_update/product_price_batch_update_purchaseprice.robot @@ -31,12 +31,10 @@ 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 - ${product_status} Set Variable {"skuids":["${product_price_sku_id}"],"alterType":${product_price_sku_alterType},"price":${product_price_sku_new}} - ${body} Set Variable {"status":${product_status},"id":"${product_id}"} + ${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"]} - ${product_price_sku_new} Get From Dictionary ${response.json()["data"]["records"][0]} skuId - Set Global Variable ${product_price_sku_new} diff --git a/015_customer_create_order/customer_create_order_credit_payment.robot b/015_customer_create_order/customer_create_order_credit_payment.robot index 238d392..69c1b49 100644 --- a/015_customer_create_order/customer_create_order_credit_payment.robot +++ b/015_customer_create_order/customer_create_order_credit_payment.robot @@ -22,7 +22,7 @@ customer_create_order_credit_payment ${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":${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}"}] + ${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()} diff --git a/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot b/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot index 1fb4184..fb62cc2 100644 --- a/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot +++ b/016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot @@ -15,7 +15,7 @@ customer_add_enquiry ${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}",} + ${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} @@ -48,8 +48,9 @@ supplierfocus_get_enquiry_list_search 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} + ${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"]} @@ -75,7 +76,7 @@ supplierfocus_get_enquiry_details 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} + ${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"]} @@ -89,7 +90,7 @@ supplierfocus_get_obtain_paper_quotes_list 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}"} + ${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} @@ -109,7 +110,7 @@ supplier_enquiry_reply_batch 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} + ${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"]} @@ -135,7 +136,7 @@ customer_enquiry_create_order_credit_payment ${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}"}] + ${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()} diff --git a/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot b/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot index 2f37d9f..e6cabfe 100644 --- a/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot +++ b/017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot @@ -6,7 +6,8 @@ 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} +&{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 *** @@ -23,7 +24,7 @@ customer_get_order_list_search ${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 successful ${response.json()["message"]} Should Be Equal As Strings ${customer_enquiry_create_order_id} ${response.json()["data"]["records"][0]["orderId"]} customer_get_order_detail2 @@ -42,26 +43,15 @@ supplierfocus_get_order_list 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_get_order_list_search - Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + 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"]}${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"]} + 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} @@ -69,6 +59,10 @@ supplierfocus_get_order_order-item-list 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} @@ -91,21 +85,75 @@ supplierfocus_create_supplier_order_batch Should Be Equal As Strings successful ${response.json()["message"]} sleep 1 -supplierr_get_order_list +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 +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"][1]} id + ${supplier_order_id} Get From Dictionary ${response.json()["data"]["records"][0]} orderId Set Global Variable ${supplier_order_id} supplier_get_order_detail2 @@ -115,16 +163,16 @@ supplier_get_order_detail2 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=${cloudfactory_customer_header} + Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header} ${body} Set Variable {"orderId":"${supplier_order_id}"} - ${response} Get On Session yytclient /trading-center/seller/confirm/supplier-order-and-sign ${body.encode("utf-8")} + ${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"]} - ${supplier_order_totalPrice} Get From Dictionary ${response.json()["data"]["supplierPrice"]} totalPrice - Set Global Variable ${supplier_order_totalPrice} sleep 1 supplierfocus_get_order_detail @@ -135,18 +183,18 @@ supplierfocus_get_order_detail Should Be Equal As Strings successful ${response.json()["message"]} supplierfocus_confirm_supplier_order_shipping - Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${body} Set Variable {"orderId":"${supplier_order_id}"} - ${response} Get On Session yytclient trading-center/seller/confirm/supplier-order-shipping ${body.encode("utf-8")} + ${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_customer_header} + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} ${body} Set Variable {"orderId":"${supplier_order_id}"} - ${response} Get On Session yytclient /trading-center/seller/confirm/supplier-order-receipt ${body.encode("utf-8")} + ${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"]} diff --git a/018_payable_and_receivable/receivable.robot b/018_payable_and_receivable/receivable.robot index 6d6f2ec..984248d 100644 --- a/018_payable_and_receivable/receivable.robot +++ b/018_payable_and_receivable/receivable.robot @@ -19,7 +19,7 @@ operate_get_receivable_list operate_get_receivable_list_search Create Session yytops ${yytops} headers=${operationpsc_header} - ${param} Set Variable enterpriseName=${supplier_paper_name} + ${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()} @@ -31,8 +31,8 @@ operate_get_receivable_list_search operate_confirm_receivable Create Session yytops ${yytops} headers=${operationpsc_header} ${receivable_remark} Set Variable autotest_remark - ${bady} Set Variable {"id":"${payable_id}","realAmount":${customer_order_totalPrice},"remark":"${receivable_remark}"} - ${response} POST On Session yytops /admin/confirm/receivable ${bady} + ${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"]} diff --git a/test_data_clear.robot b/test_data_clear.robot index 8d308a9..7496f3f 100644 --- a/test_data_clear.robot +++ b/test_data_clear.robot @@ -114,7 +114,7 @@ supplierfocus_delete_paper_brand customer_enterprise_delete_shipping_address Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header} - ${body} Set Variable {"id":"${customer_enterprise_shipping_address_id}"} - ${response} Delete On Session uecclient /uec/delete/enterprise-shipping-address/${customer_enterprise_shipping_address_id} ${body.encode.("utf8")} + #${body} Set Variable {"id":"${customer_enterprise_shipping_address_id}"} + ${response} Delete On Session uecclient /uec/delete/enterprise-shipping-address/${customer_enterprise_shipping_address_id} #${body.encode("utf8")} log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code}