From 2cce01fd083fa79ed790f95e2499036d456bc13c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=87=91=E6=BB=A1?= Date: Mon, 11 Oct 2021 17:16:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E6=8E=88=E4=BF=A1=EF=BC=8C=E6=9F=A5=E8=AF=A2=E6=8E=88=E4=BF=A1?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E3=80=81=E6=B5=81=E6=B0=B4=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nting_packaging_factory_open_account.robot | 7 +- .../apply_credit_qniao_customer.robot | 97 ++++++++++++++++++- 2 files changed, 99 insertions(+), 5 deletions(-) diff --git a/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot b/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot index 9d2f5e7..98e2b1f 100644 --- a/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot +++ b/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot @@ -29,9 +29,10 @@ operate_open_account_printing_packaging_factory ${printing_packaging_factory_locdistrictname} Set Variable 天河区 ${printing_packaging_factory_locstreetname} Set Variable 车陂街道 ${body} Set Variable {"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}"} - Set Suite Variable ${printing_packaging_factory_name} + Set Global Variable ${printing_packaging_factory_name} Set Suite Variable ${printing_packaging_factory_shortname} - Set Suite Variable ${printing_packaging_factory_legalpersonname} + 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()} @@ -62,7 +63,7 @@ operate_get_printing_packaging_factory_search Should Be Equal As Strings ${printing_packaging_factory_shortname} ${response.json()["data"]["records"][0]["shortName"]} Should Be Equal As Strings ${printing_packaging_factory_legalpersonname} ${response.json()["data"]["records"][0]["legalPersonName"]} ${printing_packaging_factory_id} Get From Dictionary ${response.json()["data"]["records"][0]} id - Set Suite Variable ${printing_packaging_factory_id} + Set Global Variable ${printing_packaging_factory_id} operate_get_printing_packaging_factory_modify_state Create Session uecops ${uecops} headers=${operationbackend_header} diff --git a/005_enterprise_apply_credit/apply_credit_qniao_customer.robot b/005_enterprise_apply_credit/apply_credit_qniao_customer.robot index a8166de..a73d728 100644 --- a/005_enterprise_apply_credit/apply_credit_qniao_customer.robot +++ b/005_enterprise_apply_credit/apply_credit_qniao_customer.robot @@ -9,6 +9,22 @@ ${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} + ${printing_packaging_factory_type} Set Variable 2 + ${printing_packaging_factory_purpose} Set Variable 1 #授信类型 1采购原纸 + ${printing_packaging_factory_creditLine} Set Variable 990000 + ${printing_packaging_factory_paperSettlementIntervalTypeId} Set Variable 11 #结算周期 11月结30天 12月结45天 13月结60天 14月结75天 15月结90天 + ${printing_packaging_factory_remark} Set Variable autotest_remark + ${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")} + 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_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 @@ -17,11 +33,88 @@ operate_get_credit_list Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} -operate_get_credit_search +operate_get_credit_list_search Create Session yytops ${yytops} headers=${operationpsc_header} - ${param} Set Variable timeBegin=2021-09-29 00:00:00&timeEnd=2021-09-29 23:59:59&enterpriseType=2&status=1&enterpriseName=测试&legalpersonName=测试 + ${param} Set Variable timeBegin=${current_date} 00:00:00&timeEnd=${current_date} 23:59:59&enterpriseType=${printing_packaging_factory_type}&status=1&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"]} + ${printing_packaging_factory_credit_id} Get From Dictionary ${response.json()["data"]["records"][0]} id + Set Suite Variable ${printing_packaging_factory_credit_id} + +operate_verify_reject_apply_credit_qniao + Disable Warnings + Create Session yytops ${yytops} headers=${operationbackend_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"]} + sleep 1 + +operate_update_apply_credit_qniao + Disable Warnings + Create Session yytops ${yytops} headers=${operationbackend_header} + ${printing_packaging_factory_type} Set Variable 2 + ${printing_packaging_factory_purpose} Set Variable 1 #授信类型 1采购原纸 + ${printing_packaging_factory_creditLine} Set Variable 990000 + ${printing_packaging_factory_paperSettlementIntervalTypeId} Set Variable 11 #结算周期 11月结30天 12月结45天 13月结60天 14月结75天 15月结90天 + ${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/save/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"]} + sleep 1 + +operate_verify_pass_apply_credit_qniao + Disable Warnings + Create Session yytops ${yytops} headers=${operationbackend_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"]} + sleep 1 + +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"]} + +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"]} + Should Be Equal As Strings ${printing_packaging_factory_name} ${response.json()["data"]["records"][0]["enterpriseName"]} + ${printing_packaging_factory_credit_details_id} Get From Dictionary ${response.json()["data"]["records"][0]} id + Set Suite Variable ${printing_packaging_factory_credit_details_id} + +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"]} + Should Be Equal As Strings ${printing_packaging_factory_creditLine} ${response.json()["data"]["records"][0]["currentCreditLine"]} + +database_delete_printing_packaging_factory_credit + 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_credit_application set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} + Execute Sql String update qn_enterprise_credit_order set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} + Disconnect From Database From b8589b6d953068e2c4339cf91b53c6b0e583fca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=87=91=E6=BB=A1?= Date: Tue, 12 Oct 2021 11:27:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=95=B0=E6=8D=AE=E7=9A=84=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customer_user_register.robot | 12 --- .../supplier_user_register.robot | 12 --- ...nting_packaging_factory_open_account.robot | 10 --- .../supplier_paper_open_account.robot | 11 --- .../apply_credit_qniao_customer.robot | 13 +-- .../paper_brand.robot | 21 ++--- .../paper_category.robot | 6 -- .../paper_manufacturer.robot | 9 --- test_data_clear.robot | 81 +++++++++++++++++++ 9 files changed, 91 insertions(+), 84 deletions(-) create mode 100644 test_data_clear.robot diff --git a/002_user_register/customer_user_register.robot b/002_user_register/customer_user_register.robot index e126fbb..3e78c03 100644 --- a/002_user_register/customer_user_register.robot +++ b/002_user_register/customer_user_register.robot @@ -162,15 +162,3 @@ operate_handle_customerclue log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} - -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' - 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 - ${userid} Get From List ${query_list} 0 - Execute Sql String update qn_user set is_delete = 1 where id = ${userid} - 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_customer_clue set is_delete = 1 where mobile = "${customer_account}" - Disconnect From Database diff --git a/002_user_register/supplier_user_register.robot b/002_user_register/supplier_user_register.robot index 13e2aa3..ddd9538 100644 --- a/002_user_register/supplier_user_register.robot +++ b/002_user_register/supplier_user_register.robot @@ -162,15 +162,3 @@ operate_handle_customerclue log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} - -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' - 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 - ${userid} Get From List ${query_list} 0 - Execute Sql String update qn_user set is_delete = 1 where id = ${userid} - 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_customer_clue set is_delete = 1 where mobile = "${supplier_account}" - Disconnect From Database diff --git a/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot b/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot index 98e2b1f..86a20eb 100644 --- a/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot +++ b/003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot @@ -246,13 +246,3 @@ operate_get_printing_packaging_factory_employee_list 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 - 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_member set is_delete = 1 where enterprise_id = ${printing_packaging_factory_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 = ${printing_packaging_factory_id} - Execute Sql String update qn_enterprise_profile set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} - Disconnect From Database diff --git a/004_enterprise_open_account_supplier/supplier_paper_open_account.robot b/004_enterprise_open_account_supplier/supplier_paper_open_account.robot index 0eb391f..adbe50e 100644 --- a/004_enterprise_open_account_supplier/supplier_paper_open_account.robot +++ b/004_enterprise_open_account_supplier/supplier_paper_open_account.robot @@ -169,14 +169,3 @@ operate_get_supplier_paper_employee_list 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 diff --git a/005_enterprise_apply_credit/apply_credit_qniao_customer.robot b/005_enterprise_apply_credit/apply_credit_qniao_customer.robot index a73d728..0c2de2c 100644 --- a/005_enterprise_apply_credit/apply_credit_qniao_customer.robot +++ b/005_enterprise_apply_credit/apply_credit_qniao_customer.robot @@ -19,6 +19,7 @@ operate_save_apply_credit_qniao ${printing_packaging_factory_remark} Set Variable autotest_remark ${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} @@ -35,7 +36,7 @@ operate_get_credit_list 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&enterpriseType=${printing_packaging_factory_type}&status=1&enterpriseName=${printing_packaging_factory_name}&legalpersonName=${printing_packaging_factory_legalpersonname} + ${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()} @@ -65,7 +66,7 @@ operate_update_apply_credit_qniao ${printing_packaging_factory_paperSettlementIntervalTypeId} Set Variable 11 #结算周期 11月结30天 12月结45天 13月结60天 14月结75天 15月结90天 ${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/save/application ${body.encode("utf8")} + ${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} @@ -111,10 +112,4 @@ operate_get_credit_list_details_list log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} - Should Be Equal As Strings ${printing_packaging_factory_creditLine} ${response.json()["data"]["records"][0]["currentCreditLine"]} - -database_delete_printing_packaging_factory_credit - 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_credit_application set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} - Execute Sql String update qn_enterprise_credit_order set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} - Disconnect From Database + Should Be Equal As Numbers ${printing_packaging_factory_creditLine} ${response.json()["data"]["records"][0]["currentCreditLine"]} diff --git a/007_paper_variety_management/paper_brand.robot b/007_paper_variety_management/paper_brand.robot index 8dbff63..a086f8f 100644 --- a/007_paper_variety_management/paper_brand.robot +++ b/007_paper_variety_management/paper_brand.robot @@ -10,15 +10,15 @@ ${yytclient} https://api-client-yyt-test.qniao.cn *** Test Cases *** supplierfocus_save_paper_brand Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} - ${paper_categoryd} Set Variable 638458876659896320 + ${paper_categoryid} Set Variable 638458876659896320 ${paper_Manufacturerid} Set Variable 638458967357526016 ${paper_brand_name} Set Variable aotutest_paper_brand_name ${paper_name} Set Variable aotutest_paper_name ${paper_characteristic} Set Variable This autotest_paper_characteristic ${paper_description} Set Variable This apaper_description ${paper_brand_img} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg - ${body} Set Variable {"categoryId":"${paper_categoryd}","paperManufacturerId":"${paper_Manufacturerid}","name":"${paper_brand_name}","paperName":"${paper_name}","characteristic":"${paper_characteristic}","description":"${paper_description}","img":"${paper_brand_img}"} - Set Suite Variable ${paper_categoryd} + ${body} Set Variable {"categoryId":"${paper_categoryid}","paperManufacturerId":"${paper_Manufacturerid}","name":"${paper_brand_name}","paperName":"${paper_name}","characteristic":"${paper_characteristic}","description":"${paper_description}","img":"${paper_brand_img}"} + Set Suite Variable ${paper_categoryid} Set Suite Variable ${paper_Manufacturerid} Set Suite Variable ${paper_brand_name} Set Suite Variable ${paper_name} @@ -39,7 +39,7 @@ supplierfocus_get_paper_brand_list log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} - Should Be Equal As Strings ${paper_categoryd} ${response.json()["data"]["records"][0]["categoryId"]} + Should Be Equal As Strings ${paper_categoryid} ${response.json()["data"]["records"][0]["categoryId"]} Should Be Equal As Strings ${paper_Manufacturerid} ${response.json()["data"]["records"][0]["paperManufacturerId"]} Should Be Equal As Strings ${paper_brand_name} ${response.json()["data"]["records"][0]["name"]} Should Be Equal As Strings ${paper_name} ${response.json()["data"]["records"][0]["paperName"]} @@ -55,7 +55,7 @@ supplierfocus_search_paper_brand 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 ${paper_categoryd} ${response.json()["data"]["records"][0]["categoryId"]} + Should Be Equal As Strings ${paper_categoryid} ${response.json()["data"]["records"][0]["categoryId"]} Should Be Equal As Strings ${paper_Manufacturerid} ${response.json()["data"]["records"][0]["paperManufacturerId"]} Should Be Equal As Strings ${paper_brand_name} ${response.json()["data"]["records"][0]["name"]} Should Be Equal As Strings ${paper_name} ${response.json()["data"]["records"][0]["paperName"]} @@ -63,7 +63,7 @@ supplierfocus_search_paper_brand supplierfocus_edit_paper_brand Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} - ${body} Set Variable {"id":"${paper_brand_id}","categoryId":"${paper_categoryd}","paperManufacturerId":"${paper_Manufacturerid}","name":"${paper_brand_name}","paperName":"${paper_name}","characteristic":"${paper_characteristic}","description":"${paper_description}","img":"${paper_brand_img}"} + ${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()} @@ -78,12 +78,3 @@ supplierfocus_update_status_paper_brand log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} - -supplierfocus_delete_paper_brand - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} - ${body} Set Variable {"idList":["${paper_brand_id}"]} - ${response} POST On Session yytclient /trading-center/delete/category-brands/by/ids ${body.encode("utf8")} - Log ${response.status_code} - log ${response.json()} - Should Be Equal As Numbers 200 ${response.status_code} - Should Be Equal As Strings successful ${response.json()["message"]} diff --git a/007_paper_variety_management/paper_category.robot b/007_paper_variety_management/paper_category.robot index 133b227..46b7203 100644 --- a/007_paper_variety_management/paper_category.robot +++ b/007_paper_variety_management/paper_category.robot @@ -50,9 +50,3 @@ supplierfocus_disable_paper_category log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} - -database_delete_paper_category - Connect To Database Using Custom Params pymysql database='trading_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8' - Execute Sql String update qn_category set is_delete = 1 where id = ${paper_category_id} and name = "${paper_category_name}" - Query select is_delete from qn_category where id = ${paper_category_id} and name = "${paper_category_name}" - Disconnect From Database diff --git a/007_paper_variety_management/paper_manufacturer.robot b/007_paper_variety_management/paper_manufacturer.robot index 61eb5ff..73e307c 100644 --- a/007_paper_variety_management/paper_manufacturer.robot +++ b/007_paper_variety_management/paper_manufacturer.robot @@ -56,12 +56,3 @@ supplierfocus_edit_paper_manufacturer log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} - -supplierfocus_delete_paper_manufacturer - Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} - ${body} Set Variable {"idList":["${paper_manufacturer_id}"]} - ${response} POST On Session yytclient /trading-center/delete/paper-manfucturers/by/ids ${body.encode("utf8")} - Log ${response.status_code} - log ${response.json()} - Should Be Equal As Numbers 200 ${response.status_code} - Should Be Equal As Strings successful ${response.json()["message"]} diff --git a/test_data_clear.robot b/test_data_clear.robot new file mode 100644 index 0000000..be54579 --- /dev/null +++ b/test_data_clear.robot @@ -0,0 +1,81 @@ +*** Settings *** +Library DatabaseLibrary +Library RequestsLibrary +Library Collections +Library urllib3 + +*** 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' + 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 + ${userid} Get From List ${query_list} 0 + Execute Sql String update qn_user set is_delete = 1 where id = ${userid} + 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_customer_clue set is_delete = 1 where mobile = "${customer_account}" + Disconnect From Database + +database_delete_user_customerclue_supplier + 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 = "${supplier_account}" + ${query} Query select user_id from qn_account where tid = "${supplier_account}" + ${query_list} Get From List ${query} 0 + ${userid} Get From List ${query_list} 0 + Execute Sql String update qn_user set is_delete = 1 where id = ${userid} + 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_customer_clue set is_delete = 1 where mobile = "${supplier_account}" + Disconnect From Database + +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' + 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 + 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_profile set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} + Disconnect From Database + +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 + +database_delete_printing_packaging_factory_credit + 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_credit_application set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} + Execute Sql String update qn_enterprise_credit_order set is_delete = 1 where enterprise_id = ${printing_packaging_factory_id} + Disconnect From Database + +database_delete_paper_category + Connect To Database Using Custom Params pymysql database='trading_center', user='root', password='password', host='8.135.8.221', port=3306, charset='utf8' + Execute Sql String update qn_category set is_delete = 1 where id = ${paper_category_id} and name = "${paper_category_name}" + Query select is_delete from qn_category where id = ${paper_category_id} and name = "${paper_category_name}" + Disconnect From Database + +supplierfocus_delete_paper_manufacturer + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${body} Set Variable {"idList":["${paper_manufacturer_id}"]} + ${response} POST On Session yytclient /trading-center/delete/paper-manfucturers/by/ids ${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"]} + +supplierfocus_delete_paper_brand + Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} + ${body} Set Variable {"idList":["${paper_brand_id}"]} + ${response} POST On Session yytclient /trading-center/delete/category-brands/by/ids ${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"]}