优化获取baseurl和header #24

Merged
liangjinman merged 2 commits from test into master 4 years ago
  1. 124
      000_get_base_datas.robot
  2. 25
      000_get_current_datetime.robot
  3. 1
      001_login_get_info/__init__.robot
  4. 48
      001_login_get_info/login_customer.robot
  5. 14
      001_login_get_info/login_operate.robot
  6. 18
      001_login_get_info/login_operate_psc.robot
  7. 56
      001_login_get_info/login_supplier.robot
  8. 53
      001_login_get_info/login_supplierfocus.robot
  9. 43
      002_user_register/customer_user_register.robot
  10. 45
      002_user_register/supplier_user_register.robot
  11. 64
      003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot
  12. 91
      004_enterprise_open_account_supplier/supplier_paper_open_account.robot
  13. 22
      005_enterprise_apply_credit/apply_credit_qniao_customer.robot
  14. 0
      006_get_credit/__init__.robot
  15. 4
      006_get_credit/customer_credit_password.robot
  16. 4
      006_get_credit/customer_get_credit.robot
  17. 9
      007_paper_variety_management/paper_brand.robot
  18. 8
      007_paper_variety_management/paper_category.robot
  19. 8
      007_paper_variety_management/paper_manufacturer.robot
  20. 10
      008_market_information/market_information_link.robot
  21. 11
      009_product_manage/product_add_and_list.robot
  22. 22
      010_limited_specialoffer/limited_specialoffer_product.robot
  23. 6
      011_product_price_config/product_price_config_qniao_and_feisuan.robot
  24. 7
      012_product_price_update/product_price_batch_update_purchaseprice.robot
  25. 4
      013_paper_list_and_details/customer_get_paper_list_and_detail.robot
  26. 4
      014_shinpping_address/customer_enterprise_shipping_address.robot
  27. 7
      015_customer_create_order/customer_create_order_credit_payment.robot
  28. 16
      016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot
  29. 15
      017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot
  30. 5
      018_payable_and_receivable/customer_bill.robot
  31. 5
      018_payable_and_receivable/payable.robot
  32. 5
      018_payable_and_receivable/receivable.robot
  33. 4
      019_capacity_market/capacity_commodity.robot
  34. 4
      019_capacity_market/capacity_machines.robot
  35. 11
      100_test_data_clear.robot
  36. BIN
      datas/000_base.xls
  37. BIN
      datas/001_login.xls
  38. BIN
      datas/003_open_account_customer.xls
  39. BIN
      datas/004_open_account_supplier_paper.xls
  40. BIN
      datas/005_credit_qniao_customer.xls
  41. BIN
      datas/006_credit_password.xls
  42. BIN
      datas/007_paper_variety_management.xls
  43. BIN
      datas/008_market_information_link.xls
  44. BIN
      datas/009_product_manage.xls
  45. BIN
      datas/012_product_price.xls
  46. BIN
      datas/014_customer_shipping_address.xls
  47. BIN
      datas/015_customer_create_order.xls
  48. BIN
      datas/016_customer_enquiry_create_order.xls
  49. BIN
      datas/017_create_supplier_order_batch.xls
  50. BIN
      datas/018_payable_receivable.xls

124
000_get_base_datas.robot

@ -0,0 +1,124 @@
*** Settings ***
Test Teardown Run Keyword If Test Failed Fatal Error
Library DateTime
Library ExcelLibrary
*** Test Cases ***
current_datetime
${current_time} Get Current Date
${current_date} Convert Date ${current_time} result_format=%Y-%m-%d
Set Global Variable ${current_date}
${current_date_month} Convert Date ${current_time} result_format=%Y-%m
Set Global Variable ${current_date_month}
${current_date_second} Convert Date ${current_time} result_format=%Y-%m-%d %H:%M:%S
Set Global Variable ${current_date_second}
base_url_header
Open Excel ./datas/000_base.xls
${uecops} Read Cell Data By Name url B1
${yytops} Read Cell Data By Name url B2
${pscops} Read Cell Data By Name url B3
${pscclient} Read Cell Data By Name url B4
${yytclient} Read Cell Data By Name url B5
${uecclient} Read Cell Data By Name url B6
Set Global Variable ${uecops}
Set Global Variable ${yytops}
Set Global Variable ${pscops}
Set Global Variable ${pscclient}
Set Global Variable ${yytclient}
Set Global Variable ${uecclient}
${cloud_factory_customer_header} Read Cell Data By Name header B1
${cloud_factory_supplier_header} Read Cell Data By Name header B2
${cloud_factory_supplierfocus_header} Read Cell Data By Name header B3
${operation_backend_header} Read Cell Data By Name header B4
${operation_psc_header} Read Cell Data By Name header B5
Set Global Variable ${cloud_factory_customer_header}
Set Global Variable ${cloud_factory_supplier_header}
Set Global Variable ${cloud_factory_supplierfocus_header}
Set Global Variable ${operation_backend_header}
Set Global Variable ${operation_psc_header}
#${cloudfactory_customer_header} Read Cell Data By Name header_token B1
#${cloudfactory_supplier_header} Read Cell Data By Name header_token B2
#${cloudfactory_supplierfocus_header} Read Cell Data By Name header_token B3
#${operationbackend_header} Read Cell Data By Name header_token B4
#${operationpsc_header} Read Cell Data By Name header_token B5
#Set Global Variable ${cloudfactory_customer_header}
#Set Global Variable ${cloudfactory_supplier_header}
#Set Global Variable ${cloudfactory_supplierfocus_header}
#Set Global Variable ${operationbackend_header}
#Set Global Variable ${operationpsc_header}
get_login_datas
#Open Excel ./datas/001_login.xls
#${rows} Get Row Count customer_phone
#FOR ${row} IN RANGE 1 ${rows}
# ${accounttype} Read Cell Data By Coordinates customer_phone 0 ${row}
# ${account} Read Cell Data By Coordinates customer_phone 1 ${row}
# ${captcha} Read Cell Data By Coordinates customer_phone 2 ${row}
#END
Open Excel ./datas/001_login.xls
${accounttype_customer} Read Cell Data By Name customer_phone A2
${account_customer} Read Cell Data By Name customer_phone B2
${captcha_customer} Read Cell Data By Name customer_phone C2
Set Global Variable ${accounttype_customer}
Set Global Variable ${account_customer}
Set Global Variable ${captcha_customer}
${accounttype_supplier} Read Cell Data By Name supplier_phone A2
${account_supplier} Read Cell Data By Name supplier_phone B2
${captcha_supplier} Read Cell Data By Name supplier_phone C2
Set Global Variable ${accounttype_supplier}
Set Global Variable ${account_supplier}
Set Global Variable ${captcha_supplier}
${accounttype_supplierfocus} Read Cell Data By Name supplier_focus_phone A2
${account_supplierfocus} Read Cell Data By Name supplier_focus_phone B2
${captcha_supplierfocus} Read Cell Data By Name supplier_focus_phone C2
Set Global Variable ${accounttype_supplierfocus}
Set Global Variable ${account_supplierfocus}
Set Global Variable ${captcha_supplierfocus}
${username_operate} Read Cell Data By Name operate_mail A2
${password_operate} Read Cell Data By Name operate_mail B2
Set Global Variable ${username_operate}
Set Global Variable ${password_operate}
${username_operatepsc} Read Cell Data By Name operate_psc_mail A2
${password_operatepsc} Read Cell Data By Name operate_psc_mail B2
Set Global Variable ${username_operatepsc}
Set Global Variable ${password_operatepsc}
get_customer_datas
Open Excel ./datas/003_open_account_customer.xls
get_supplier_datas
Open Excel ./datas/004_open_account_supplier_paper.xls
get_credit_qniao_customer_datas
Open Excel ./datas/005_credit_qniao_customer.xls
get_credit_password_datas
Open Excel ./datas/006_credit_password.xls
get_paper_variety_management_datas
Open Excel ./datas/007_paper_variety_management.xls
get_market_information_link_datas
Open Excel ./datas/008_market_information_link.xls
get_product_manage_datas
Open Excel ./datas/009_product_manage.xls
get_product_price_datas
Open Excel ./datas/012_product_price.xls
get_customer_shipping_address_datas
Open Excel ./datas/014_customer_shipping_address.xls
get_customer_create_order_datas
Open Excel ./datas/015_customer_create_order.xls
get_customer_enquiry_create_order_datas
Open Excel ./datas/016_customer_enquiry_create_order.xls
get_create_supplier_order_batch_datas
Open Excel ./datas/017_create_supplier_order_batch.xls
get_payable_receivable_datas
Open Excel ./datas/018_payable_receivable.xls

