test #18

Merged
liangjinman merged 5 commits from test into master 4 years ago
  1. 14
      000_get_current_datetime.robot
  2. 15
      001_login_get_info/login_customer.robot
  3. 15
      001_login_get_info/login_supplier.robot
  4. 8
      001_login_get_info/login_supplier_focus.robot
  5. 34
      002_user_register/customer_user_register.robot
  6. 12
      002_user_register/supplier_user_register.robot
  7. 16
      003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot
  8. 184
      004_enterprise_open_account_supplier/supplier_paper_open_account.robot
  9. 62
      006_get_credit/customer_credit_password.robot
  10. 25
      011_product_price_config/product_price_config_qniao_and_feisuan.robot
  11. 40
      012_product_price_update/product_price_batch_update_purchaseprice.robot
  12. 0
      013_paper_list_and_details/customer_get_paper_list_and_detail.robot
  13. 49
      014_shinpping_address/customer_enterprise_shipping_address.robot
  14. 32
      015_customer_create_order/customer_create_order_credit_payment.robot
  15. 148
      016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot
  16. 201
      017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot
  17. 33
      018_payable_and_receivable/customer_bill.robot
  18. 37
      018_payable_and_receivable/payable.robot
  19. 38
      018_payable_and_receivable/receivable.robot
  20. 8
      test_data_clear.robot

14
000_get_current_datetime.robot

@ -8,3 +8,17 @@ 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}
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}

15
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}
@ -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}
@ -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原纸集采商

15
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}
@ -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}
@ -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原纸集采商

8
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
@ -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}
@ -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}

34
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}

12
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}

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

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

62
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}
@ -36,3 +91,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}

25
011_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"]}

40
012_product_price_update/product_price_batch_update_purchaseprice.robot

@ -0,0 +1,40 @@
*** Settings ***
Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus}
${yytclient} https://api-client-yyt-test.qniao.cn
*** Test Cases ***
product_price_sku_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/get/seller/product-sku-list
Log ${response.status_code}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
product_price_sku_list_search
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${param} Set Variable salesEnterpriseId=${supplier_paper_id}&name=${paper_name}
${response} Get On Session yytclient /trading-center/get/seller/product-sku-list params=${param}
Log ${response.status_code}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
${product_price_sku_id} Get From Dictionary ${response.json()["data"]["records"][0]} skuId
Set Global Variable ${product_price_sku_id}
product_price_sku_batch_update_purchaseprice
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${product_price_sku_alterType} Set Variable 1 #变更类型 1统一修改 2增加价格 3减少价格
${product_price_sku_new} Set Variable 6789
${body} Set Variable {"skuids":["${product_price_sku_id}"],"alterType":${product_price_sku_alterType},"price":${product_price_sku_new}}
${response} POST On Session yytclient /trading-center/product/unify/alter/purchasing-cost ${body.encode("utf8")}
Set Global Variable ${product_price_sku_new}
Log ${response.status_code}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}

011_paper_list_and_details/customer_get_paper_list_and_detail.robot → 013_paper_list_and_details/customer_get_paper_list_and_detail.robot

49
014_shinpping_address/customer_enterprise_shipping_address.robot

