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"]}