Browse Source

Merge pull request 'test' (#15) from test into master

Reviewed-on: http://git.qniao.cn/automated-test-scripts/yyt-trading-rf-api/pulls/15
master
梁金满 4 years ago
parent
commit
e4a509a5eb
5 changed files with 297 additions and 30 deletions
  1. 24
      002_user_register/customer_user_register.robot
  2. 26
      002_user_register/supplier_user_register.robot
  3. 146
      003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot
  4. 128
      004_enterprise_open_account_supplier/supplier_paper_open_account.robot
  5. 3
      __init__.robot

24
002_user_register/customer_user_register.robot

@ -15,9 +15,9 @@ customer_phone_captcha
Disable Warnings Disable Warnings
Create Session uecclient ${uecclient} headers=${cloud_factory_customer_header} Create Session uecclient ${uecclient} headers=${cloud_factory_customer_header}
${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号 ${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号
${account} Set Variable 13012345678
${body} Set Variable {"accountType":${accounttype},"account":"${account}","captcha":"888888"}
Set Suite Variable ${account}
${customer_account} Set Variable 13012345678
${body} Set Variable {"accountType":${accounttype},"account":"${customer_account}","captcha":"888888"}
Set Global Variable ${customer_account}
${response} POST On Session uecclient /uec/authorize/by-captcha ${body} ${response} POST On Session uecclient /uec/authorize/by-captcha ${body}
Log ${response.status_code} Log ${response.status_code}
Log ${response.text} Log ${response.text}
@ -44,8 +44,8 @@ customerclue_customer
${body} Set Variable {"companyName": "${customer_companyname}","enterpriseType": ${customer_enterprisetype},"job": "${customer_job}","name": "${customer_name}"} ${body} Set Variable {"companyName": "${customer_companyname}","enterpriseType": ${customer_enterprisetype},"job": "${customer_job}","name": "${customer_name}"}
Set Suite Variable ${customer_companyname} Set Suite Variable ${customer_companyname}
Set Suite Variable ${customer_enterprisetype} Set Suite Variable ${customer_enterprisetype}
Set Suite Variable ${customer_job}
Set Suite Variable ${customer_name}
Set Global Variable ${customer_job}
Set Global Variable ${customer_name}
${response} POST On Session yytclient /cloud-print-user-center/save/customerclue ${body.encode("utf8")} ${response} POST On Session yytclient /cloud-print-user-center/save/customerclue ${body.encode("utf8")}
Log ${response.status_code} Log ${response.status_code}
Log ${response.json()} Log ${response.json()}
@ -80,7 +80,7 @@ get_customerclue_customer
Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["enterpriseType"]} Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["enterpriseType"]}
Should Be Equal As Strings ${customer_job} ${response.json()["data"]["job"]} Should Be Equal As Strings ${customer_job} ${response.json()["data"]["job"]}
Should Be Equal As Strings ${customer_name} ${response.json()["data"]["name"]} Should Be Equal As Strings ${customer_name} ${response.json()["data"]["name"]}
Should Be Equal As Strings ${account} ${response.json()["data"]["mobile"]}
Should Be Equal As Strings ${customer_account} ${response.json()["data"]["mobile"]}
customerclue_verify_have_join_customer customerclue_verify_have_join_customer
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header}
@ -120,7 +120,7 @@ operate_get_user_register_search
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${customer_account} ${response.json()["data"]["records"][0]["mobile"]}
operate_get_customerclue_list operate_get_customerclue_list
Create Session yytops ${yytops} headers=${operationbackend_header} Create Session yytops ${yytops} headers=${operationbackend_header}
@ -129,7 +129,7 @@ operate_get_customerclue_list
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${customer_account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${customer_companyname} ${response.json()["data"]["records"][0]["companyName"]} Should Be Equal As Strings ${customer_companyname} ${response.json()["data"]["records"][0]["companyName"]}
Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]}
Should Be Equal As Strings ${customer_job} ${response.json()["data"]["records"][0]["job"]} Should Be Equal As Strings ${customer_job} ${response.json()["data"]["records"][0]["job"]}
@ -144,7 +144,7 @@ operate_get_customerclue_search
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${customer_account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${customer_companyname} ${response.json()["data"]["records"][0]["companyName"]} Should Be Equal As Strings ${customer_companyname} ${response.json()["data"]["records"][0]["companyName"]}
Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} Should Be Equal As Numbers ${customer_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]}
Should Be Equal As Strings ${customer_job} ${response.json()["data"]["records"][0]["job"]} Should Be Equal As Strings ${customer_job} ${response.json()["data"]["records"][0]["job"]}
@ -165,12 +165,12 @@ operate_handle_customerclue
database_delete_user_customerclue database_delete_user_customerclue
Connect To Database Using Custom Params pymysql database='uec', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8' Connect To Database Using Custom Params pymysql database='uec', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8'
Execute Sql String update qn_account set is_delete = 1 where tid = "${account}"
${query} Query select user_id from qn_account where tid = "${account}"
Execute Sql String update qn_account set is_delete = 1 where tid = "${customer_account}"
${query} Query select user_id from qn_account where tid = "${customer_account}"
${query_list} Get From List ${query} 0 ${query_list} Get From List ${query} 0
${userid} Get From List ${query_list} 0 ${userid} Get From List ${query_list} 0
Execute Sql String update qn_user set is_delete = 1 where id = ${userid} Execute Sql String update qn_user set is_delete = 1 where id = ${userid}
sleep 1 sleep 1
Connect To Database Using Custom Params pymysql database='yyt_user_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8' Connect To Database Using Custom Params pymysql database='yyt_user_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8'
Execute Sql String update qn_customer_clue set is_delete = 1 where mobile = "${account}"
Execute Sql String update qn_customer_clue set is_delete = 1 where mobile = "${customer_account}"
Disconnect From Database Disconnect From Database