@ -0,0 +1,49 @@
*** Settings ***
Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{cloudfactory_customer_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer}
${uecclient} https://api-client-uec-test.qniao.cn
*** Test Cases ***
customer_enterprise_shipping_address_list
Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header}
${response} Get On Session uecclient /uec/get/enterprise-shipping-address-list/by-userId
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
customer_enterprise_save_shipping_address
Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header}
${customer_enterprise_shipping_address_isDefault} Set Variable 1 #是否默认地址 0否 1是
${customer_enterprise_shipping_address_receiver} Set Variable autotest_receiver
${customer_enterprise_shipping_address_receiverMobile} Set Variable 13800138000
${customer_enterprise_shipping_address_detail} Set Variable autotest_customer_enterprise_shipping_address_detail
${customer_enterprise_shipping_address_provinceid} Set Variable 440000
${customer_enterprise_shipping_address_cityid} Set Variable 440100
${customer_enterprise_shipping_address_districtid} Set Variable 440106
${customer_enterprise_shipping_address_streetid} Set Variable 440106003
${customer_enterprise_shipping_address_provincename} Set Variable 广东省
${customer_enterprise_shipping_address_cityname} Set Variable 广州市
${customer_enterprise_shipping_address_districtname} Set Variable 天河区
${customer_enterprise_shipping_address_streetname} Set Variable 车陂街道
${body} Set Variable {"isDefault":${customer_enterprise_shipping_address_isDefault},"receiver":"${customer_enterprise_shipping_address_receiver}","receiverMobile":${customer_enterprise_shipping_address_receiverMobile},"detail":"${customer_enterprise_shipping_address_detail}","provinceId":${customer_enterprise_shipping_address_provinceid},"cityId":${customer_enterprise_shipping_address_cityid},"districtId":${customer_enterprise_shipping_address_districtid},"streetId":${customer_enterprise_shipping_address_streetid},"provinceName":"${customer_enterprise_shipping_address_provincename}","cityName":"${customer_enterprise_shipping_address_cityname}","districtName":"${customer_enterprise_shipping_address_districtname}","streetName":"${customer_enterprise_shipping_address_streetname}"}
${response} POST On Session uecclient /uec/save/enterprise-shipping-address ${body.encode("utf-8")}
Set Global Variable ${customer_enterprise_shipping_address_receiver}
Set Global Variable ${customer_enterprise_shipping_address_receiverMobile}
Set Global Variable ${customer_enterprise_shipping_address_detail}
Set Global Variable ${customer_enterprise_shipping_address_provinceid}
Set Global Variable ${customer_enterprise_shipping_address_cityid}
Set Global Variable ${customer_enterprise_shipping_address_streetid}
Set Global Variable ${customer_enterprise_shipping_address_districtid}
Set Global Variable ${customer_enterprise_shipping_address_provincename}
Set Global Variable ${customer_enterprise_shipping_address_cityname}
Set Global Variable ${customer_enterprise_shipping_address_districtname}
Set Global Variable ${customer_enterprise_shipping_address_streetname}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
${customer_enterprise_shipping_address_id} Get From Dictionary ${response.json()} data
Set Global Variable ${customer_enterprise_shipping_address_id}

32
015_customer_create_order/customer_create_order_credit_payment.robot

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

148
016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot

