Create Session: create a HTTP session to a server
ZTBT
http://api-client-uec-test.qniao.cn
${header}
Creating Session using : alias=ZTBT, url=http://api-client-uec-test.qniao.cn, headers={'content-type': 'application/json', 'X-APP-ID': '470236309865238528'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0
Creates and returns a dictionary based on the given ``items``.
account=15014242835
captcha=888888
accountType=2
${data}
${data} = {'account': '15014242835', 'captcha': '888888', 'accountType': '2'}
Sends a POST request on a previously created HTTP Session.
ZTBT
/uec/authorize/by-captcha
json=${data}
${respones}
POST Request : url=http://api-client-uec-test.qniao.cn/uec/authorize/by-captcha
path_url=/uec/authorize/by-captcha
headers={'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Content-Length': '67'}
body=b'{"account": "15014242835", "captcha": "888888", "accountType": "2"}'
POST Response : url=http://api-client-uec-test.qniao.cn/uec/authorize/by-captcha
status=200, reason=
headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 20 Aug 2021 07:53:42 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers'}
body={"code":0,"message":"successful","data":{"token":"d6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ==","userId":"625059637024133120"}}
${respones} = <Response [200]>
Logs the given message with the given level.
${respones.status_code}
200
Logs the given message with the given level.
${respones.json()}
{'code': 0, 'message': 'successful', 'data': {'token': 'd6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ==', 'userId': '625059637024133120'}}
Returns a value from the given ``dictionary`` based on the given ``key``.
${respones.json()["data"]}
token
${token}
${token} = d6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ==
Makes a variable available globally in all tests and suites.
${token}
${token} = d6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ==
Create Session: create a HTTP session to a server
ZTBT
${url}
${header}
Creating Session using : alias=ZTBT, url=http://api-client-ztb-test.qniao.cn, headers={'content-type': 'application/json', 'X-APP-ID': '470236309865238528'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0
Creates and returns a dictionary based on the given ``items``.
loginToken=${token}
${token1}
${token1} = {'loginToken': 'd6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ=='}
Sends a POST request on a previously created HTTP Session.
ZTBT
recycle-user-center/authorize/get/product-line-token/by/login-token
json=${token1}
${reps}
POST Request : url=http://api-client-ztb-test.qniao.cn/recycle-user-center/authorize/get/product-line-token/by/login-token
path_url=/recycle-user-center/authorize/get/product-line-token/by/login-token
headers={'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Content-Length': '106'}
body=b'{"loginToken": "d6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ=="}'
POST Response : url=http://api-client-ztb-test.qniao.cn/recycle-user-center/authorize/get/product-line-token/by/login-token
status=200, reason=
headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 20 Aug 2021 07:53:42 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive'}
body={"code":0,"message":"successful","data":{"token":"d6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ==","userToken":null,"userId":"625059637024133120"}}
${reps} = <Response [200]>
Returns a value from the given ``dictionary`` based on the given ``key``.
${reps.json()["data"]}
token
${gettoken}
${gettoken} = d6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ==
Returns a value from the given ``dictionary`` based on the given ``key``.
${reps.json()["data"]}
userId
${userId}
${userId} = 625059637024133120
Logs the given message with the given level.
${reps.json()["data"]["token"]}
d6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ==
Makes a variable available globally in all tests and suites.
${gettoken}
${gettoken} = d6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ==
Makes a variable available globally in all tests and suites.
${userId}
${userId} = 625059637024133120
Creates and returns a dictionary based on the given ``items``.
content-type=application/json
X-APP-ID=470236309865238528
Authorization=${gettoken}
${header}
${header} = {'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Authorization': 'd6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ=='}
Create Session: create a HTTP session to a server
baseinfo
${url}
${header}
Creating Session using : alias=baseinfo, url=http://api-client-ztb-test.qniao.cn, headers={'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Authorization': 'd6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ=='}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0
Sends a GET request on a previously created HTTP Session.
baseinfo
recycle-service/user/get/base-info
${reps}
GET Request : url=http://api-client-ztb-test.qniao.cn/recycle-service/user/get/base-info
path_url=/recycle-service/user/get/base-info
headers={'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Authorization': 'd6SX3ESr8Jb2tYq/89Ft7DCUbCHSVTrMJgH552nvTQBP5fSS/wGhBgupf5aKZt8T8mZbZ33PYMwf4dvKYDstQQ=='}
body=None
GET Response : url=http://api-client-ztb-test.qniao.cn/recycle-service/user/get/base-info
status=200, reason=
headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 20 Aug 2021 07:53:42 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive'}
body={"code":0,"message":"successful","data":{"userId":"625059637024133120","realName":"赖勇兰","mobile":"15014242835","avatarUrl":"http://medou.oss-cn-shenzhen.aliyuncs.com/saas/20200623160820.png","isAuth":1,"isVIP":0,"isSetPassword":0,"hasStore":0,"balance":211326.3700,"memberExpiredAt":null,"nickname":"KERN8658","memberRewardPoint":100,"isAccountancyUser":0,"hasShowedLoginTag":false,"isSetProxyTag":false,"identityTag":"打包厂","locateCityTag":{"provinceId":140000,"provinceName":"山西省","cityId":140200,"cityName":"大同市","districtId":null,"districtName":null},"experienceTag":"5-10年","numberOfPurchaseCategoriesTag":"0个","numberOfProxyCategoriesTag":"0个","packageFactoryName":"21","packageFactoryArea":27000,"numberOfEmployee":2600,"numberOfPackageMachine":262,"businessLicenseUrl":"https://qncloudtest.oss-cn-shenzhen.aliyuncs.com/common/18130734326537453.jpg","shipmentPerMonth":"1000-2000吨","storeOverview":{"storeId":null,"margin":null,"todayMargin":null,"todayMarginNum":null,"hasStore":0,"status":null},"accountBalance":{"accountMoney":211326.3700,"frozenMoney":28788.7900},"bizUserId":"564535103942955008","bizUserName":"郭腾彬","status":0,"bizUserCode":"8888","hasShipmentsInfo":1,"isEnterpriseAuth":1}}
${reps} = <Response [200]>
Returns a value from the given ``dictionary`` based on the given ``key``.
${reps.json()["data"]}
realName
${realName}
${realName} = 赖勇兰
Returns a value from the given ``dictionary`` based on the given ``key``.
${reps.json()["data"]}
userId
${userId}
${userId} = 625059637024133120
Makes a variable available globally in all tests and suites.
${realName}
${realName} = 赖勇兰
Makes a variable available globally in all tests and suites.
${userId}
${userId} = 625059637024133120
Creates and returns a dictionary based on the given ``items``.
Content-Type=application/x-www-form-urlencoded
X-APP-ID=470236309865238555
${header}
${header} = {'Content-Type': 'application/x-www-form-urlencoded', 'X-APP-ID': '470236309865238555'}
Create Session: create a HTTP session to a server
ZTBT
http://api-ops-ztb-test.qniao.cn
${header}
Creating Session using : alias=ZTBT, url=http://api-ops-ztb-test.qniao.cn, headers={'Content-Type': 'application/x-www-form-urlencoded', 'X-APP-ID': '470236309865238555'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0
Creates and returns a dictionary based on the given ``items``.
username=laiyonglan@qniao.cn
password=qn123456
&{data}
&{data} = { username=laiyonglan@qniao.cn | password=qn123456 }
Logs the given message with the given level.
${data}
{'username': 'laiyonglan@qniao.cn', 'password': 'qn123456'}
Sends a POST request on a previously created HTTP Session.
ZTBT
recycle-service/admin/login
data=${data}
${reps}
POST Request : url=http://api-ops-ztb-test.qniao.cn/recycle-service/admin/login
path_url=/recycle-service/admin/login
headers={'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded', 'X-APP-ID': '470236309865238555', 'Content-Length': '48'}
body=username=laiyonglan%40qniao.cn&password=qn123456
POST Response : url=http://api-ops-ztb-test.qniao.cn/recycle-service/admin/login
status=200, reason=
headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 20 Aug 2021 07:53:42 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Access-Control-Allow-Origin': '*', 'Access-Control-Request-Method': '*', 'Cache-Control': 'no-cache', 'Authorization': 'Token 6b08add42d6bcf73abb935b2adf83525', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'X-Frame-Options': 'DENY'}
body={"code":200,"message":"登陆成功"}
${reps} = <Response [200]>
Logs the given message with the given level.
${reps.json()}
{'code': 200, 'message': '登陆成功'}
Returns the given values which can then be assigned to a variables.
Token 6b08add42d6bcf73abb935b2adf83525
${gettoken}
${gettoken} = Token 6b08add42d6bcf73abb935b2adf83525
Fails if objects are unequal after converting them to strings.
${reps.json()["message"]}
登陆成功
Makes a variable available globally in all tests and suites.
${gettoken}
${gettoken} = Token 6b08add42d6bcf73abb935b2adf83525
Creates and returns a dictionary based on the given ``items``.
X-APP-ID=470236309865238555
Authorization=Token 6b08add42d6bcf73abb935b2adf83525
${header}
${header} = {'X-APP-ID': '470236309865238555', 'Authorization': 'Token 6b08add42d6bcf73abb935b2adf83525'}
Create Session: create a HTTP session to a server
login-info
http://api-ops-ztb-test.qniao.cn
${header}
Creating Session using : alias=login-info, url=http://api-ops-ztb-test.qniao.cn, headers={'X-APP-ID': '470236309865238555', 'Authorization': 'Token 6b08add42d6bcf73abb935b2adf83525'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0
Sends a GET request on a previously created HTTP Session.
login-info
recycle-service/admin/employee/get/login-info
${reps_data}
GET Request : url=http://api-ops-ztb-test.qniao.cn/recycle-service/admin/employee/get/login-info
path_url=/recycle-service/admin/employee/get/login-info
headers={'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'X-APP-ID': '470236309865238555', 'Authorization': 'Token 6b08add42d6bcf73abb935b2adf83525'}
body=None
GET Response : url=http://api-ops-ztb-test.qniao.cn/recycle-service/admin/employee/get/login-info
status=200, reason=
headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 20 Aug 2021 07:53:42 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Authorization': '6b08add42d6bcf73abb935b2adf83525', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'X-Frame-Options': 'DENY'}
body={"code":0,"message":"successful","data":{"adminId":"617003842541850624","name":"赖勇兰","avatar":"https://static-legacy.dingtalk.com/media/lADPBF8a9_2FSfvNAr3NArw_700_701.jpg","position":"测试工程师","positionList":[{"id":"1","name":"管理员"}],"menuList":["/preciousPaperGeneral/paperFctSellOnManage/PaperFctList/CreatePaperPrice","/microSystemManagement/menu","/preciousPaperGeneral/sellOnConsignmentManage/dealManage/TransscationMainBody","/preciousPaperGeneral/sellOnConsignmentManage/invoiceManagement/InvoiceManagementList","/preciousPaperGeneral/packaginStationSAASManage/proxyPaymentOrder/PaymentOrderList","/preciousPaperGeneral/operationManagementBackground/scoreManage/Role/Index","/microSystemManagement/position","/sysManage/listLibraryManage/Index","/preciousPaperGeneral/packaginStationSAASManage/financeManage/MergerPayment","/preciousPaperGeneral/financialManagementBackground/settlementManage/settlementPayment/Index","/preciousPaperGeneral/operationManagementBackground/sysManage/information","/preciousPaperGeneral/companyAndUserManage/companyManage/Index","/preciousPaperGeneral/packaginStationSAASManage/proxyManage","/preciousPaperGeneral/financialManagementBackground/payCenter/memberAccountInfo/memberCcountDetails","/preciousPaperGeneral/packaginStationSAASManage/factoryOrder/ProxyDetails","/preciousPaperGeneral/packaginStationSAASManage/proxyOrderInfo/OrderDetails","/preciousPaperGeneral/sellOnConsignmentManage/operationAudit/operationAuditDetails/standingBook","/preciousPaperGeneral/operationManagementBackground/wastePaperPriceIndex","/preciousPaperGeneral/operationManagementBackground/wastePaperPriceIndex/detail","/preciousPaperGeneral/sellOnConsignmentManage/marketingAudit/awaitDeleveryDetails","/preciousPaperGeneral/packaginStationSAASManage/operationManage/ServiceChargeStandard","/preciousPaperGeneral/operationManagementBackground/wastePaperPriceIndex/DiscountFigure","/preciousPaperGeneral/companyAndUserManage/companyManage","/preciousPaperGeneral/paperFctSellOnManage/PaperFctList/CreatePoint","/preciousPaperGeneral/operationManagementBackground/staffActicities","/preciousPaperGeneral/packaginStationSAASManage/authFactory/ApplyList","/preciousPaperGeneral/sellOnConsignmentManage/financeAudit/finaceAuditList","/preciousPaperGeneral/sellOnConsignmentManage/operationAudit/PaperFctRetMoneyIndex","/preciousPaperGeneral/operationManagementBackground/staffActicities/Index","/preciousPaperGeneral/sellOnConsignmentManage/customerManage/Index","/preciousPaperGeneral/operationManagementBackground/scoreManage/convert/Index","/preciousPaperGeneral/paperFctSellOnManage/PaperFctList/PointList","/preciousPaperGeneral/operationManagementBackground/basicSetting/vipPaid/Index","/preciousPaperGeneral/operationManagementBackground/wastePaperPriceIndex/list","/preciousPaperGeneral/financialManagementBackground/payCenter/payForWater/Index","/preciousPaperGeneral/sellOnConsignmentManage/operationAudit/PaperFctRetMoneyIndex/orderList","/preciousPaperGeneral/packaginStationSAASManage/saasRefund/SaasRefundInfo","/preciousPaperGeneral/packaginStationSAASManage/operationManage/AuthorizationIndex","/preciousPaperGeneral/operationManagementBackground/basicSetting","/preciousPaperGeneral/packaginStationSAASManage/financeManage","/preciousPaperGeneral/sellOnConsignmentManage/operationAudit/operationAuditDetails","/preciousPaperGeneral/sellOnConsignmentManage","/preciousPaperGeneral/operationManagementBackground/contractManege/Index","/preciousPaperGeneral/sellOnConsignmentManage/orderReconciliation/financeAudit/PaperFctRetMoneyIndex","/preciousPaperGeneral/operationManagementBackground/articManage/Index","/preciousPaperGeneral/paperFctSellOnManage/ForwardList/Index","/preciousPaperGeneral/packaginStationSAASManage/saasAccount/SaasAccountList","/preciousPaperGeneral/operationManagementBackground/wastePaperPriceIndex/edit","/microSystemManagement/employee","/preciousPaperGeneral/operationManagementBackground/scoreManage","/preciousPaperGeneral/operationManagementBackground/articManage/Details","/preciousPaperGeneral/operationManagementBackground/basicSetting/wasteType/Index","/preciousPaperGeneral/operationManagementBackground/supplyOrderManage/Index","/preciousPaperGeneral/packaginStationSAASManage/proxyCheckOrder/CheckOrderList","/preciousPaperGeneral/operationManagementBackground/wastePaperPriceIndex/create","/preciousPaperGeneral/paperFctSellOnManage/PaperFctList/Edit","/preciousPaperGeneral/packaginStationSAASManage/operationManage","/preciousPaperGeneral/operationManagementBackground/basicSetting/shop/Index","/preciousPaperGeneral/operationManagementBackground/contractManege","/preciousPaperGeneral/operationManagementBackground/feedbackManage/FeedbackIndex","/preciousPaperGeneral/sellOnConsignmentManage/capitalSource/CapitalSourceIndex","/preciousPaperGeneral/packaginStationSAASManage/factoryProxy/FactoryAgency","/preciousPaperGeneral/companyAndUserManage","/preciousPaperGeneral/operationManagementBackground/acticityRuleSetManage/acticityRuleSet","/preciousPaperGeneral/financialManagementBackground","/preciousPaperGeneral/operationManagementBackground/activityThemeManage/activityThemeManageIndex","/preciousPaperGeneral/operationManagementBackground/vipManage/personageVipManage/Details","/preciousPaperGeneral/paperFctSellOnManage/PaperFctList/PaperFctoryTypeOfferList","/preciousPaperGeneral/paperFctSellOnManage/PaperFctList/PaperType","/preciousPaperGeneral/sellOnConsignmentManage/PaperFctRetMoneyIndex/operationAudit/operationAuditList","/preciousPaperGeneral/sellOnConsignmentManage/operationAudit/operationAuditDetails/financialManagementBackground","/preciousPaperGeneral/paperFctSellOnManage/OrderList/JLIndex","/preciousPaperGeneral/paperFctSellOnManage","/preciousPaperGeneral/companyAndUserManage/packginStationManage/Index","/preciousPaperGeneral/financialManagementBackground/payCenter/memberAccountInfo/Index","/preciousPaperGeneral/operationManagementBackground/basicSetting/automaticallyArrive/Index","/preciousPaperGeneral/operationManagementBackground/basicSetting/orderSincereMoney/Index","/preciousPaperGeneral/packaginStationSAASManage/proxyReturn/ReturnOrderList","/preciousPaperGeneral/operationManagementBackground/feedbackManage","/preciousPaperGeneral/paperFctSellOnManage/PaperFctList/Index","/preciousPaperGeneral/operationManagementBackground","/preciousPaperGeneral/operationManagementBackground/vipManage/personageVipManage/Index","/preciousPaperGeneral/paperFctSellOnManage/OrderList/OrderInfo","/microSystemManagement","/preciousPaperGeneral/paperFctSellOnManage/ForwardList/Details","/preciousPaperGeneral/operationManagementBackground/sysManage/departmentManage","/preciousPaperGeneral/financialManagementBackground/settlementManage/orderReconciliation/Index","/preciousPaperGeneral/operationManagementBackground/basicSetting/wasteTypeOneManage/Index","/preciousPaperGeneral/sellOnConsignmentManage/marketingAudit/inTheSettlementDetails","/preciousPaperGeneral/packaginStationSAASManage/saasOrder/SaasRefundList","/preciousPaperGeneral/sellOnConsignmentManage/standingBookManage/standingBook","/preciousPaperGeneral/paperFctSellOnManage/OrderList/Index","/preciousPaperGeneral/operationManagementBackground/supplyOrderManage","/microSystemManagement/department","/preciousPaperGeneral/sellOnConsignmentManage/marketingAudit/awaitSubscribeDetails","/preciousPaperGeneral/paperFctSellOnManage/PaperFctList/VehicleQueueIndex"]}}
${reps_data} = <Response [200]>
Logs the given message with the given level.
${reps_data}
<Response [200]>
Fails if objects are unequal after converting them to strings.
${reps_data.json()["message"]}
successful
Critical Tests
All Tests
1-APPlogin & 1-WebLogin
1-APPlogin & 1-WebLogin.1-APPlogin
1-APPlogin & 1-WebLogin.1-WebLogin
1-APPlogin & 1-WebLogin.1-WebLogin.Weblogin