26
002_user_register/supplier_user_register.robot

@ -15,9 +15,9 @@ supplier_phone_captcha
Disable Warnings Disable Warnings
Create Session uecclient ${uecclient} headers=${cloud_factory_supplier_header} Create Session uecclient ${uecclient} headers=${cloud_factory_supplier_header}
${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号 ${accounttype} Set Variable 2 #账号类型 1微信 2手机号 3邮箱 4苹果 5自定义账号
${account} Set Variable 13123456789
${body} Set Variable {"accountType":${accounttype},"account":"${account}","captcha":"888888"}
Set Suite Variable ${account}
${supplier_account} Set Variable 13123456789
${body} Set Variable {"accountType":${accounttype},"account":"${supplier_account}","captcha":"888888"}
Set Global Variable ${supplier_account}
${response} POST On Session uecclient /uec/authorize/by-captcha ${body} ${response} POST On Session uecclient /uec/authorize/by-captcha ${body}
Log ${response.status_code} Log ${response.status_code}
Log ${response.text} Log ${response.text}
@ -44,8 +44,8 @@ customerclue_supplier
${body} Set Variable {"companyName": "${supplier_companyname}","enterpriseType": ${supplier_enterprisetype},"job": "${supplier_job}","name": "${supplier_name}"} ${body} Set Variable {"companyName": "${supplier_companyname}","enterpriseType": ${supplier_enterprisetype},"job": "${supplier_job}","name": "${supplier_name}"}
Set Suite Variable ${supplier_companyname} Set Suite Variable ${supplier_companyname}
Set Suite Variable ${supplier_enterprisetype} Set Suite Variable ${supplier_enterprisetype}
Set Suite Variable ${supplier_job}
Set Suite Variable ${supplier_name}
Set Global Variable ${supplier_job}
Set Global Variable ${supplier_name}
${response} POST On Session yytclient /cloud-print-user-center/save/customerclue ${body.encode("utf8")} ${response} POST On Session yytclient /cloud-print-user-center/save/customerclue ${body.encode("utf8")}
Log ${response.status_code} Log ${response.status_code}
Log ${response.json()} Log ${response.json()}
@ -80,7 +80,7 @@ get_customerclue_supplier
Should Be Equal As Numbers ${supplier_enterprisetype} ${response.json()["data"]["enterpriseType"]} Should Be Equal As Numbers ${supplier_enterprisetype} ${response.json()["data"]["enterpriseType"]}
Should Be Equal As Strings ${supplier_job} ${response.json()["data"]["job"]} Should Be Equal As Strings ${supplier_job} ${response.json()["data"]["job"]}
Should Be Equal As Strings ${supplier_name} ${response.json()["data"]["name"]} Should Be Equal As Strings ${supplier_name} ${response.json()["data"]["name"]}
Should Be Equal As Strings ${account} ${response.json()["data"]["mobile"]}
Should Be Equal As Strings ${supplier_account} ${response.json()["data"]["mobile"]}
customerclue_verify_have_join_supplier customerclue_verify_have_join_supplier
Create Session yytclient ${yytclient} headers=${cloudfactory_supplier_header} Create Session yytclient ${yytclient} headers=${cloudfactory_supplier_header}
@ -110,7 +110,7 @@ operate_get_user_register_list
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${supplier_account} ${response.json()["data"]["records"][0]["mobile"]}
operate_get_user_register_search operate_get_user_register_search
Create Session yytops ${yytops} headers=${operationbackend_header} Create Session yytops ${yytops} headers=${operationbackend_header}
@ -120,7 +120,7 @@ operate_get_user_register_search
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${supplier_account} ${response.json()["data"]["records"][0]["mobile"]}
operate_get_customerclue_list operate_get_customerclue_list
Create Session yytops ${yytops} headers=${operationbackend_header} Create Session yytops ${yytops} headers=${operationbackend_header}
@ -129,7 +129,7 @@ operate_get_customerclue_list
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${supplier_account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${supplier_companyname} ${response.json()["data"]["records"][0]["companyName"]} Should Be Equal As Strings ${supplier_companyname} ${response.json()["data"]["records"][0]["companyName"]}
Should Be Equal As Numbers ${supplier_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} Should Be Equal As Numbers ${supplier_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]}
Should Be Equal As Strings ${supplier_job} ${response.json()["data"]["records"][0]["job"]} Should Be Equal As Strings ${supplier_job} ${response.json()["data"]["records"][0]["job"]}
@ -144,7 +144,7 @@ operate_get_customerclue_search
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${supplier_account} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${supplier_companyname} ${response.json()["data"]["records"][0]["companyName"]} Should Be Equal As Strings ${supplier_companyname} ${response.json()["data"]["records"][0]["companyName"]}
Should Be Equal As Numbers ${supplier_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]} Should Be Equal As Numbers ${supplier_enterprisetype} ${response.json()["data"]["records"][0]["enterpriseType"]}
Should Be Equal As Strings ${supplier_job} ${response.json()["data"]["records"][0]["job"]} Should Be Equal As Strings ${supplier_job} ${response.json()["data"]["records"][0]["job"]}
@ -165,12 +165,12 @@ operate_handle_customerclue
database_delete_user_customerclue database_delete_user_customerclue
Connect To Database Using Custom Params pymysql database='uec', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8' Connect To Database Using Custom Params pymysql database='uec', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8'
Execute Sql String update qn_account set is_delete = 1 where tid = "${account}"
${query} Query select user_id from qn_account where tid = "${account}"
Execute Sql String update qn_account set is_delete = 1 where tid = "${supplier_account}"
${query} Query select user_id from qn_account where tid = "${supplier_account}"
${query_list} Get From List ${query} 0 ${query_list} Get From List ${query} 0
${userid} Get From List ${query_list} 0 ${userid} Get From List ${query_list} 0
Execute Sql String update qn_user set is_delete = 1 where id = ${userid} Execute Sql String update qn_user set is_delete = 1 where id = ${userid}
sleep 1 sleep 1
Connect To Database Using Custom Params pymysql database='yyt_user_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8' Connect To Database Using Custom Params pymysql database='yyt_user_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8'
Execute Sql String update qn_customer_clue set is_delete = 1 where mobile = "${account}"
Execute Sql String update qn_customer_clue set is_delete = 1 where mobile = "${supplier_account}"
Disconnect From Database Disconnect From Database