25
000_get_current_datetime.robot

@ -1,25 +0,0 @@
*** Settings ***
Test Teardown
Library DateTime
*** Test Cases ***
current_datetime
${current_time} Get Current Date
log ${current_time}
${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}

1
001_login_get_info/__init__.robot

@ -1 +0,0 @@
*** Settings ***

48
001_login_get_info/login_customer.robot

@ -4,72 +4,42 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{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 传参
#${body} Set Variable {"accountType":${accounttype_customer},"account":"${account_customer}","captcha":"${captcha_customer}"}
${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
Set Global Variable ${gettoken_customer}
${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}
Set Global Variable ${userid_customer}
#&{cloudfactory_customer_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${gettoken_customer}
#Set Global Variable ${cloudfactory_customer_header}
customer_login_token
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorycustomerheader}
Create Session yytclient ${yytclient} headers=${cloud_factory_customer_header}
${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"]}
${get_status} ${token} Run Keyword And Ignore Error Get From Dictionary ${response.json()} data
${getlogintoken_customer} Set Variable If "${get_status}"=="FAIL" ${gettoken_customer}
... "${token}"=="None" ${gettoken_customer} ${token}
#全局token
${getlogintoken_customer} Set Variable If "${get_status}"=="FAIL" ${gettoken_customer} "${token}"=="None" ${gettoken_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}
Set Suite Variable ${cloudfactory_customer_header}
Set Global Variable ${cloudfactory_customer_header}
get_customer_userinfo
Create Session uecclient ${uecclient} headers=${cloudfactory_customer_header}
${response} Get On Session uecclient /uec/get/user-info
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"]}
@ -79,7 +49,6 @@ get_customer_userinfo
get_customer_baseinfo
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${response} Get On Session yytclient cloud-print-user-center/get/base-info
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"]}
@ -88,7 +57,6 @@ get_customer_baseinfo
get_customer_useridentity
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${response} Get On Session yytclient cloud-print-user-center/get/user/identity
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"]}

14
001_login_get_info/login_operate.robot

@ -4,10 +4,6 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{operation_backend_header} Content-Type=application/x-www-form-urlencoded X-APP-ID=503258978847952999
${yytops} https://api-ops-yyt-test.qniao.cn
*** Test Cases ***
operate_mail
Disable Warnings
@ -15,21 +11,19 @@ operate_mail
${username} Set Variable liangjinman@qniao.cn
${password} Set Variable qn123456
&{body} Create Dictionary username=${username} password=${password}
#&{body} Create Dictionary username=${username_operate} password=${password_operate}
${response} POST On Session yytops /cloud-factory-operation-backend/admin/login ${body}
Log ${response.status_code}
Log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings 登陆成功 ${response.json()["message"]}
${gettoken_operate} get from Dictionary ${response.headers} Authorization
log ${gettoken_operate}
Set Global Variable ${gettoken_operate}
&{operationbackend_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${gettoken_operate}
${getlogintoken_operate} get from Dictionary ${response.headers} Authorization
Set Global Variable ${getlogintoken_operate}
&{operationbackend_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${getlogintoken_operate}
Set Global Variable ${operationbackend_header}
get_operate_userinfo
Create Session yytops ${yytops} headers=${operationbackend_header}
${response} Get On Session yytops /cloud-factory-operation-backend/admin/employee/get/login-info
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"]}

18
001_login_get_info/login_operate_psc.robot

@ -4,32 +4,26 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{operation_psc_header} Content-Type=application/x-www-form-urlencoded X-APP-ID=503258978847965324
${pscops} https://api-ops-psc-test.qniao.cn
*** Test Cases ***
operate_mail
operate_psc_mail
Disable Warnings
Create Session pscops ${pscops} headers=${operation_psc_header}
${username} Set Variable liangjinman@qniao.cn
${password} Set Variable qn123456
&{body} Create Dictionary username=${username} password=${password}
#&{body} Create Dictionary username=${username_operatepsc} password=${password_operatepsc}
${response} POST On Session pscops /payment-settlement-center/admin/login ${body}
Log ${response.status_code}
Log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings 登陆成功 ${response.json()["message"]}
${gettoken_operate_psc} get from Dictionary ${response.headers} Authorization
log ${gettoken_operate_psc}
Set Global Variable ${gettoken_operate_psc}
&{operationpsc_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${gettoken_operate_psc}
Set Suite Variable ${operationpsc_header}
${getlogintoken_operatepsc} get from Dictionary ${response.headers} Authorization
Set Global Variable ${getlogintoken_operatepsc}
&{operationpsc_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${getlogintoken_operatepsc}
Set Global Variable ${operationpsc_header}
get_operate_userinfo
Create Session pscops ${pscops} headers=${operationpsc_header}
${response} Get On Session pscops /payment-settlement-center/admin/employee/get/login-info
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"]}

56
001_login_get_info/login_supplier.robot

@ -4,72 +4,42 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{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 ***
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 传参
#${body} Set Variable {"accountType":${accounttype_supplier},"account":"${account_supplier}","captcha":"${captcha_supplier}"}
${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
Set Global Variable ${gettoken_supplier}
${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}
Set Global Variable ${userid_supplier}
#&{cloudfactory_supplier_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier}
#Set Global Variable ${cloudfactory_supplier_header}
supplier_login_token
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorysupplierheader}
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header}
${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"]}
${get_status} ${token} Run Keyword And Ignore Error Get From Dictionary ${response.json()} data
${getlogintoken_supplier} Set Variable If "${get_status}"=="FAIL" ${gettoken_supplier}
... "${token}"=="None" ${gettoken_supplier} ${token}
#全局token
${getlogintoken_supplier} Set Variable If "${get_status}"=="FAIL" ${gettoken_supplier} "${token}"=="None" ${gettoken_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=${gettoken_supplier}
Set Suite Variable ${cloudfactory_supplierheader}
&{cloudfactory_supplier_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier}
Set Global Variable ${cloudfactory_supplier_header}
get_supplier_userinfo
Create Session uecclient ${uecclient} headers=${cloudfactory_supplierheader}
Create Session uecclient ${uecclient} headers=${cloudfactory_supplier_header}
${response} Get On Session uecclient /uec/get/user-info
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"]}
@ -77,18 +47,16 @@ get_supplier_userinfo
#Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用
get_supplier_baseinfo
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierheader}
Create Session yytclient ${yytclient} headers=${cloudfactory_supplier_header}
${response} Get On Session yytclient cloud-print-user-center/get/base-info
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 Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用
get_supplier_useridentity
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierheader}
Create Session yytclient ${yytclient} headers=${cloudfactory_supplier_header}
${response} Get On Session yytclient cloud-print-user-center/get/user/identity
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"]}

001_login_get_info/login_supplier_focus.robot → 001_login_get_info/login_supplierfocus.robot

@ -4,74 +4,46 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{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
*** Test Cases ***
supplier_focus_phone
#去除警告
supplierfocus_phone
Disable Warnings
#创建会话 会话别名 baseurl headers
Create Session uecclient ${uecclient} headers=${cloud_factory_supplier_focus_header}
#变量名称 设置用例变量 变量值
Create Session uecclient ${uecclient} headers=${cloud_factory_supplierfocus_header}
${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号
${account} Set Variable 13500003333
${body} Set Variable {"accountType":${accounttype},"account":"${account}","captcha":"888888"}
#变量接收响应结果 post请求 会话别名 uri 传参
#${body} Set Variable {"accountType":${accounttype_supplierfocus},"account":"${account_supplierfocus}","captcha":"${captcha_supplierfocus}"}
${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_focus} Get From Dictionary ${response.json()["data"]} token
#日志
log ${gettoken_supplier_focus}
#设置token变量 未转业务线
Set Suite Variable ${gettoken_supplier_focus}
#变量接收集采商userid 获取字典内容 响应结果 userid-key
${gettoken_supplierfocus} Get From Dictionary ${response.json()["data"]} token
Set Global Variable ${gettoken_supplierfocus}
${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=503258978847953922 Authorization=${gettoken_supplier_focus}
#设置token变量
Set Suite Variable ${cloudfactorysupplierfocusheader}
Set Global Variable ${userid_supplierfocus}
#&{cloud_factory_supplierfocus_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847953922 Authorization=${gettoken_supplier_focus}
#Set Suite Variable ${cloud_factory_supplierfocus_header}
supplier_focus_login_token
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorysupplierfocusheader}
Create Session yytclient ${yytclient} headers=${cloud_factory_supplierfocus_header}
${body} Set Variable {"loginToken":"${gettoken_supplier_focus}"}
${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_focus} Get From Dictionary ${response.json()} data
log ${getlogintoken_supplier_focus}
#全局token
Set Global Variable ${getlogintoken_supplier_focus}
&{cloudfactory_supplierfocus_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus}
Set Suite Variable ${cloudfactory_supplierfocus_header}
&{cloudfactory_supplierfocus_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847953922 Authorization=${getlogintoken_supplier_focus}
Set Global Variable ${cloudfactory_supplierfocus_header}
get_supplier_focus_userinfo
Create Session uecclient ${uecclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session uecclient /uec/get/user-info
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 Integers ${userid_supplier_focus} ${response.json()["data"]["userId"]}
Should Be Equal As Integers ${userid_supplierfocus} ${response.json()["data"]["userId"]}
Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用
Should Be Equal As Strings 538701347130839040 ${response.json()["data"]["enterpriseId"]}
Should Be Equal As Strings 厦门千纸互联科技有限公司 ${response.json()["data"]["enterpriseName"]}
@ -79,7 +51,6 @@ get_supplier_focus_userinfo
get_supplier_focus_baseinfo
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient cloud-print-user-center/get/base-info
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"]}

43
002_user_register/customer_user_register.robot

@ -5,12 +5,6 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{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
${yytops} https://api-ops-yyt-test.qniao.cn
*** Test Cases ***
customer_phone_captcha
Disable Warnings
@ -18,26 +12,22 @@ customer_phone_captcha
${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号
${customer_account} Set Variable 13012345678
${body} Set Variable {"accountType":${accounttype},"account":"${customer_account}","captcha":"888888"}
#${body} Set Variable {"accountType":${accounttype_customer},"account":"${account_customer}","captcha":"${captcha_customer}"}
Set Global Variable ${customer_account}
${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"]}
${gettoken_customer} Get From Dictionary ${response.json()["data"]} token
log ${gettoken_customer}
Set Suite Variable ${gettoken_customer}
Set Global Variable ${gettoken_customer}
${userid_customer} Get From Dictionary ${response.json()["data"]} userId
log ${userid_customer}
#未转业务线token
Set Suite Variable ${userid_customer}
&{cloudfactorycustomerheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${gettoken_customer}
Set Suite Variable ${cloudfactorycustomerheader}
Set Global Variable ${userid_customer}
&{cloudfactory_customer_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${gettoken_customer}
Set Global Variable ${cloudfactory_customer_header}
customerclue_customer
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorycustomerheader}
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${customer_companyname} Set Variable autotest_companyname_customer
${customer_enterprisetype} Set Variable 2 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他
${customer_job} Set Variable autotest_job_customer
@ -48,7 +38,6 @@ customerclue_customer
Set Global Variable ${customer_job}
Set Global Variable ${customer_name}
${response} POST On Session yytclient /cloud-print-user-center/save/customerclue ${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"]}
@ -56,24 +45,21 @@ customerclue_customer
customer_login_token
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorycustomerheader}
Create Session yytclient ${yytclient} headers=${cloud_factory_customer_header}
${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
#Should Be Equal As Strings successful ${response.json()["message"]}
${get_status} ${token} Run Keyword And Ignore Error Get From Dictionary ${response.json()} data
${getlogintoken_customer} Set Variable If "${get_status}"=="FAIL" ${gettoken_customer} "${token}"=="None" ${gettoken_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}
Set Global Variable ${cloudfactory_customer_header}
get_customerclue_customer
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${response} Get On Session yytclient /cloud-print-user-center/get/my/customerclue
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"]}
@ -86,7 +72,6 @@ get_customerclue_customer
customerclue_verify_have_join_customer
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${response} POST On Session yytclient /cloud-print-user-center/verify/have-join-and-fill
Log ${response.status_code}
log ${response.json()}
Should Be Equal As Strings False ${response.json()["data"]} #是否加入企业 False未加入 True已加入
@ -99,7 +84,6 @@ customerclue_uploadpictures_customer
${customerclue_type} Set Variable 1 #线索类型 1企业认证 2授信申请
${body} Set Variable {"businessLicense": "${customer_businesslicense}","idCardBack": "${customer_idcardback}","idCardFront": "${customer_idcardfront}","type": ${customerclue_type}}
${response} POST On Session yytclient /cloud-print-user-center/customerclue/upload-pictures ${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"]}
@ -107,7 +91,6 @@ customerclue_uploadpictures_customer
operate_get_user_register_list
Create Session yytops ${yytops} headers=${operationbackend_header}
${response} Get On Session yytops /cloud-print-user-center/admin/user/get/user-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"]}
@ -117,7 +100,6 @@ operate_get_user_register_search
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable 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()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
@ -126,7 +108,6 @@ operate_get_user_register_search
operate_get_customerclue_list
Create Session yytops ${yytops} headers=${operationbackend_header}
${response} Get On Session yytops /cloud-print-user-center/admin/get/customerclue/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"]}
@ -141,7 +122,6 @@ operate_get_customerclue_search
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable status=1 #客户线索状态 1待处理 2已处理
${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"]}
@ -159,7 +139,6 @@ operate_handle_customerclue
${customerclue_remark} Set Variable autotest_customerclue_remark
${body} Set Variable {"id":"${customerclue_id}","adminId":"${operate_adminid}","name":"${operate_adminname}","remark":"${customerclue_remark}"}
${response} POST On Session yytops /cloud-print-user-center/admin/handle/customerclue ${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"]}

45
002_user_register/supplier_user_register.robot

@ -5,12 +5,6 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{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
${yytops} https://api-ops-yyt-test.qniao.cn
*** Test Cases ***
supplier_phone_captcha
Disable Warnings
@ -18,26 +12,22 @@ supplier_phone_captcha
${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号
${supplier_account} Set Variable 13123456789
${body} Set Variable {"accountType":${accounttype},"account":"${supplier_account}","captcha":"888888"}
#${body} Set Variable {"accountType":${accounttype_supplier},"account":"${account_supplier}","captcha":"${captcha_supplier}"}
Set Global Variable ${supplier_account}
${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"]}
${gettoken_supplier} Get From Dictionary ${response.json()["data"]} token
log ${gettoken_supplier}
Set Suite Variable ${gettoken_supplier}
Set Global Variable ${gettoken_supplier}
${userid_supplier} Get From Dictionary ${response.json()["data"]} userId
log ${userid_supplier}
#未转业务线token
Set Suite Variable ${userid_supplier}
&{cloudfactorysupplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier}
Set Suite Variable ${cloudfactorysupplierheader}
Set Global Variable ${userid_supplier}
&{cloudfactory_supplier_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier}
Set Global Variable ${cloudfactory_supplier_header}
customerclue_supplier
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorysupplierheader}
Create Session yytclient ${yytclient} headers=${cloudfactory_supplier_header}
${supplier_companyname} Set Variable autotest_companyname_supplier
${supplier_enterprisetype} Set Variable 5 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他
${supplier_job} Set Variable autotest_job_supplier
@ -48,7 +38,6 @@ customerclue_supplier
Set Global Variable ${supplier_job}
Set Global Variable ${supplier_name}
${response} POST On Session yytclient /cloud-print-user-center/save/customerclue ${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"]}
@ -56,24 +45,21 @@ customerclue_supplier
supplier_login_token
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorysupplierheader}
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header}
${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
#Should Be Equal As Strings successful ${response.json()["message"]}
${get_status} ${token} Run Keyword And Ignore Error Get From Dictionary ${response.json()} data
${getlogintoken_supplier} Set Variable If "${get_status}"=="FAIL" ${gettoken_supplier} "${token}"=="None" ${gettoken_supplier} ${token}
Set Global Variable ${getlogintoken_supplier}
&{cloudfactory_supplier_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_supplier}
Set Suite Variable ${cloudfactory_supplier_header}
&{cloudfactory_supplier_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier}
Set Global Variable ${cloudfactory_supplier_header}
get_customerclue_supplier
Create Session yytclient ${yytclient} headers=${cloudfactory_supplier_header}
${response} Get On Session yytclient /cloud-print-user-center/get/my/customerclue
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"]}
@ -86,7 +72,6 @@ get_customerclue_supplier
customerclue_verify_have_join_supplier
Create Session yytclient ${yytclient} headers=${cloudfactory_supplier_header}
${response} POST On Session yytclient /cloud-print-user-center/verify/have-join-and-fill
Log ${response.status_code}
log ${response.json()}
Should Be Equal As Strings False ${response.json()["data"]} #是否加入企业 False未加入 True已加入
@ -99,7 +84,6 @@ customerclue_uploadpictures_supplier
${customerclue_type} Set Variable 1 #线索类型 1企业认证 2授信申请
${body} Set Variable {"businessLicense": "${supplier_businesslicense}","idCardBack": "${supplier_idcardback}","idCardFront": "${supplier_idcardfront}","type": ${customerclue_type}}
${response} POST On Session yytclient /cloud-print-user-center/customerclue/upload-pictures ${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"]}
@ -107,7 +91,6 @@ customerclue_uploadpictures_supplier
operate_get_user_register_list
Create Session yytops ${yytops} headers=${operationbackend_header}
${response} Get On Session yytops /cloud-print-user-center/admin/user/get/user-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"]}
@ -116,7 +99,6 @@ operate_get_user_register_search
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable mobile=${supplier_account}
${response} Get On Session yytops /cloud-print-user-center/admin/user/get/user-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"]}
@ -125,7 +107,6 @@ operate_get_user_register_search
operate_get_customerclue_list
Create Session yytops ${yytops} headers=${operationbackend_header}
${response} Get On Session yytops /cloud-print-user-center/admin/get/customerclue/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"]}
@ -140,7 +121,6 @@ operate_get_customerclue_search
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable status=1 #客户线索状态 1待处理 2已处理
${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"]}
@ -158,7 +138,6 @@ operate_handle_customerclue
${customerclue_remark} Set Variable autotest_customerclue_remark
${body} Set Variable {"id":"${customerclue_id}","adminId":"${operate_adminid}","name":"${operate_adminname}","remark":"${customerclue_remark}"}
${response} POST On Session yytops /cloud-print-user-center/admin/handle/customerclue ${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"]}

64
003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot

@ -4,14 +4,6 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{operation_backend_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${gettoken_operate}
&{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
${yytops} https://api-ops-yyt-test.qniao.cn
${uecops} https://api-ops-uec-test.qniao.cn
*** Test Cases ***
operate_open_account_printing_packaging_factory
Disable Warnings
@ -37,7 +29,6 @@ operate_open_account_printing_packaging_factory
Set Global Variable ${printing_packaging_factory_legalpersonname}
Set Global Variable ${printing_packaging_factory_legalpersonidcardno}
${response} POST On Session yytops /cloud-print-user-center/admin/save/enterprise ${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"]}
@ -46,7 +37,6 @@ operate_open_account_printing_packaging_factory
operate_get_printing_packaging_factory_list
Create Session yytops ${yytops} headers=${operationbackend_header}
${response} Get On Session yytops /cloud-print-user-center/admin/get/packaging-printing-mill-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"]}
@ -58,7 +48,6 @@ operate_get_printing_packaging_factory_search
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable name=${printing_packaging_factory_name}
${response} Get On Session yytops /cloud-print-user-center/admin/get/packaging-printing-mill-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"]}
@ -72,7 +61,6 @@ operate_get_printing_packaging_factory_modify_state
Create Session uecops ${uecops} headers=${operationbackend_header}
${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","status":1} #状态 0启用 1禁用
${response} POST On Session uecops /uec/admin/modify/enterprise/state ${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"]}
@ -100,7 +88,6 @@ operate_get_printing_packaging_factory_modify_state
# ${printing_packaging_factory_legalPersonIdCardFront} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
# ${body} Set Variable {"id":"${printing_packaging_factory_id}","enterpriseId":"${printing_packaging_factory_id}","status":0,"legalPersonIdCardFrontImg":"${printing_packaging_factory_legalPersonIdCardFront}","legalPersonIdCardFrontImgs":["${printing_packaging_factory_legalPersonIdCardFront}"],"legalPersonIdCardBackImg":"${printing_packaging_factory_legalPersonIdCardBack}","legalPersonIdCardBackImgs":["${printing_packaging_factory_legalPersonIdCardBack}"],"businessLicenseImg":"${printing_packaging_factory_businessLicense}","businessLicenseImgs":["${printing_packaging_factory_businessLicense}"],"legalPersonMobile":"${printing_packaging_factory_legalpersonmobile}","registeredCapital":999,"name":"${printing_packaging_factory_name}","type":${printing_packaging_factory_type},"shortName":"${printing_packaging_factory_shortname}","uniformSocialCreditCode":"${printing_packaging_factory_uniformsocialcreditcode}","locDetail":"${printing_packaging_factory_locdetail}","legalPersonName":"${printing_packaging_factory_legalpersonname}","legalPersonIdCardNo":"${printing_packaging_factory_legalpersonidcardno}","locProvinceId":${printing_packaging_factory_locprovinceid},"locCityId":${printing_packaging_factory_loccityid},"locDistrictId":${printing_packaging_factory_locdistrictid},"locStreetId":${printing_packaging_factory_locstreetid},"locProvinceName":"${printing_packaging_factory_locprovincename}","locCityName":"${printing_packaging_factory_loccityname}","locDistrictName":"${printing_packaging_factory_locdistrictname}","locStreetName":"${printing_packaging_factory_locstreetname}"}
# ${response} POST On Session uecops /uec/admin/save/enterprise2 ${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"]}
@ -130,7 +117,6 @@ operate_save_printing_packaging_factory_base_info
${printing_packaging_factory_legalPersonIdCardFront} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","id":"${printing_packaging_factory_id}","createTime":"${current_date_second}","updateTime":"${current_date_second}","name":"${printing_packaging_factory_name}","uniformSocialCreditCode":"${printing_packaging_factory_uniformsocialcreditcode}","locProvinceId":${printing_packaging_factory_locprovinceid},"locProvinceName":"${printing_packaging_factory_locprovincename}","locCityId":${printing_packaging_factory_loccityid},"locCityName":"${printing_packaging_factory_loccityname}","locDistrictId":${printing_packaging_factory_locdistrictid},"locDistrictName":"${printing_packaging_factory_locdistrictname}","locStreetId":${printing_packaging_factory_locstreetid},"locStreetName":"${printing_packaging_factory_locstreetname}","locDetail":"${printing_packaging_factory_locdetail}","legalPersonName":"${printing_packaging_factory_legalpersonname}","legalPersonIdCardNo":"${printing_packaging_factory_legalpersonidcardno}","legalPersonMobile":"${printing_packaging_factory_legalpersonmobile}","type":${printing_packaging_factory_type},"shortName":"${printing_packaging_factory_shortname}","registeredCapital":999,"incomeInPastTwoYears":100,"regAddrLongitude":null,"regAddrLatitude":null,"birthday":"${current_date}","cooperationTime":"${current_date_month}","legalPersonIdCardFrontImg":"${printing_packaging_factory_legalPersonIdCardFront}","legalPersonIdCardBackImg":null,"businessLicenseImg":"${printing_packaging_factory_businessLicense}"}
${response} POST On Session yytops /cloud-print-user-center/admin/save/packaging-printing-mill/base-info ${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"]}
@ -148,13 +134,11 @@ operate_save_printing_packaging_factory_baseinfo_factory_related_information
${printing_packaging_factory_loccityname} Set Variable 广州市
${printing_packaging_factory_locdistrictname} Set Variable 天河区
${printing_packaging_factory_locstreetname} Set Variable 车陂街道
${printing_packaging_factory_legalpersonmobile} Set Variable 13800138000
${printing_packaging_factory_factoryphotos} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${printing_packaging_factory_leasecontract} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${printing_packaging_factory_mainproducts} Set Variable autotest_mainproducts
${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","leaseContractImg":"${printing_packaging_factory_leasecontract}","factoryPhotos":"${printing_packaging_factory_factoryphotos}","mainProducts":"${printing_packaging_factory_mainproducts}","businessAnnualVolume":"9990000","locLatitude":"23.119958","locLongitude":"113.406448","locDetail":"${printing_packaging_factory_locdetail}","legalPersonName":"${printing_packaging_factory_legalpersonname}","locProvinceId":${printing_packaging_factory_locprovinceid},"locCityId":${printing_packaging_factory_loccityid},"locDistrictId":${printing_packaging_factory_locdistrictid},"locStreetId":${printing_packaging_factory_locstreetid},"locProvinceName":"${printing_packaging_factory_locprovincename}","locCityName":"${printing_packaging_factory_loccityname}","locDistrictName":"${printing_packaging_factory_locdistrictname}","locStreetName":"${printing_packaging_factory_locstreetname}"}
${response} POST On Session yytops /cloud-print-user-center/admin/save/factory ${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"]}
@ -176,7 +160,6 @@ operate_save_printing_packaging_factory_baseinfo_enterprise_shipping_addresses
${printing_packaging_factory_receivermobile} Set Variable 13800138000
${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","receiverMobile":"${printing_packaging_factory_receivermobile}","receiver":"${printing_packaging_factory_receiver}","receiveEnterpriseName":"${printing_packaging_factory_name}","enterpriseShippingAddressList":[{"detail":"${printing_packaging_factory_detail}","provinceId":${printing_packaging_factory_provinceid},"cityId":${printing_packaging_factory_cityid},"districtId":${printing_packaging_factory_districtid},"streetId":${printing_packaging_factory_streetid},"provinceName":"${printing_packaging_factory_provincename}","cityName":"${printing_packaging_factory_cityname}","districtName":"${printing_packaging_factory_districtname}","streetName":"${printing_packaging_factory_streetname}"}]}
${response} POST On Session uecops /uec/admin/save/enterprise-shipping-addresses ${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"]}
@ -187,7 +170,6 @@ operate_save_printing_packaging_factory_settlementaccountinfo_enterprise_scrappa
Create Session yytops ${yytops} headers=${operationbackend_header}
${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","deposit":990000,"earnest":900000,"totalUsed":90000}
${response} POST On Session yytops /cloud-print-user-center/admin/save/enterprise-scrap-paper-credit ${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"]}
@ -201,7 +183,6 @@ operate_save_printing_packaging_factory_settlementaccountinfo_enterprise_private
${printing_packaging_factory_openingbank} Set Variable autotest_openingbank
${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","list":[{"cardholderName":"${printing_packaging_factory_cardholdername}","bankCardNumber":"${printing_packaging_factory_bankcardnumber}","openingBank":"${printing_packaging_factory_openingbank}"}]}
${response} POST On Session uecops /uec/admin/save/enterprise/private-account ${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"]}
@ -214,7 +195,6 @@ operate_save_printing_packaging_factory_settlementaccountinfo_enterprise_paperee
${printing_packaging_factory_accountid} Set Variable autotest_accountid
${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","enterprisePaperExternalSettlementAccountList":[{"type":"${printing_packaging_factory_type}","accountId":"${printing_packaging_factory_accountid}","balance":990000,"total":990000}]}
${response} POST On Session yytops /cloud-print-user-center/admin/save/enterprise-papere-external-settlement-accounts ${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"]}
@ -230,7 +210,6 @@ operate_save_printing_packaging_factory_employee_list_add_enterprise_administrat
${response} POST On Session yytops /cloud-print-user-center/admin/add/enterprise-administrator ${body.encode("utf8")}
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}
Should Be Equal As Strings successful ${response.json()["message"]}
@ -243,7 +222,6 @@ operate_save_printing_packaging_factory_employee_list_add_employee
${printing_packaging_factory_realname} Set Variable autotest_employee
${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","position":"${printing_packaging_factory_position}","realName":"${printing_packaging_factory_realname}"}
${response} POST On Session uecops /uec/admin/add/employee ${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"]}
@ -252,7 +230,6 @@ operate_save_printing_packaging_factory_employee_list_add_employee
operate_get_printing_packaging_factory_baseinfo
Create Session yytops ${yytops} headers=${operationbackend_header}
${response} Get On Session yytops /cloud-print-user-center/admin/get/packaging-printing-mill/base-info/${printing_packaging_factory_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"]}
@ -263,7 +240,6 @@ operate_get_printing_packaging_factory_baseinfo
operate_get_printing_packaging_factory_settlementaccountinfo
Create Session yytops ${yytops} headers=${operationbackend_header}
${response} Get On Session yytops /cloud-print-user-center/admin/get/packaging-printing-mill/settlement-account-info/${printing_packaging_factory_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"]}
@ -272,7 +248,6 @@ operate_get_printing_packaging_factory_employee_list
Create Session uecops ${uecops} headers=${operationbackend_header}
${param} Set Variable enterpriseId=${printing_packaging_factory_id}
${response} Get On Session uecops /uec/admin/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"]}
@ -280,55 +255,32 @@ operate_get_printing_packaging_factory_employee_list
Should Be Equal As Strings ${printing_packaging_factory_administrator_realname} ${response.json()["data"]["records"][0]["realName"]}
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
Set Global Variable ${gettoken_customer}
${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}
Set Global Variable ${userid_customer}
#&{cloudfactory_customer_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${gettoken_customer}
#Set Global Variable ${cloudfactory_customer_header}
customer_login_token
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorycustomerheader}
Create Session yytclient ${yytclient} headers=${cloud_factory_customer_header}
${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
#Should Be Equal As Strings successful ${response.json()["message"]}
${get_status} ${token} Run Keyword And Ignore Error Get From Dictionary ${response.json()} data
${getlogintoken_customer} Set Variable If "${get_status}"=="FAIL" ${gettoken_customer} "${token}"=="None" ${gettoken_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 Global Variable ${cloudfactory_customer_header}

91
004_enterprise_open_account_supplier/supplier_paper_open_account.robot

@ -4,20 +4,12 @@ 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}
&{operation_backend_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${gettoken_operate}
&{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
${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 yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${virtual_supplier_name} Set Variable autotest_supplier_paper_name
${virtual_supplier_shortName} Set Variable autotest_supplier_shortName
${virtual_supplier_details} Set Variable autotest_supplier_paper_details
${virtual_supplier_contactname} Set Variable autotest_supplier_paper_contactname
${virtual_supplier_contactmoblie} Set Variable 13800138000
@ -29,10 +21,9 @@ operate_save_virtual_supplier
${virtual_supplier_cityname} Set Variable 广州市
${virtual_supplier_districtname} Set Variable 天河区
${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}}
${body} Set Variable {"name":"${virtual_supplier_name}","shortName":"${virtual_supplier_shortName}","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 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}
Should Be Equal As Strings successful ${response.json()["message"]}
@ -40,9 +31,8 @@ operate_save_virtual_supplier
sleep 1
operate_get_virtual_supplier_list
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_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}
Should Be Equal As Strings successful ${response.json()["message"]}
@ -53,15 +43,14 @@ 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 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 yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_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_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
@ -88,14 +77,13 @@ operate_create_enterprise_with_supplier_paper
${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 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()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1
operate_get_virtual_supplier_search
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable name=${virtual_supplier_name}
${response} Get On Session yytops /trading-center/admin/supplier/directsalestore/virtual-supplier/page params=${param}
Log ${response.status_code}
@ -106,7 +94,7 @@ operate_get_virtual_supplier_search
Set Global Variable ${supplier_enterprise_id}
operate_supplier_paper_save_base_info
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${supplier_paper_name} Set Variable autotest_supplier_paper_name
${supplier_paper_shortName} Set Variable autotest_shortName
${supplier_paper_type} Set Variable 5 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他
@ -136,7 +124,7 @@ operate_supplier_paper_save_base_info
operate_supplier_paper_save_main_products
Disable Warnings
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_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()}
@ -146,7 +134,7 @@ operate_supplier_paper_save_main_products
operate_supplier_paper_save_factory_list
Disable Warnings
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${supplier_factory_locProvinceId} Set Variable 440000
${supplier_factory_locCityId} Set Variable 440100
${supplier_factory_locDistrictId} Set Variable 440106
@ -167,7 +155,7 @@ operate_supplier_paper_save_factory_list
operate_supplier_paper_save_private_account
Disable Warnings
Create Session uecops ${uecops} headers=${operation_backend_header}
Create Session uecops ${uecops} headers=${operationbackend_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
@ -180,7 +168,7 @@ operate_supplier_paper_save_private_account
operate_supplier_paper_add_pc_machine
Disable Warnings
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_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}"}
@ -192,7 +180,7 @@ operate_supplier_paper_add_pc_machine
operate_supplier_paper_add_enterprise_administrator
Disable Warnings
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_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普通员工
@ -200,33 +188,29 @@ operate_supplier_paper_add_enterprise_administrator
${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}
Create Session yytops ${yytops} headers=${operationbackend_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}
Create Session yytops ${yytops} headers=${operationbackend_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 yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable supplierEnterpriseId=${supplier_enterprise_id}
${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"]}
@ -237,70 +221,45 @@ 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}
Create Session yytops ${yytops} headers=${operationbackend_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"]}
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}
#&{cloudfactorysupplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier}
#Set Suite Variable ${cloudfactorysupplierheader}
supplier_login_token
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactorysupplierheader}
Create Session yytclient ${yytclient} headers=${cloud_factory_supplier_header}
${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
#Should Be Equal As Strings successful ${response.json()["message"]}
${get_status} ${token} Run Keyword And Ignore Error Get From Dictionary ${response.json()} data
${getlogintoken_supplier} Set Variable If "${get_status}"=="FAIL" ${gettoken_supplier} "${token}"=="None" ${gettoken_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 Global Variable ${cloudfactory_supplierheader}
&{cloudfactory_supplier_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier}
Set Global Variable ${cloudfactory_supplier_header}

22
005_enterprise_apply_credit/apply_credit_qniao_customer.robot

@ -3,15 +3,10 @@ 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_save_apply_credit_qniao
Disable Warnings
Create Session yytops ${yytops} headers=${operationbackend_header}
Create Session yytops ${yytops} headers=${operationpsc_header}
${printing_packaging_factory_type} Set Variable 2
${printing_packaging_factory_purpose} Set Variable 1 #授信类型 1采购原纸
${printing_packaging_factory_creditLine} Set Variable 990000
@ -20,7 +15,6 @@ operate_save_apply_credit_qniao
${body} Set Variable {"creditLine":${printing_packaging_factory_creditLine},"enterpriseId":"${printing_packaging_factory_id}","enterpriseName":"${printing_packaging_factory_name}","enterpriseType":${printing_packaging_factory_type},"legalpersonIdNo":"${printing_packaging_factory_legalpersonidcardno}","legalpersonMobile":null,"legalpersonName":"${printing_packaging_factory_legalpersonname}","purpose":${printing_packaging_factory_purpose},"remark":"${printing_packaging_factory_remark}","paperSettlementIntervalTypeId":"${printing_packaging_factory_paperSettlementIntervalTypeId}"}
${response} POST On Session yytops /cloud-print-user-center/admin/credit/application/save/application ${body.encode("utf8")}
Set Suite Variable ${printing_packaging_factory_creditLine}
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"]}
@ -29,7 +23,6 @@ operate_save_apply_credit_qniao
operate_get_credit_list
Create Session yytops ${yytops} headers=${operationpsc_header}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/application/get/application-order-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"]}
@ -38,7 +31,6 @@ operate_get_credit_list_search
Create Session yytops ${yytops} headers=${operationpsc_header}
${param} Set Variable timeBegin=${current_date} 00:00:00&timeEnd=${current_date} 23:59:59&enterpriseName=${printing_packaging_factory_name}&legalpersonName=${printing_packaging_factory_legalpersonname}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/application/get/application-order-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"]}
@ -47,11 +39,10 @@ operate_get_credit_list_search
operate_verify_reject_apply_credit_qniao
Disable Warnings
Create Session yytops ${yytops} headers=${operationbackend_header}
Create Session yytops ${yytops} headers=${operationpsc_header}
${printing_packaging_factory_verify_status} Set Variable 2 #审核状态 1审核通过 2审核驳回
${body} Set Variable {"status":${printing_packaging_factory_verify_status}}
${response} Put On Session yytops /cloud-print-user-center/admin/credit/application/verify/application-order/${printing_packaging_factory_credit_id} ${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"]}
@ -59,7 +50,7 @@ operate_verify_reject_apply_credit_qniao
operate_update_apply_credit_qniao
Disable Warnings
Create Session yytops ${yytops} headers=${operationbackend_header}
Create Session yytops ${yytops} headers=${operationpsc_header}
${printing_packaging_factory_type} Set Variable 2
${printing_packaging_factory_purpose} Set Variable 1 #授信类型 1采购原纸
${printing_packaging_factory_creditLine} Set Variable 990000
@ -67,7 +58,6 @@ operate_update_apply_credit_qniao
${printing_packaging_factory_remark} Set Variable autotest_remark
${body} Set Variable {"id":"${printing_packaging_factory_credit_id}","creditLine":${printing_packaging_factory_creditLine},"enterpriseId":"${printing_packaging_factory_id}","enterpriseName":"${printing_packaging_factory_name}","enterpriseType":${printing_packaging_factory_type},"legalpersonIdNo":"${printing_packaging_factory_legalpersonidcardno}","legalpersonMobile":null,"legalpersonName":"${printing_packaging_factory_legalpersonname}","purpose":${printing_packaging_factory_purpose},"remark":"${printing_packaging_factory_remark}","paperSettlementIntervalTypeId":"${printing_packaging_factory_paperSettlementIntervalTypeId}"}
${response} POST On Session yytops /cloud-print-user-center/admin/credit/application/update/application ${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"]}
@ -75,11 +65,10 @@ operate_update_apply_credit_qniao
operate_verify_pass_apply_credit_qniao
Disable Warnings
Create Session yytops ${yytops} headers=${operationbackend_header}
Create Session yytops ${yytops} headers=${operationpsc_header}
${printing_packaging_factory_verify_status} Set Variable 1 #审核状态 1审核通过 2审核驳回
${body} Set Variable {"status":${printing_packaging_factory_verify_status}}
${response} Put On Session yytops /cloud-print-user-center/admin/credit/application/verify/application-order/${printing_packaging_factory_credit_id} ${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"]}
@ -88,7 +77,6 @@ operate_verify_pass_apply_credit_qniao
operate_get_credit_list_details
Create Session yytops ${yytops} headers=${operationpsc_header}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/get/enterprise-credit-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"]}
@ -97,7 +85,6 @@ operate_get_credit_list_details_search
Create Session yytops ${yytops} headers=${operationpsc_header}
${param} Set Variable enterpriseName=${printing_packaging_factory_name}&legalpersonName=${printing_packaging_factory_legalpersonname}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/get/enterprise-credit-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"]}
@ -108,7 +95,6 @@ operate_get_credit_list_details_search
operate_get_credit_list_details_list
Create Session yytops ${yytops} headers=${operationpsc_header}
${response} Get On Session yytops /cloud-print-user-center/admin/credit/order/get/order-list/${printing_packaging_factory_credit_details_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"]}

0
006_get_credit/__init__.robot

4
006_get_credit/customer_credit_password.robot

@ -3,10 +3,6 @@ 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_get_credit_password_status
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}

4
006_get_credit/customer_get_credit.robot

@ -3,10 +3,6 @@ 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_get_credit_qniao
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}

9
007_paper_variety_management/paper_brand.robot

@ -3,10 +3,6 @@ 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 ***
supplierfocus_save_paper_brand
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
@ -26,7 +22,6 @@ supplierfocus_save_paper_brand
Set Suite Variable ${paper_description}
Set Suite Variable ${paper_brand_img}
${response} POST On Session yytclient /trading-center/save/product/brand ${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"]}
@ -35,7 +30,6 @@ supplierfocus_save_paper_brand
supplierfocus_get_paper_brand_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/get/product/brand-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"]}
@ -46,7 +40,6 @@ supplierfocus_search_paper_brand
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${param} Set Variable searchValue=${paper_brand_name}
${response} Get On Session yytclient /trading-center/get/product/brand-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"]}
@ -59,7 +52,6 @@ supplierfocus_edit_paper_brand
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${body} Set Variable {"id":"${paper_brand_id}","categoryId":"${paper_categoryid}","paperManufacturerId":"${paper_Manufacturerid}","name":"${paper_brand_name}","paperName":"${paper_name}","characteristic":"${paper_characteristic}","description":"${paper_description}","img":"${paper_brand_img}"}
${response} POST On Session yytclient /trading-center/save/product/brand ${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"]}
@ -68,7 +60,6 @@ supplierfocus_update_status_paper_brand
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${body} Set Variable {"idList":["${paper_brand_id}"],"status":0} #纸品状态 0上架 1下架
${response} POST On Session yytclient /trading-center/update/category-brands/status/batch ${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"]}

8
007_paper_variety_management/paper_category.robot

@ -4,10 +4,6 @@ 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 ***
supplierfocus_save_paper_category
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
@ -16,7 +12,6 @@ supplierfocus_save_paper_category
Set Suite Variable ${paper_category_name}
${response} POST On Session yytclient /trading-center/save/product/paper-category ${body.encode("utf8")}
Set Global Variable ${paper_category_name}
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"]}
@ -24,7 +19,6 @@ supplierfocus_save_paper_category
supplierfocus_get_paper_category_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/get/product/paper-category-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"]}
@ -38,7 +32,6 @@ supplierfocus_edit_paper_category
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${body} Set Variable {"name":"${paper_category_name}","id":"${paper_category_id}","status":${paper_category_status}}
${response} POST On Session yytclient /trading-center/save/product/paper-category ${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"]}
@ -47,7 +40,6 @@ supplierfocus_disable_paper_category
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${body} Set Variable {"name":"${paper_category_name}","id":"${paper_category_id}","status":1}
${response} POST On Session yytclient /trading-center/save/product/paper-category ${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"]}

8
007_paper_variety_management/paper_manufacturer.robot

@ -3,10 +3,6 @@ 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 ***
supplierfocus_save_paper_manufacturer
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
@ -20,7 +16,6 @@ supplierfocus_save_paper_manufacturer
Set Suite Variable ${paper_manufacturer_description}
Set Suite Variable ${paper_manufacturer_logoImg}
${response} POST On Session yytclient /trading-center/save/paper-manufacturer ${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"]}
@ -29,7 +24,6 @@ supplierfocus_save_paper_manufacturer
supplierfocus_get_paper_manufacturer_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/get/paper-manufacturer/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"]}
@ -41,7 +35,6 @@ supplierfocus_search_paper_manufacturer
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${param} Set Variable searchValue=${paper_manufacturer_name}
${response} Get On Session yytclient /trading-center/get/paper-manufacturer/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"]}
@ -52,7 +45,6 @@ supplierfocus_edit_paper_manufacturer
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${body} Set Variable {"id":"${paper_manufacturer_id}","name":"${paper_manufacturer_name}","shortName":"${paper_manufacturer_shortName}","description":"${paper_manufacturer_description}","logoImg":"${paper_manufacturer_logoImg}"}
${response} POST On Session yytclient /trading-center/save/paper-manufacturer ${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"]}

10
008_market_information/market_information_link.robot

@ -3,12 +3,6 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{operationbackend_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${gettoken_operate}
${yytops} https://api-ops-yyt-test.qniao.cn
&{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 ***
operate_save_market_information_link
Disable Warnings
@ -17,7 +11,6 @@ operate_save_market_information_link
${body} Set Variable {"link":"${market_information_link}"}
Set Suite Variable ${market_information_link}
${response} POST On Session yytops /trading-center/admin/save/market-information-link ${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"]}
@ -25,7 +18,6 @@ operate_save_market_information_link
operate_get_market_information_link_list
Create Session yytops ${yytops} headers=${operationbackend_header}
${response} Get On Session yytops /trading-center/admin/get/market-information-link-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"]}
@ -34,7 +26,6 @@ operate_get_market_information_link_list
customer_get_market_information_link
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${response} Get On Session yytclient /trading-center/get/market-information-link
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"]}
@ -43,7 +34,6 @@ customer_get_market_information_link
record_market_information_link_view
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${response} POST On Session yytclient /trading-center/record/market-information-link/view
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"]}

11
009_product_manage/product_add_and_list.robot

@ -3,16 +3,11 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847953922 Authorization=${getlogintoken_supplier_focus}
${yytclient} https://api-client-yyt-test.qniao.cn
*** Test Cases ***
supplierfocus_product_check_exist
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${param} Set Variable categoryBrandId=${paper_brand_id}&salesEnterpriseId=${supplier_enterprise_id}
${response} Get On Session yytclient /trading-center/product/check-exist 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"]}
@ -26,7 +21,6 @@ supplierfocus_save_product
${response} POST On Session yytclient /trading-center/save/product ${body.encode("utf8")}
Set Global Variable ${gramweight}
Set Global Variable ${purchasePrice}
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"]}
@ -37,7 +31,6 @@ supplierfocus_save_product
supplierfocus_get_product_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${response} Get On Session yytclient /trading-center/get/seller/query-product-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"]}
@ -49,7 +42,6 @@ supplierfocus_get_product_list_search
${product_status} Set Variable 30112 #商品状态 30110未上架 30111上架中 30112已下架
${param} Set Variable salesEnterpriseId=${supplier_paper_id}&name=${paper_name}
${response} Get On Session yytclient /trading-center/get/seller/query-product-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"]}
@ -61,7 +53,6 @@ supplierfocus_edit_product_status_up
${product_status} Set Variable 1 #上下架状态 1上架 2下架
${body} Set Variable {"status":${product_status},"id":"${product_id}"}
${response} POST On Session yytclient /trading-center/edit/product/status/${product_id} ${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"]}
@ -71,7 +62,6 @@ supplierfocus_edit_product_status_down
${product_status} Set Variable 2 #上下架状态 1上架 2下架
${body} Set Variable {"status":${product_status},"id":"${product_id}"}
${response} POST On Session yytclient /trading-center/edit/product/status/${product_id} ${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"]}
@ -81,7 +71,6 @@ supplierfocus_batch_product_status_up
${product_status} Set Variable 30111 #批量上下架状态 30110未上架 30111上架中 30112已下架
${body} Set Variable {"status":${product_status},"idList":["${product_id}","${product_id1}"]}
${response} POST On Session yytclient /trading-center/update/product-status/batch ${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"]}

22
010_limited_specialoffer/limited_specialoffer_product.robot

@ -4,27 +4,19 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{operation_backend_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${gettoken_operate}
${yytops} https://api-ops-yyt-test.qniao.cn
&{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 ***
operate_get_noton_sale_product_list
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable isOnSale=0 #是否特价 0否 1是
${response} Get On Session yytops /trading-center/admin/get/on-sale-category-brand-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"]}
operate_on_sale_product_list_earch
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable isOnSale=0&name=${paper_brand_name}&paperName=${paper_name}
${response} Get On Session yytops /trading-center/admin/get/on-sale-category-brand-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"]}
@ -32,20 +24,18 @@ operate_on_sale_product_list_earch
Set Global Variable ${on_sale_product_paper_id}
operate_add_on_sale_product
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${product_isOnSale} Set Variable 1 #是否特价 0否 1是
${body} Set Variable {"categoryBrandIds":["${on_sale_product_paper_id}"],"isOnSale":${product_isOnSale}}
${response} POST On Session yytops trading-center/admin/add-or-remove/on-sale-category-brands ${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_get_on_sale_product_list
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${param} Set Variable isOnSale=1 #是否特价 0否 1是
${response} Get On Session yytops /trading-center/admin/get/on-sale-category-brand-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"]}
@ -55,18 +45,16 @@ customer_get_on_sale_product_list
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
${param} Set Variable isOnSale=1 #是否特价 0否 1是
${response} Get On Session yytclient /trading-center/wechatapplet/get/paper-brand/brand-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 ${on_sale_product_paper_id} ${response.json()["data"]["records"][0]["id"]}
operate_remove_on_sale_product
Create Session yytops ${yytops} headers=${operation_backend_header}
Create Session yytops ${yytops} headers=${operationbackend_header}
${product_isOnSale} Set Variable 0 #是否特价 0否 1是
${body} Set Variable {"categoryBrandIds":["${on_sale_product_paper_id}"],"isOnSale":${product_isOnSale}}
${response} POST On Session yytops trading-center/admin/add-or-remove/on-sale-category-brands ${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"]}

6
011_product_price_config/product_price_config_qniao_and_feisuan.robot

@ -3,15 +3,10 @@ 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"]}
@ -19,7 +14,6 @@ product_price_config_qniao_and_feisuan_list
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"]}

7
012_product_price_update/product_price_batch_update_purchaseprice.robot

@ -3,15 +3,10 @@ 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"]}
@ -20,7 +15,6 @@ 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"]}
@ -34,7 +28,6 @@ product_price_sku_batch_update_purchaseprice
${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"]}

4
013_paper_list_and_details/customer_get_paper_list_and_detail.robot

@ -3,10 +3,6 @@ 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_get_paper_list
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}

4
014_shinpping_address/customer_enterprise_shipping_address.robot

@ -3,10 +3,6 @@ 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}

7
015_customer_create_order/customer_create_order_credit_payment.robot

@ -3,11 +3,6 @@ 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}
${yytclient} https://api-client-yyt-test.qniao.cn
*** Test Cases ***
get_settlement_interval_premium_rate_qniao
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
@ -22,7 +17,7 @@ get_settlement_interval_premium_rate_qniao
get_settlement_interval_premium_rate_feisuan
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${settlement_interval_premium_rate_type} Set Variable 0 #加价率类型 不传或NULL或0千鸟加价率 1为飞算加价率
${settlement_interval_premium_rate_type} Set Variable 1 #加价率类型 不传或NULL或0千鸟加价率 1为飞算加价率
${param} Set Variable clientEnterpriseId=${printing_packaging_factory_id}&supplierId=${supplier_paper_id}&type=${settlement_interval_premium_rate_type}
${response} Get On Session yytclient /cloud-print-user-center/get/settlement-interval/premium-rate params=${param}
log ${response.json()}

16
016_enquiry_create_order/customer_enquiry_operate_and_supplier_quoted_price_create_order.robot

@ -3,12 +3,6 @@ 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}
@ -103,8 +97,8 @@ supplierfocus_submit_paper_quotation
${paper_quotation_quantity1} Set Variable 5500
${paper_quotation_buyton1} Evaluate ${paper_quotation_gramWeight1}*${paper_quotation_width1}*${paper_quotation_length1}*${paper_quotation_quantity1}/1000000000000
${paper_quotation_buyTon1} Convert To Number ${paper_quotation_buyton1} 4 #precision 如果可选精度为正或零,则返回的数字将四舍五入到小数位数。负精度意味着数字四舍五入到绝对精度幂的最接近10的倍数。如果一个数字同样接近某一精度,它总是从零开始四舍五入。
${paper_quotation_unitfee1} Evaluate ${product_price_sku_new}*${settlement_interval_premium_rate_qniao}
${paper_quotation_flyCalcSalesprice1} Evaluate ${product_price_sku_new}*${settlement_interval_premium_rate_feisuan}
${paper_quotation_unitfee1} Evaluate ${product_price_sku_new}*(1+${settlement_interval_premium_rate_qniao})
${paper_quotation_flyCalcSalesprice1} Evaluate ${product_price_sku_new}*(1+${settlement_interval_premium_rate_feisuan})
${paper_quotation_otherFee} Set Variable 0
${paper_quotation_unitFee1} Convert To Number ${paper_quotation_unitfee1}
${paper_quotation_flyCalcSalesPrice1} Convert To Number ${paper_quotation_flyCalcSalesprice1}
@ -116,14 +110,14 @@ supplierfocus_submit_paper_quotation
${paper_quotation_quantity2} Set Variable 5000
${paper_quotation_buyton2} Evaluate ${paper_quotation_gramWeight2}*${paper_quotation_width2}*${paper_quotation_length2}*${paper_quotation_quantity2}/1000000000000
${paper_quotation_buyTon2} Convert To Number ${paper_quotation_buyton2} 4 #precision 如果可选精度为正或零,则返回的数字将四舍五入到小数位数。负精度意味着数字四舍五入到绝对精度幂的最接近10的倍数。如果一个数字同样接近某一精度,它总是从零开始四舍五入。
${paper_quotation_unitfee2} Evaluate ${product_price_sku_new}*${settlement_interval_premium_rate_qniao}
${paper_quotation_flyCalcSalesprice2} Evaluate ${product_price_sku_new}*${settlement_interval_premium_rate_feisuan}
${paper_quotation_unitfee2} Evaluate ${product_price_sku_new}*(1+${settlement_interval_premium_rate_qniao})
${paper_quotation_flyCalcSalesprice2} Evaluate ${product_price_sku_new}*(1+${settlement_interval_premium_rate_feisuan})
${paper_quotation_unitFee2} Convert To Number ${paper_quotation_unitfee2}
${paper_quotation_flyCalcSalesPrice2} Convert To Number ${paper_quotation_flyCalcSalesprice2}
${paper_quotation_totalOfferPrice2} Evaluate ${paper_quotation_unitFee2}*${paper_quotation_buyTon2}+${paper_quotation_otherFee}
${paper_quotation_totalOfferPrice_item2} Convert To Number ${paper_quotation_totalOfferPrice2} 2
${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":${paper_quotation_gramWeight1},"quantity":${paper_quotation_quantity1},"length":${paper_quotation_length1},"width":${paper_quotation_width1},"weight":${paper_quotation_buyTon1},"unitFee":${paper_quotation_unitFee1},"totalPrice":"${paper_quotation_totalOfferPrice_item1}","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":${product_price_sku_new},"otherFee":${paper_quotation_otherFee},"repEnterprise":"553652487819759617","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":${paper_quotation_flyCalcSalesPrice1}},{"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":${paper_quotation_gramWeight2},"quantity":${paper_quotation_quantity2},"length":${paper_quotation_length2},"width":${paper_quotation_width2},"weight":${paper_quotation_buyTon2},"unitFee":${paper_quotation_unitFee2},"totalPrice":"${paper_quotation_totalOfferPrice_item2}","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":${product_price_sku_new},"otherFee":${paper_quotation_otherFee},"repEnterprise":"${supplier_paper_id}","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":${paper_quotation_flyCalcSalesPrice2}}],"remark":"${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":${paper_quotation_gramWeight1},"quantity":${paper_quotation_quantity1},"length":${paper_quotation_length1},"width":${paper_quotation_width1},"weight":${paper_quotation_buyTon1},"unitFee":${paper_quotation_unitFee1},"totalPrice":"${paper_quotation_totalOfferPrice_item1}","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":${product_price_sku_new},"otherFee":${paper_quotation_otherFee},"repEnterprise":"553652487819759617","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":${paper_quotation_flyCalcSalesPrice1}},{"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":${paper_quotation_gramWeight2},"quantity":${paper_quotation_quantity2},"length":${paper_quotation_length2},"width":${paper_quotation_width2},"weight":${paper_quotation_buyTon2},"unitFee":${paper_quotation_unitFee2},"totalPrice":"${paper_quotation_totalOfferPrice_item2}","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":${product_price_sku_new},"otherFee":${paper_quotation_otherFee},"repEnterprise":"553652487819759617","repEnterpriseName":"千鸟官方直营","salesEnterpriseName":"${printing_packaging_factory_name}","flyCalcSalesPrice":${paper_quotation_flyCalcSalesPrice2}}],"remark":"${supplierfocus_paper_quotation_remark}"}
${response} POST On Session yytclient /trading-center/submit/paper-quotation ${body.encode("utf-8")}
Set Suite Variable ${paper_quotation_gramWeight1}
Set Suite Variable ${paper_quotation_width1}

15
017_order_and_receipt_and_delivery/get_oeder_and_receipt_and_delivery.robot

@ -3,11 +3,6 @@ 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}
${yytclient} https://api-client-yyt-test.qniao.cn
*** Test Cases ***
customer_get_order_list
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
@ -64,7 +59,6 @@ supplierfocus_get_order_order-item-list
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
@ -76,6 +70,7 @@ supplierfocus_create_supplier_order_batch
${customer_enterprise_shipping_address_cityname} Set Variable 广州市
${customer_enterprise_shipping_address_districtname} Set Variable 天河区
${customer_enterprise_shipping_address_streetname} Set Variable 车陂街道
${supplier_order_remark} Set Variable autotest_supplier_order_remark
${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()}
@ -84,14 +79,14 @@ supplierfocus_create_supplier_order_batch
sleep 1
supplier_get_order_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierheader}
Create Session yytclient ${yytclient} headers=${cloudfactory_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=${cloudfactory_supplierheader}
Create Session yytclient ${yytclient} headers=${cloudfactory_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()}
@ -101,7 +96,7 @@ supplier_get_order_list_search
Set Global Variable ${supplier_order_id}
supplier_get_order_detail2
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierheader}
Create Session yytclient ${yytclient} headers=${cloudfactory_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}
@ -111,7 +106,7 @@ supplier_get_order_detail2
Set Global Variable ${supplier_order_totalPrice}
supplier_confirm_order
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierheader}
Create Session yytclient ${yytclient} headers=${cloudfactory_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()}

5
018_payable_and_receivable/customer_bill.robot

@ -3,11 +3,6 @@ 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}

5
018_payable_and_receivable/payable.robot

@ -3,11 +3,6 @@ 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}

5
018_payable_and_receivable/receivable.robot

@ -3,11 +3,6 @@ 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}

4
019_capacity_market/capacity_commodity.robot

@ -3,10 +3,6 @@ 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_get_capacity_commodity_list
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}

4
019_capacity_market/capacity_machines.robot

@ -3,10 +3,6 @@ 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_get_machines_list
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}

11
100_test_data_clear.robot

@ -4,17 +4,6 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{operationbackend_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${gettoken_operate}
&{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}
&{operationpsc_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${gettoken_operate_psc}
${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
Connect To Database Using Custom Params pymysql database='uec', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8'

BIN
datas/000_base.xls

BIN
datas/001_login.xls

BIN
datas/003_open_account_customer.xls

BIN
datas/004_open_account_supplier_paper.xls

BIN
datas/005_credit_qniao_customer.xls

BIN
datas/006_credit_password.xls

BIN
datas/007_paper_variety_management.xls

BIN
datas/008_market_information_link.xls

BIN
datas/009_product_manage.xls

BIN
datas/012_product_price.xls

BIN
datas/014_customer_shipping_address.xls

BIN
datas/015_customer_create_order.xls

BIN
datas/016_customer_enquiry_create_order.xls

BIN
datas/017_create_supplier_order_batch.xls

BIN
datas/018_payable_receivable.xls

Loading…
Cancel
Save