Browse Source
Merge pull request 'test' (#7) from test into master
Merge pull request 'test' (#7) from test into master
Reviewed-on: http://git.qniao.cn/automated-test-scripts/yyt-trading-rf-api/pulls/7master
17 changed files with 673 additions and 0 deletions
Unified View
Diff Options
-
1001_login_get_info/__init__.robot
-
90001_login_get_info/login_customer.robot
-
34001_login_get_info/login_operate.robot
-
34001_login_get_info/login_operate_psc.robot
-
90001_login_get_info/login_supplier.robot
-
84001_login_get_info/login_supplier_focus.robot
-
11002_user_register/customer_user_register.robot
-
11002_user_register/supplier_user_register.robot
-
10003_enterprise_open_account_customer/printing_packaging_factory_open_account.robot
-
10004_enterprise_open_account_supplier/supplier_paper_open_account.robot
-
10005_enterprise_apply_credit/apply_credit_qniao_customer.robot
-
0006_get_credit/__init__.robot
-
23006_get_credit/customer_get_credit.robot
-
89007_paper_variety_management/paper_brand.robot
-
60007_paper_variety_management/paper_category.robot
-
67007_paper_variety_management/paper_manufacturer.robot
-
49008_market_information/market_information_link.robot
@ -0,0 +1 @@ |
|||||
|
*** Settings *** |
||||
@ -0,0 +1,90 @@ |
|||||
|
*** Settings *** |
||||
|
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} |
||||
|
#变量名称 设置用例变量 变量值 |
||||
|
${body} Set Variable {"accountType":2,"account":"13800138003","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 获取字典内容 响应结果 serid-key |
||||
|
${userid_customer} Get From Dictionary ${response.json()["data"]} userId |
||||
|
#日志 |
||||
|
log ${userid_customer} |
||||
|
#设置token变量 |
||||
|
Set Suite Variable ${userid_customer} |
||||
|
#设置带token的请求头 |
||||
|
&{cloudfactorycustomerheader} Create Dictionary Content-Type=application/json;charset=UTF-8 Content-Type=application/json;charset=UTF-8 |
||||
|
#设置token变量 |
||||
|
Set Suite Variable ${cloudfactorycustomerheader} |
||||
|
|
||||
|
customer_login_token |
||||
|
Disable Warnings |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactorycustomerheader} |
||||
|
${body} Set Variable {"loginToken":"${gettoken_customer}"} |
||||
|
${response} POST On Session yytclient /cloud-print-user-center/authorize/get/product-line-token/by/login-token ${body.encode("utf8")} |
||||
|
Log ${response.status_code} |
||||
|
Log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${getlogintoken_customer} Get From Dictionary ${response.json()} data |
||||
|
log ${getlogintoken_customer} |
||||
|
#全局token |
||||
|
Set Global Variable ${getlogintoken_customer} |
||||
|
&{cloudfactory_customer_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer} |
||||
|
Set Suite Variable ${cloudfactory_customer_header} |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Integers ${userid_customer} ${response.json()["data"]["userId"]} |
||||
|
Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Integers 3 ${response.json()["data"]["type"]} #身份 0无企业用户 1印包未开户 2印包已开户 3印包已授信 4原纸未开户 5原纸已开户 6原纸集采商 |
||||
@ -0,0 +1,34 @@ |
|||||
|
*** Settings *** |
||||
|
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 |
||||
|
Create Session yytops ${yytops} headers=${operation_backend_header} |
||||
|
&{body} Create Dictionary username=liangjinman@qniao.cn password=qn123456 |
||||
|
${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} |
||||
|
Set Suite 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"]} |
||||
|
Should Be Equal As Strings 498985714734731264 ${response.json()["data"]["adminId"]} |
||||
|
Should Be Equal As Strings 管理员 ${response.json()["data"]["positionList"][0]["name"]} |
||||
@ -0,0 +1,34 @@ |
|||||
|
*** Settings *** |
||||
|
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 |
||||
|
Disable Warnings |
||||
|
Create Session pscops ${pscops} headers=${operation_psc_header} |
||||
|
&{body} Create Dictionary username=liangjinman@qniao.cn password=qn123456 |
||||
|
${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} |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Strings 498985714734731264 ${response.json()["data"]["adminId"]} |
||||
|
Should Be Equal As Strings 管理员 ${response.json()["data"]["positionList"][0]["name"]} |
||||
@ -0,0 +1,90 @@ |
|||||
|
*** Settings *** |
||||
|
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} |
||||
|
#变量名称 设置用例变量 变量值 |
||||
|
${body} Set Variable {"accountType":2,"account":"13849849646","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 获取字典内容 响应结果 serid-key |
||||
|
${userid_supplier} Get From Dictionary ${response.json()["data"]} userId |
||||
|
#日志 |
||||
|
log ${userid_supplier} |
||||
|
#设置token变量 |
||||
|
Set Suite Variable ${userid_supplier} |
||||
|
#设置带token的请求头 |
||||
|
&{cloudfactorysupplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier} |
||||
|
#设置token变量 |
||||
|
Set Suite Variable ${cloudfactorysupplierheader} |
||||
|
|
||||
|
supplier_login_token |
||||
|
Disable Warnings |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactorysupplierheader} |
||||
|
${body} Set Variable {"loginToken":"${gettoken_supplier}"} |
||||
|
${response} POST On Session yytclient /cloud-print-user-center/authorize/get/product-line-token/by/login-token ${body.encode("utf8")} |
||||
|
Log ${response.status_code} |
||||
|
Log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
${getlogintoken_supplier} Get From Dictionary ${response.json()} data |
||||
|
log ${getlogintoken_supplier} |
||||
|
#全局token |
||||
|
Set Global Variable ${getlogintoken_supplier} |
||||
|
&{cloudfactory_supplierheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier} |
||||
|
Set Suite Variable ${cloudfactory_supplierheader} |
||||
|
|
||||
|
get_supplier_userinfo |
||||
|
Create Session uecclient ${uecclient} headers=${cloudfactory_supplierheader} |
||||
|
${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} ${response.json()["data"]["userId"]} |
||||
|
Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 |
||||
|
|
||||
|
get_supplier_baseinfo |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierheader} |
||||
|
${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} |
||||
|
${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"]} |
||||
|
Should Be Equal As Integers 5 ${response.json()["data"]["type"]} #身份 0无企业用户 1印包未开户 2印包已开户 3印包已授信 4原纸未开户 5原纸已开户 6原纸集采商 |
||||
@ -0,0 +1,84 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{cloud_factory_supplier_focus_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_focus_phone |
||||
|
#去除警告 |
||||
|
Disable Warnings |
||||
|
#创建会话 会话别名 baseurl headers |
||||
|
Create Session uecclient ${uecclient} headers=${cloud_factory_supplier_focus_header} |
||||
|
#变量名称 设置用例变量 变量值 |
||||
|
${body} Set Variable {"accountType":2,"account":"18219557422","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_focus} Get From Dictionary ${response.json()["data"]} token |
||||
|
#日志 |
||||
|
log ${gettoken_supplier_focus} |
||||
|
#设置token变量 未转业务线 |
||||
|
Set Suite Variable ${gettoken_supplier_focus} |
||||
|
#变量接收集采商userid 获取字典内容 响应结果 serid-key |
||||
|
${userid_supplier_focus} Get From Dictionary ${response.json()["data"]} userId |
||||
|
#日志 |
||||
|
log ${userid_supplier_focus} |
||||
|
#设置token变量 |
||||
|
Set Suite Variable ${userid_supplier_focus} |
||||
|
#设置带token的请求头 |
||||
|
&{cloudfactorysupplierfocusheader} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${gettoken_supplier_focus} |
||||
|
#设置token变量 |
||||
|
Set Suite Variable ${cloudfactorysupplierfocusheader} |
||||
|
|
||||
|
supplier_focus_login_token |
||||
|
Disable Warnings |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactorysupplierfocusheader} |
||||
|
${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} |
||||
|
|
||||
|
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 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"]} |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Integers 0 ${response.json()["data"]["employeeStatus"]} #员工状态 0 启用 1停用 |
||||
|
Should Be Equal As Integers 1 ${response.json()["data"]["mallSupplier"]["managementModel"]} #经营模式 0虚拟供应商 1直营 2自营 |
||||
@ -0,0 +1,11 @@ |
|||||
|
*** Settings *** |
||||
|
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 *** |
||||
@ -0,0 +1,11 @@ |
|||||
|
*** Settings *** |
||||
|
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 *** |
||||
@ -0,0 +1,10 @@ |
|||||
|
*** Settings *** |
||||
|
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 *** |
||||
@ -0,0 +1,10 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{cloud_factory_supplier_focus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 |
||||
|
${yytclient} https://api-client-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
@ -0,0 +1,10 @@ |
|||||
|
*** Settings *** |
||||
|
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 *** |
||||
@ -0,0 +1,23 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{cloudfactory_customer_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388 Authorization=${getlogintoken_customer} |
||||
|
${yytclient} https://api-client-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
customer_get_credit_qniao |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} |
||||
|
${response} Get On Session yytclient /cloud-print-user-center/credit/get/self-enterprise-credit-by-enterprise-id |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
|
|
||||
|
customer_get_credit_feisuan |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_customer_header} |
||||
|
${response} Get On Session yytclient /cloud-print-user-center/credit/get/enterprise-feisuan-credit |
||||
|
log ${response.json()} |
||||
|
Should Be Equal As Numbers 200 ${response.status_code} |
||||
|
Should Be Equal As Strings successful ${response.json()["message"]} |
||||
@ -0,0 +1,89 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} |
||||
|
${yytclient} https://api-client-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
supplierfocus_save_paper_brand |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${paper_categoryd} 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} |
||||
|
Set Suite Variable ${paper_Manufacturerid} |
||||
|
Set Suite Variable ${paper_brand_name} |
||||
|
Set Suite Variable ${paper_name} |
||||
|
Set Suite Variable ${paper_characteristic} |
||||
|
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"]} |
||||
|
sleep 2 |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Strings ${paper_categoryd} ${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"]} |
||||
|
Should Be Equal As Numbers 1 ${response.json()["data"]["records"][0]["status"]} #纸品状态 0上架 1下架 |
||||
|
${paper_brand_id} Get From Dictionary ${response.json()["data"]["records"][0]} id |
||||
|
Set Suite Variable ${paper_brand_id} |
||||
|
|
||||
|
supplierfocus_search_paper_brand |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${param} Set Variable status=1&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"]} |
||||
|
Should Be Equal As Strings ${paper_categoryd} ${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"]} |
||||
|
Should Be Equal As Strings ${paper_brand_id} ${response.json()["data"]["records"][0]["id"]} |
||||
|
|
||||
|
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}"} |
||||
|
${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"]} |
||||
|
|
||||
|
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"]} |
||||
|
|
||||
|
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"]} |
||||
@ -0,0 +1,60 @@ |
|||||
|
*** Settings *** |
||||
|
Library DatabaseLibrary |
||||
|
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} |
||||
|
${paper_category_name} Set Variable autotest_paper_category_name |
||||
|
${body} Set Variable {"name":"${paper_category_name}"} |
||||
|
Set Suite Variable ${paper_category_name} |
||||
|
${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"]} |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Strings ${paper_category_name} ${response.json()["data"]["records"][0]["name"]} |
||||
|
${paper_category_id} Get From Dictionary ${response.json()["data"]["records"][0]} id |
||||
|
Set Suite Variable ${paper_category_id} |
||||
|
${paper_category_status} Get From Dictionary ${response.json()["data"]["records"][0]} status |
||||
|
Set Suite Variable ${paper_category_status} |
||||
|
|
||||
|
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"]} |
||||
|
|
||||
|
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"]} |
||||
|
|
||||
|
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} Query select is_delete from qn_category where id = ${paper_category_id} and name = "${paper_category_name}" |
||||
|
log ${query} |
||||
|
Should Be Equal As Strings ((1,),) ${query} |
||||
|
Disconnect From Database |
||||
@ -0,0 +1,67 @@ |
|||||
|
*** Settings *** |
||||
|
Library RequestsLibrary |
||||
|
Library Collections |
||||
|
Library urllib3 |
||||
|
|
||||
|
*** Variables *** |
||||
|
&{cloudfactory_supplierfocus_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847956666 Authorization=${getlogintoken_supplier_focus} |
||||
|
${yytclient} https://api-client-yyt-test.qniao.cn |
||||
|
|
||||
|
*** Test Cases *** |
||||
|
supplierfocus_save_paper_manufacturer |
||||
|
Create Session yytclient ${yytclient} headers=${cloudfactory_supplierfocus_header} |
||||
|
${paper_manufacturer_name} Set Variable autotest_paper_manufacturer_name |
||||
|
${paper_manufacturer_shortName} Set Variable apmn |
||||
|
${paper_manufacturer_description} Set Variable This autotest_paper_manufacturer |
||||
|
${paper_manufacturer_logoImg} Set Variable https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1632378545847.jpg |
||||
|
${body} Set Variable {"name":"${paper_manufacturer_name}","shortName":"${paper_manufacturer_shortName}","description":"${paper_manufacturer_description}","logoImg":"${paper_manufacturer_logoImg}"} |
||||
|
Set Suite Variable ${paper_manufacturer_name} |
||||
|
Set Suite Variable ${paper_manufacturer_shortName} |
||||
|
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"]} |
||||
|
sleep 2 |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Strings ${paper_manufacturer_name} ${response.json()["data"]["records"][0]["name"]} |
||||
|
${paper_manufacturer_id} Get From Dictionary ${response.json()["data"]["records"][0]} id |
||||
|
Set Suite Variable ${paper_manufacturer_id} |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Strings ${paper_manufacturer_name} ${response.json()["data"]["records"][0]["name"]} |
||||
|
Should Be Equal As Strings ${paper_manufacturer_id} ${response.json()["data"]["records"][0]["id"]} |
||||
|
|
||||
|
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"]} |
||||
|
|
||||
|
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"]} |
||||
@ -0,0 +1,49 @@ |
|||||
|
*** Settings *** |
||||
|
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 |
||||
|
Create Session yytops ${yytops} headers=${operationbackend_header} |
||||
|
${market_information_link} Set Variable http://mp.weixin.qq.com/s?__biz=MzU1MDMwNzAzMA==&mid=2247483666&idx=1&sn=f63007b21094978d2f864fdd884b39dc&chksm=fba3d4abccd45dbdb535ef00b0a3cb7c24242e467f3b55e067c343da11d780d527d6fc5cb327&scene=18#wechat_redirect |
||||
|
${body} Set Variable {"link":"${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"]} |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Strings ${market_information_link} ${response.json()["data"]["records"][0]["link"]} |
||||
|
|
||||
|
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"]} |
||||
|
Should Be Equal As Strings ${market_information_link} ${response.json()["data"]["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"]} |
||||
Write
Preview
Loading…
Cancel
Save