@ -0,0 +1,148 @@
*** Settings ***
Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{cloudfactory_customer_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer}
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus}
&{cloud_factory_supplier_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier}
${yytclient} https://api-client-yyt-test.qniao.cn
*** Test Cases ***
customer_add_enquiry
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${customer_enquiryContent} Set Variable autotest_enquiryContent
${customer_deliveryDay} Set Variable 48
${customer_deliveryArea} Set Variable 广东省 广州市 天河区
${body} Set Variable {"enquiryContent":"${customer_enquiryContent}","picUrl":"","deliveryDay":${customer_deliveryDay},"deliveryArea":"${customer_deliveryArea}"}
${response} POST On Session yytclient /trading-center/add/enquiry-order ${body.encode("utf-8")}
Set Global Variable ${customer_enquiryContent}
Set Suite Variable ${customer_deliveryDay}
Set Suite Variable ${customer_deliveryArea}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
${customer_enquiry_id} Get From Dictionary ${response.json()} data
Set Global Variable ${customer_enquiry_id}
sleep 1
supplierfocus_get_enquiry_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/get/enquiry-order/order-list
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
supplierfocus_get_enquiry_list_search
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${enquiry_status} Set Variable 0 #是否报价 0待报价 1已报价
${enquiry_valid_status} Set Variable 0 #是否有效 0生效 1失效
${param} Set Variable searchValue=${customer_enquiryContent}&status=${enquiry_status}&valid=${enquiry_valid_status}
${response} Get On Session yytclient /trading-center/get/enquiry-order/order-list params=${param}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${customer_enquiry_id} ${response.json()["data"]["records"][0]["id"]}
supplierfocus_edit_enquiry_details
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${customer_enquiry_remark} Set Variable autotest_remark
${body} Set Variable {"addList":[{"deliveryId":null,"deliveryProvinceId":null,"deliveryProvinceName":null,"deliveryCityId":null,"deliveryCityName":null,"deliveryDistrictId":null,"deliveryDistrictName":null,"deliveryStreetId":null,"deliveryStreetName":null,"deliveryDetails":null,"deliveryReceiver":null,"deliveryReceiverMobile":null,"brandId":"${paper_brand_id}","gramWeight":678,"width":787,"length":1000,"quantity":5000,"brandName":"${paper_name}","enquiryId":"${customer_enquiry_id}","remark":"${customer_enquiry_remark}"},{"deliveryId":null,"deliveryProvinceId":null,"deliveryProvinceName":null,"deliveryCityId":null,"deliveryCityName":null,"deliveryDistrictId":null,"deliveryDistrictName":null,"deliveryStreetId":null,"deliveryStreetName":null,"deliveryDetails":null,"deliveryReceiver":null,"deliveryReceiverMobile":null,"brandId":"${paper_brand_id}","gramWeight":678,"width":787,"length":1092,"quantity":5000,"brandName":"${paper_name}","enquiryId":"${customer_enquiry_id}","remark":"${customer_enquiry_remark}"}],"delList":[],"updateList":[],"id":"${customer_enquiry_id}","askEnterprise":"${printing_packaging_factory_id}","belongEnterpriseName":"${printing_packaging_factory_name}","deliveryDay":${customer_deliveryDay},"deliveryArea":"${customer_deliveryArea}","enquiryContent":"${customer_enquiryContent}","picUrl":null,"receiver":null,"receiverMobile":null,"deliveryProvinceId":null,"deliveryCityId":null,"deliveryDistrictId":null,"deliveryStreetId":null,"deliveryProvinceName":null,"deliveryCityName":null,"deliveryDistrictName":null,"deliveryStreetName":null,"deliveryDetail":null,"deliveryId":null,"deliveryDetails":null,"deliveryReceiver":null,"deliveryReceiverMobile":null}
${response} POST On Session yytclient /trading-center/update/enquiry-order ${body.encode("utf-8")}
Set Global Variable ${customer_enquiry_remark}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1
supplierfocus_distribute_enquiry_details
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${body} Set Variable {"id":"${customer_enquiry_id}"}
${response} POST On Session yytclient /trading-center/distribute/enquiry-reply ${body.encode("utf-8")}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1
supplierfocus_get_enquiry_details
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/get/enquiry-order/${customer_enquiry_id}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Numbers 1 ${response.json()["data"]["isDistribute"]} #是否分发 0否 1是
supplierfocus_get_obtain_paper_quotes_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${param} Set Variable enquiryId=${customer_enquiry_id}
${response} Get On Session yytclient /trading-center/get/obtain-paper-quotes/list params=${param}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
${paper_quotes_item_id1} Get From Dictionary ${response.json()["data"][0]["replyList"][0]} id
Set Global Variable ${paper_quotes_item_id1}
${paper_quotes_item_id2} Get From Dictionary ${response.json()["data"][0]["replyList"][1]} id
Set Global Variable ${paper_quotes_item_id2}
${paperQuotedPriceId} Get From Dictionary ${response.json()["data"][0]["replyList"][0]} paperQuotedPriceId
Set Global Variable ${paperQuotedPriceId}
supplierfocus_submit_paper_quotation
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${supplierfocus_paper_quotation_remark} Set Variable autotest_supplierfocus_paper_quotation_remark
${body} Set Variable {"addList":[],"delList":[],"enquiryId":"${customer_enquiry_id}","updateList":[{"enquiryId":"${customer_enquiry_id}","paperQuotedPriceId":"${paperQuotedPriceId}","id":"${paper_quotes_item_id1}","productSkuId":"${product_price_sku_id}","paperId":null,"brandId":"${paper_brand_id}","paperName":null,"brandName":"${paper_name}","productName":null,"gramWeight":678,"quantity":5000,"length":1000,"width":787,"weight":2.6679,"unitFee":5150,"totalPrice":"13739.69","createTime":"${current_date_second.encode('utf-8')}","updateTime":"${current_date_second.encode('utf-8')}","effectiveTime":"${current_date_second.encode('utf-8')}","salesEnterpriseId":"${supplier_paper_id}","remark":"${customer_enquiry_remark}","purchasePrice":5000,"otherFee":0,"repEnterprise":"553652487819759617","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":5100},{"enquiryId":"${customer_enquiry_id}","paperQuotedPriceId":"${paperQuotedPriceId}","id":"${paper_quotes_item_id2}","productSkuId":"${product_price_sku_id}","paperId":null,"brandId":"${paper_brand_id}","paperName":null,"brandName":"${paper_name}","productName":null,"gramWeight":678,"quantity":5000,"length":1092,"width":787,"weight":2.9134,"unitFee":5150,"totalPrice":"15004.01","createTime ":"${current_date_second.encode('utf-8')}","updateTime":"${current_date_second.encode('utf-8')}","effectiveTime":"${current_date_second.encode('utf-8')}","salesEnterpriseId":"${supplier_paper_id}","remark":"${customer_enquiry_remark}","purchasePrice":5000,"otherFee":0,"repEnterprise":"${supplier_paper_id}","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":5100}],"remark":"${supplierfocus_paper_quotation_remark}"}
${response} POST On Session yytclient /trading-center/submit/paper-quotation ${body.encode("utf-8")}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1
supplier_enquiry_reply_batch
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header}
${supplier_paper_quotation_remark} Set Variable autotest_supplier_paper_quotation_remark
${body} Set Variable {"enquiryId":"${customer_enquiry_id}","replyList":[{"brandName":"${paper_name}","brandId":"${paper_brand_id}","width":787,"length":1000,"gramWeight":678,"quantity":5000,"weight":2.6679,"unitFee":5000,"otherFee":0,"totalPrice":13339.5,"remark":"${customer_enquiry_remark}"},{"brandName":"${paper_name}","brandId":"${paper_brand_id}","width":787,"length":1092,"gramWeight":678,"quantity":5000,"weight":2.9134,"unitFee":5000,"otherFee":0,"totalPrice":14567,"remark":"${customer_enquiry_remark}"}],"remark":"${supplier_paper_quotation_remark}"}
${response} POST On Session yytclient /trading-center/wechatapplet/add/enquiry-reply-batch ${body.encode("utf-8")}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1
supplierfocus_get_supplier_quotation_record_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${param} Set Variable enquiryId=${customer_enquiry_id}
${response} Get On Session yytclient /trading-center/get/supplier-quotation-record/list params=${param}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
customer_get_enquiry_result
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${response} Get On Session yytclient /trading-center/get/enquiry-result/${customer_enquiry_id}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
customer_enquiry_create_order_credit_payment
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${customer_enterprise_shipping_address_receiver} Set Variable autotest_receiver
${customer_enterprise_shipping_address_receiverMobile} Set Variable 13800138000
${customer_enterprise_shipping_address_detail} Set Variable autotest_customer_enterprise_shipping_address_detail
${customer_enterprise_shipping_address_provinceid} Set Variable 440000
${customer_enterprise_shipping_address_cityid} Set Variable 440100
${customer_enterprise_shipping_address_districtid} Set Variable 440106
${customer_enterprise_shipping_address_streetid} Set Variable 440106003
${customer_enterprise_shipping_address_provincename} Set Variable 广东省
${customer_enterprise_shipping_address_cityname} Set Variable 广州市
${customer_enterprise_shipping_address_districtname} Set Variable 天河区
${customer_enterprise_shipping_address_streetname} Set Variable 车陂街道
${customer_create_order_paymentMethod} Set Variable 2 #支付方式 1微信支付 2授信支付 3线下支付 4飞算支付
${customer_enquiry_create_order_productSkuList} Set Variable [{"enquiryReplyId":"${paper_quotes_item_id1}","enquiryId":"${customer_enquiry_id}","gramWeight":678,"width":787,"length":1000,"quantity":5000,"buyTon":2.6679,"productName":null,"purchasePrice":5000,"unitPrice":5150,"bootFee":0,"cuttingFee":0,"freightFee":0,"serviceFee":0,"otherFee":0,"totalOfferPrice":13739.69,"remark":"","productSkuId":"${product_price_sku_id}"},{"enquiryReplyId":"${paper_quotes_item_id2}","enquiryId":"${customer_enquiry_id}","gramWeight":678,"width":787,"length":1092,"quantity":5000,"buyTon":2.9134,"productName":null,"purchasePrice":5000,"unitPrice":5150,"bootFee":0,"cuttingFee":0,"freightFee":0,"serviceFee":0,"otherFee":0,"totalOfferPrice":15004.01,"remark":"","productSkuId":"${product_price_sku_id}"}]
${body} Set Variable {"receiverMobile":"${customer_enterprise_shipping_address_receiverMobile}","receiver":"${customer_enterprise_shipping_address_receiver}","deliveryProvinceId":${customer_enterprise_shipping_address_provinceid},"deliveryProvinceName":"${customer_enterprise_shipping_address_provincename}","deliveryCityId":${customer_enterprise_shipping_address_cityid},"deliveryCityName":"${customer_enterprise_shipping_address_cityname}","deliveryDistrictId":${customer_enterprise_shipping_address_districtid},"deliveryDistrictName":"${customer_enterprise_shipping_address_districtname}","deliveryStreetId":${customer_enterprise_shipping_address_streetid},"deliveryStreetName":"${customer_enterprise_shipping_address_streetname}","deliveryId":"${customer_enterprise_shipping_address_id}","deliveryDetails":"${customer_enterprise_shipping_address_detail}","paymentMethod":${customer_create_order_paymentMethod},"realPayPrice":28743.7,"totalOfferPrice":28743.7,"password":"${customer_credit_password_new}","productSkuList":${customer_enquiry_create_order_productSkuList.encode("utf-8")}}
${response} POST On Session yytclient /trading-center/buyer/create/order ${body.encode("utf-8")}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
${customer_enquiry_create_order_id} Get From Dictionary ${response.json()["data"]} orderId
Set Global Variable ${customer_enquiry_create_order_id}
${customer_enquiry_create_order_contractNo} Get From Dictionary ${response.json()["data"]} contractNo
Set Global Variable ${customer_enquiry_create_order_contractNo}