146
003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot

@ -73,6 +73,149 @@ operate_get_printing_packaging_factory_modify_state
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
operate_save_printing_packaging_factory_baseinfo_industrialandcommercial_registration_information
Disable Warnings
Create Session uecops ${uecops} headers=${operationbackend_header}
${printing_packaging_factory_name} Set Variable autotest_printing_packaging_factory_name
${printing_packaging_factory_type} Set Variable 2 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他
${printing_packaging_factory_shortname} Set Variable autotest_shortname
${printing_packaging_factory_uniformsocialcreditcode} Set Variable autotest_91440101MA59F2J10M
${printing_packaging_factory_locdetail} Set Variable autotest_printing_packaging_factory_locdetail
${printing_packaging_factory_legalpersonname} Set Variable autotest_legalperson
${printing_packaging_factory_legalpersonidcardno} Set Variable autotest_legalpersonidcardno
${printing_packaging_factory_locprovinceid} Set Variable 440000
${printing_packaging_factory_loccityid} Set Variable 440100
${printing_packaging_factory_locdistrictid} Set Variable 440106
${printing_packaging_factory_locstreetid} Set Variable 440106003
${printing_packaging_factory_locprovincename} Set Variable 广东省
${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_businessLicense} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${printing_packaging_factory_legalPersonIdCardBack} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${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"]}
sleep 1
operate_save_printing_packaging_factory_baseinfo_factory_related_information
Disable Warnings
Create Session yytops ${yytops} headers=${operationbackend_header}
${printing_packaging_factory_locdetail} Set Variable autotest_printing_packaging_factory_locdetail
${printing_packaging_factory_locprovinceid} Set Variable 440000
${printing_packaging_factory_loccityid} Set Variable 440100
${printing_packaging_factory_locdistrictid} Set Variable 440106
${printing_packaging_factory_locstreetid} Set Variable 440106003
${printing_packaging_factory_locprovincename} Set Variable 广东省
${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"]}
sleep 1
operate_save_printing_packaging_factory_baseinfo_enterprise_shipping_addresses
Disable Warnings
Create Session uecops ${uecops} headers=${operationbackend_header}
${printing_packaging_factory_detail} Set Variable autotest_printing_packaging_factory_locdetail
${printing_packaging_factory_provinceid} Set Variable 440000
${printing_packaging_factory_cityid} Set Variable 440100
${printing_packaging_factory_districtid} Set Variable 440106
${printing_packaging_factory_streetid} Set Variable 440106003
${printing_packaging_factory_provincename} Set Variable 广东省
${printing_packaging_factory_cityname} Set Variable 广州市
${printing_packaging_factory_districtname} Set Variable 天河区
${printing_packaging_factory_streetname} Set Variable 车陂街道
${printing_packaging_factory_receiver} Set Variable autotest_receiver
${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"]}
sleep 1
operate_save_printing_packaging_factory_settlementaccountinfo_enterprise_scrappaper_credit
Disable Warnings
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"]}
sleep 1
operate_save_printing_packaging_factory_settlementaccountinfo_enterprise_private_account
Disable Warnings
Create Session uecops ${uecops} headers=${operationbackend_header}
${printing_packaging_factory_cardholdername} Set Variable autotest_name
${printing_packaging_factory_bankcardnumber} Set Variable autotest_bankcardnumber
${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"]}
sleep 1
operate_save_printing_packaging_factory_settlementaccountinfo_enterprise_papereexternal_settlement_accounts
Disable Warnings
Create Session yytops ${yytops} headers=${operationbackend_header}
${printing_packaging_factory_type} Set Variable 1 #类型 1千纸鹤 2新希望
${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"]}
sleep 1
operate_save_printing_packaging_factory_employee_list_add_enterprise_administrator
Disable Warnings
Create Session yytops ${yytops} headers=${operationbackend_header}
${printing_packaging_factory_realname} Set Variable autotest_name_customer
${printing_packaging_factory_title} Set Variable autotest_job_customer
${printing_packaging_factory_mobile} Set Variable 13012345678
${body} Set Variable {"enterpriseId":"${printing_packaging_factory_id}","realName":"${printing_packaging_factory_realname}","title":"${printing_packaging_factory_title}","mobile":"${printing_packaging_factory_mobile}"}
${response} POST On Session yytops /cloud-print-user-center/admin/add/enterprise-administrator ${body.encode("utf8")}
Set Suite Variable ${printing_packaging_factory_mobile}
Set Suite Variable ${printing_packaging_factory_realname}
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_save_printing_packaging_factory_employee_list_add_employee
Disable Warnings
Create Session uecops ${uecops} headers=${operationbackend_header}
${printing_packaging_factory_position} Set Variable ADMINISTRATOR #角色 ADMINISTRATOR管理员 PRIMARY企业主 ORDINARY普通员工
${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"]}
sleep 1
operate_get_printing_packaging_factory_baseinfo operate_get_printing_packaging_factory_baseinfo
Create Session yytops ${yytops} headers=${operationbackend_header} 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} ${response} Get On Session yytops /cloud-print-user-center/admin/get/packaging-printing-mill/base-info/${printing_packaging_factory_id}
@ -100,10 +243,13 @@ operate_get_printing_packaging_factory_employee_list
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${printing_packaging_factory_mobile} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${printing_packaging_factory_realname} ${response.json()["data"]["records"][0]["realName"]}
database_delete_printing_packaging_factory database_delete_printing_packaging_factory
Connect To Database Using Custom Params pymysql database='uec', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8' Connect To Database Using Custom Params pymysql database='uec', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8'
Execute Sql String update qn_enterprise set is_delete = 1 where id = ${printing_packaging_factory_id} Execute Sql String update qn_enterprise set is_delete = 1 where id = ${printing_packaging_factory_id}
Execute Sql String update qn_enterprise_member set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id}
sleep 1 sleep 1
Connect To Database Using Custom Params pymysql database='yyt_user_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8' Connect To Database Using Custom Params pymysql database='yyt_user_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8'
Execute Sql String update qn_enterprise set is_delete = 1 where id = ${printing_packaging_factory_id} Execute Sql String update qn_enterprise set is_delete = 1 where id = ${printing_packaging_factory_id}

128
004_enterprise_open_account_supplier/supplier_paper_open_account.robot

@ -33,8 +33,52 @@ operate_save_virtual_supplier
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${virtual_supplier_name} ${response.json()["data"]["name"]} Should Be Equal As Strings ${virtual_supplier_name} ${response.json()["data"]["name"]}
${virtual_supplier_id} Get From Dictionary ${response.json()["data"]} id
Set Suite Variable ${virtual_supplier_id}
${supplier_paper_id} Get From Dictionary ${response.json()["data"]} id
Set Suite Variable ${supplier_paper_id}
sleep 1
operate_update_virtual_supplier_status
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${body} Set Variable {"id":"${supplier_paper_id}","status":0} #虚拟供应商状态 0禁用 1启用
${response} POST On Session yytclient /cloud-print-user-center/supplier/directsalestore/virtual-supplier/updatestatus ${body.encode("utf8")}
Log ${response.status_code}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
operate_create_enterprise_with_supplier_paper
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${supplier_paper_name} Set Variable autotest_supplier_paper_name
${supplier_paper_type} Set Variable 2 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他
${supplier_paper_uniformSocialCreditCode} Set Variable autotest91440101MA59F2J10M
${supplier_paper_legalPersonName} Set Variable autotest_legalperson
${supplier_paper_legalPersonIdCardNo} Set Variable autotest_legalpersonidcardno
${supplier_paper_paperSettlementIntervalTypeId} Set Variable 1 #结算周期 1现结 2月结20天 3月结45天 4月结60天 5月结75天 6月结90天
${supplier_paper_locProvinceId} Set Variable 440000
${supplier_paper_locCityId} Set Variable 440100
${supplier_paper_locDistrictId} Set Variable 440106
${supplier_paper_locStreetId} Set Variable 440106003
${supplier_paper_locDetail} Set Variable autotest_supplier_paper_details
${supplier_paper_legalPersonIdCardFrontImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${supplier_paper_legalPersonIdCardBackImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${supplier_paper_businessLicenseImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${supplier_paper_contactsname} Set Variable autotest_contactsname
${supplier_paper_mobilePhone} Set Variable autotest_mobilePhone
${supplier_paper_telephone} Set Variable autotest_telephone
${supplier_paper_email} Set Variable autotest_email
${supplier_paper_wechatAccount} Set Variable autotest_wechatAccount
${supplier_paper_remark} Set Variable autotest_remark
${supplier_paper_bankAccountName} Set Variable autotest_bankAccountName
${supplier_paper_bankAccount} Set Variable autotest_bankAccount
${supplier_paper_bankName} Set Variable autotest_bankName
${supplier_paper_accountOpeningBranch} Set Variable autotest_accountOpeningBranch
${supplier_paper_locationBank} Set Variable autotest_locationBank
${body} Set Variable {"supplierId":"${supplier_paper_id}","enterprise":{"name":"${supplier_paper_name}","locDetail":"${supplier_paper_locDetail}","type":${supplier_paper_type},"uniformSocialCreditCode":"${supplier_paper_uniformSocialCreditCode}","legalPersonIdCardNo":"${supplier_paper_legalPersonIdCardNo}","legalPersonName":"${supplier_paper_legalPersonName}","paperSettlementIntervalTypeId":"${supplier_paper_paperSettlementIntervalTypeId}","locProvinceId":${supplier_paper_locProvinceId},"locCityId":${supplier_paper_locCityId},"locDistrictId":${supplier_paper_locDistrictId},"locStreetId":${supplier_paper_locStreetId},"legalPersonIdCardFrontImg":"${supplier_paper_legalPersonIdCardFrontImg}","legalPersonIdCardBackImg":"${supplier_paper_legalPersonIdCardBackImg}","businessLicenseImg":"${supplier_paper_businessLicenseImg}"},"enterpriseContacts":{"name":"${supplier_paper_contactsname}","mobilePhone":"${supplier_paper_mobilePhone}","telephone":"${supplier_paper_telephone}","email":"${supplier_paper_email}","wechatAccount":"${supplier_paper_wechatAccount}","remark":"${supplier_paper_remark}"},"enterpriseCorporateAccount":{"bankAccountName":"${supplier_paper_bankAccountName}","bankAccount":"${supplier_paper_bankAccount}","bankName":"${supplier_paper_bankName}","accountOpeningBranch":"${supplier_paper_accountOpeningBranch}","locationBank":"${supplier_paper_locationBank}"}}
${response} POST On Session yytclient /cloud-print-user-center/create/enterprise/with/supplier ${body.encode("utf8")}
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 sleep 1
operate_get_virtual_supplier_list operate_get_virtual_supplier_list
@ -53,12 +97,86 @@ operate_get_virtual_supplier_search
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
${supplier_enterprise_id} Get From Dictionary ${response.json()["data"]["records"][0]} enterpriseId
Set Suite Variable ${supplier_enterprise_id}
operate_update_virtual_supplier_status
operate_get_supplier_paper_detail
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${body} Set Variable {"id":"${virtual_supplier_id}","status":0} #虚拟供应商状态 0禁用 1启用
${response} POST On Session yytclient /cloud-print-user-center/supplier/directsalestore/virtual-supplier/updatestatus ${body.encode("utf8")}
${response} Get On Session yytclient /cloud-print-user-center/get/enterprise/detail/${supplier_enterprise_id}
Log ${response.status_code}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${supplier_enterprise_id} ${response.json()["data"]["enterprise"]["id"]}
operate_save_supplier_paper_detail
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${supplier_paper_name} Set Variable autotest_supplier_paper_name
${supplier_paper_type} Set Variable 2 #企业类型 1云印客户 2印刷包装厂 3造纸厂 4打包厂 5原纸供应商 6设备供应商 7其他
${supplier_paper_uniformSocialCreditCode} Set Variable autotest91440101MA59F2J10M
${supplier_paper_legalPersonName} Set Variable autotest_legalperson
${supplier_paper_legalPersonIdCardNo} Set Variable autotest_legalpersonidcardno
${supplier_paper_paperSettlementIntervalTypeId} Set Variable 1 #结算周期 1现结 2月结20天 3月结45天 4月结60天 5月结75天 6月结90天
${supplier_paper_locProvinceId} Set Variable 440000
${supplier_paper_locCityId} Set Variable 440100
${supplier_paper_locDistrictId} Set Variable 440106
${supplier_paper_locStreetId} Set Variable 440106003
${supplier_paper_locDetail} Set Variable autotest_supplier_paper_details
${supplier_paper_legalPersonIdCardFrontImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${supplier_paper_legalPersonIdCardBackImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${supplier_paper_businessLicenseImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
${supplier_paper_contactsname} Set Variable autotest_contactsname
${supplier_paper_mobilePhone} Set Variable autotest_mobilePhone
${supplier_paper_telephone} Set Variable autotest_telephone
${supplier_paper_email} Set Variable autotest_email
${supplier_paper_wechatAccount} Set Variable autotest_wechatAccount
${supplier_paper_remark} Set Variable autotest_remark
${supplier_paper_bankAccountName} Set Variable autotest_bankAccountName
${supplier_paper_bankAccount} Set Variable autotest_bankAccount
${supplier_paper_bankName} Set Variable autotest_bankName
${supplier_paper_accountOpeningBranch} Set Variable autotest_accountOpeningBranch
${supplier_paper_locationBank} Set Variable autotest_locationBank
${body} Set Variable {"supplierId":"${supplier_paper_id}","enterprise":{"id": "${supplier_enterprise_id}","name":"${supplier_paper_name}","locDetail":"${supplier_paper_locDetail}","type":${supplier_paper_type},"uniformSocialCreditCode":"${supplier_paper_uniformSocialCreditCode}","legalPersonIdCardNo":"${supplier_paper_legalPersonIdCardNo}","legalPersonName":"${supplier_paper_legalPersonName}","paperSettlementIntervalTypeId":"${supplier_paper_paperSettlementIntervalTypeId}","locProvinceId":${supplier_paper_locProvinceId},"locCityId":${supplier_paper_locCityId},"locDistrictId":${supplier_paper_locDistrictId},"locStreetId":${supplier_paper_locStreetId},"legalPersonIdCardFrontImg":"${supplier_paper_legalPersonIdCardFrontImg}","legalPersonIdCardBackImg":"${supplier_paper_legalPersonIdCardBackImg}","businessLicenseImg":"${supplier_paper_businessLicenseImg}"},"enterpriseContacts":{"name":"${supplier_paper_contactsname}","mobilePhone":"${supplier_paper_mobilePhone}","telephone":"${supplier_paper_telephone}","email":"${supplier_paper_email}","wechatAccount":"${supplier_paper_wechatAccount}","remark":"${supplier_paper_remark}"},"enterpriseCorporateAccount":{"bankAccountName":"${supplier_paper_bankAccountName}","bankAccount":"${supplier_paper_bankAccount}","bankName":"${supplier_paper_bankName}","accountOpeningBranch":"${supplier_paper_accountOpeningBranch}","locationBank":"${supplier_paper_locationBank}"}}
${response} POST On Session yytclient /cloud-print-user-center/save/enterprise/detail ${body.encode("utf8")}
Log ${response.status_code}
log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]}
sleep 1
operate_supplier_paper_add_enterprise_administrator
Disable Warnings
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${supplier_paper_realname} Set Variable autotest_name_supplier
${supplier_paper_mobile} Set Variable 13123456789
${body} Set Variable {"supplierEnterpriseId":"${supplier_enterprise_id}","realName":"${supplier_paper_realname}","mobile":"${supplier_paper_mobile}"}
${response} POST On Session yytclient /cloud-print-user-center/add/enterprise-administrator ${body.encode("utf8")}
Set Suite Variable ${supplier_paper_mobile}
Set Suite Variable ${supplier_paper_realname}
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_employee_list
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header}
${param} Set Variable supplierEnterpriseId=${supplier_enterprise_id}
${response} Get On Session yytclient /cloud-print-user-center/get/employee-list params=${param}
Log ${response.status_code} Log ${response.status_code}
log ${response.json()} log ${response.json()}
Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Numbers 200 ${response.status_code}
Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings successful ${response.json()["message"]}
Should Be Equal As Strings ${supplier_paper_mobile} ${response.json()["data"]["records"][0]["mobile"]}
Should Be Equal As Strings ${supplier_paper_realname} ${response.json()["data"]["records"][0]["realName"]}
database_delete_supplier_paper
Connect To Database Using Custom Params pymysql database='uec', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8'
Execute Sql String update qn_enterprise set is_delete = 1 where id = ${supplier_enterprise_id}
Execute Sql String update qn_enterprise_member set is_delete = 1 where enterprise_id = ${supplier_enterprise_id}
sleep 1
Connect To Database Using Custom Params pymysql database='yyt_user_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8'
Execute Sql String update qn_enterprise set is_delete = 1 where id = ${supplier_enterprise_id}
Execute Sql String update qn_enterprise_profile set is_delete = 1 where enterprise_id = ${supplier_enterprise_id}
Execute Sql String update qn_mall_supplier set is_delete = 1 where enterprise_id = ${supplier_enterprise_id}
Disconnect From Database

3
__init__.robot

@ -3,3 +3,6 @@ Library DatabaseLibrary
Library RequestsLibrary Library RequestsLibrary
Library Collections Library Collections
Library urllib3 Library urllib3
*** Variables ***
${img} https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg
Loading…
Cancel
Save