201
017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot

@ -0,0 +1,201 @@
*** Settings ***
Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{cloudfactory_customer_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer}
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus}
&{cloud_factory_supplier_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666
${uecclient} https://api-client-uec-test.qniao.cn
${yytclient} https://api-client-yyt-test.qniao.cn
*** Test Cases ***
customer_get_order_list
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${response} Get On Session yytclient /trading-center/buyer/get/self-enterprise-order-page
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
customer_get_order_list_search
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${param} Set Variable status=2 #客户获取订单状态 2待发货 3待收货 5已完成 7待评价
${response} Get On Session yytclient /trading-center/buyer/get/self-enterprise-order-page params=${param}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${customer_enquiry_create_order_id} ${response.json()["data"]["records"][0]["orderId"]}
customer_get_order_detail2
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${response} Get On Session yytclient /trading-center/buyer/get/order-detail/${customer_enquiry_create_order_id}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Numbers 2 ${response.json()["data"]["showStatus"]}
${customer_order_totalPrice} Get From Dictionary ${response.json()["data"]["supplierPrice"]} totalPrice
Set Global Variable ${customer_order_totalPrice}
supplierfocus_get_order_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/get/supplier/order-management/page
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
supplierfocus_get_order_list_search
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${param} Set Variable clientContractNo=${customer_enquiry_create_order_contractNo}
${response} Get On Session yytclient /trading-center/get/supplier/order-management/page params=${param}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${customer_enquiry_create_order_id} ${response.json()["data"]["records"][0]["id"]}
supplierfocus_get_order_order-item-list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/get/order-item-list/by/${customer_enquiry_create_order_id}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
${supply_order_item_id1} Get From Dictionary ${response.json()["data"][0]} id
Set Global Variable ${supply_order_item_id1}
${supply_order_item_id2} Get From Dictionary ${response.json()["data"][1]} id
Set Global Variable ${supply_order_item_id2}
supplierfocus_create_supplier_order_batch
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${supplier_order_remark} Set Variable autotest_supplier_order_remark
${customer_enterprise_shipping_address_receiver} Set Variable autotest_receiver
${customer_enterprise_shipping_address_receiverMobile} Set Variable 13800138000
${customer_enterprise_shipping_address_detail} Set Variable autotest_customer_enterprise_shipping_address_detail
${customer_enterprise_shipping_address_provinceid} Set Variable 440000
${customer_enterprise_shipping_address_cityid} Set Variable 440100
${customer_enterprise_shipping_address_districtid} Set Variable 440106
${customer_enterprise_shipping_address_streetid} Set Variable 440106003
${customer_enterprise_shipping_address_provincename} Set Variable 广东省
${customer_enterprise_shipping_address_cityname} Set Variable 广州市
${customer_enterprise_shipping_address_districtname} Set Variable 天河区
${customer_enterprise_shipping_address_streetname} Set Variable 车陂街道
${body} Set Variable {"orderItemList":[{"deliveryId":"${customer_enterprise_shipping_address_id}","deliveryProvinceId":${customer_enterprise_shipping_address_provinceid},"deliveryProvinceName":"${customer_enterprise_shipping_address_provincename}","deliveryCityId":${customer_enterprise_shipping_address_cityid},"deliveryCityName":"${customer_enterprise_shipping_address_cityname}","deliveryDistrictId":${customer_enterprise_shipping_address_districtid},"deliveryDistrictName":"${customer_enterprise_shipping_address_districtname}","deliveryStreetId":${customer_enterprise_shipping_address_streetid},"deliveryStreetName":"${customer_enterprise_shipping_address_streetname}","deliveryDetails":"${customer_enterprise_shipping_address_detail}","receiver":"${customer_enterprise_shipping_address_receiver}","receiverMobile":"${customer_enterprise_shipping_address_receiverMobile}","otherFee":0,"remark":"autotest_supplier_order_remark","unitPrice":5000,"supplyOrderItemId":"${supply_order_item_id1}"},{"deliveryId":"${customer_enterprise_shipping_address_id}","deliveryProvinceId":${customer_enterprise_shipping_address_provinceid},"deliveryProvinceName":"${customer_enterprise_shipping_address_provincename}","deliveryCityId":${customer_enterprise_shipping_address_cityid},"deliveryCityName":"${customer_enterprise_shipping_address_cityname}","deliveryDistrictId":${customer_enterprise_shipping_address_districtid},"deliveryDistrictName":"${customer_enterprise_shipping_address_districtname}","deliveryStreetId":${customer_enterprise_shipping_address_streetid},"deliveryStreetName":"${customer_enterprise_shipping_address_streetname}","deliveryDetails":"${customer_enterprise_shipping_address_detail}","receiver":"${customer_enterprise_shipping_address_receiver}","receiverMobile":"${customer_enterprise_shipping_address_receiverMobile}","otherFee":0,"remark":"autotest_supplier_order_remark","unitPrice":5000,"supplyOrderItemId":"${supply_order_item_id2}"}]}
${response} POST On Session yytclient /trading-center/seller/create/supplier-order-batch ${body.encode("utf-8")}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1
supplier_phone
#去除警告
Disable Warnings
#创建会话 会话别名 baseurl headers
Create Session uecclient ${uecclient} headers=${cloud_factory_supplier_header}
#变量名称 设置用例变量 变量值
${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号
${account} Set Variable 13123456789
${body} Set Variable {"accountType":${accounttype},"account":"${account}","captcha":"888888"}
#变量接收响应结果 post请求 会话别名 uri 传参
${response} POST On Session uecclient /uec/authorize/by-captcha ${body}
#日志
Log ${response.status_code}
#日志
Log ${response.text}
#日志
Log ${response.json()}
#断言数字 预期结果 实际结果
Should Be Equal As Numbers 200 ${response.status_code}
#断言字符串 预期结果 实际结果
Should Be Equal As Strings successful ${response.json()["message"]}
#变量接收token 获取字典内容 响应结果 token-key
${gettoken_supplier} Get From Dictionary ${response.json()["data"]} token
#日志
log ${gettoken_supplier}
#设置token变量 未转业务线
Set Suite Variable ${gettoken_supplier}
#变量接收供应商userid 获取字典内容 响应结果 userid-key
${userid_supplier} Get From Dictionary ${response.json()["data"]} userId
#日志
log ${userid_supplier}
#设置token变量
Set Suite Variable ${userid_supplier}
#设置带token的请求头
&{cloudfactorysupplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier}
#设置token变量
Set Suite Variable ${cloudfactorysupplierheader}
supplier_login_token
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorysupplierheader}
${body} Set Variable {"loginToken":"${gettoken_supplier}"}
${response} POST On Session yytclient /cloud-print-user-center/authorize/get/product-line-token/by/login-token ${body.encode("utf8")}
Log ${response.status_code}
Log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
${getlogintoken_supplier} Get From Dictionary ${response.json()} data
log ${getlogintoken_supplier}
#全局token
Set Global Variable ${getlogintoken_supplier}
&{cloudfactory_supplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier}
Set Suite Variable ${cloudfactory_supplierheader}
supplier_get_order_list
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header}
${response} Get On Session yytclient /trading-center/wechatapplet/get/supplier-order-page
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
supplier_get_order_list_search
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header}
${param} Set Variable status=2 #供应商获取订单状态 2待送货
${response} Get On Session yytclient /trading-center/wechatapplet/get/supplier-order-page params=${param}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
${supplier_order_id} Get From Dictionary ${response.json()["data"]["records"][0]} orderId
Set Global Variable ${supplier_order_id}
supplier_get_order_detail2
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header}
${response} Get On Session yytclient /trading-center/wechatapplet/get/supplier-order-detail/${supplier_order_id}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Numbers 1 ${response.json()["data"]["showStatus"]}
${supplier_order_totalPrice} Get From Dictionary ${response.json()["data"]["supplierPrice"]} totalPrice
Set Global Variable ${supplier_order_totalPrice}
supplier_confirm_order
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header}
${body} Set Variable {"orderId":"${supplier_order_id}"}
${response} POST On Session yytclient /trading-center/seller/confirm/supplier-order-and-sign ${body.encode("utf-8")}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1
supplierfocus_get_order_detail
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/seller/get/customer-order-detail/${customer_enquiry_create_order_id}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
supplierfocus_confirm_supplier_order_shipping
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${body} Set Variable {"orderId":"${supplier_order_id}"}
${response} POST On Session yytclient /trading-center/seller/confirm/supplier-order-shipping ${body.encode("utf-8")}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1
supplierfocus_confirm_supplier_order_receipt
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${body} Set Variable {"orderId":"${supplier_order_id}"}
${response} POST On Session yytclient /trading-center/seller/confirm/supplier-order-receipt ${body.encode("utf-8")}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1

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

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

38
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=${printing_packaging_factory_name}
${response} Get On Session yytops /trading-center/admin/get/receivable-list params=${param}
Log ${response.status_code}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
${receivable_id} Get From Dictionary ${response.json()["data"]["records"][0]} id
Set Suite Variable ${receivable_id}
operate_confirm_receivable
Create Session yytops ${yytops} headers=${operationpsc_header}
${receivable_remark} Set Variable autotest_remark
${bady} Set Variable {"id":"${receivable_id}","realAmount":${customer_order_totalPrice},"remark":"${receivable_remark}"}
${response} POST On Session yytops /trading-center/admin/confirm/receivable ${bady}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}

8
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}
Loading…
Cancel
Save