You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
442 lines
26 KiB
442 lines
26 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<robot generator="Robot 3.1.2 (Python 3.6.8 on linux)" generated="20211201 11:50:29.215" rpa="false">
|
|
<suite id="s1" name="Ztb-Trading-Rf-Api" source="/root/ztb-trading-rf-api">
|
|
<suite id="s1-s1" name="0-Database" source="/root/ztb-trading-rf-api/0-Database.robot">
|
|
<test id="s1-s1-t1" name="Connect to database">
|
|
<kw name="Connect To Database Using Custom Params">
|
|
<arguments>
|
|
<arg>pymysql</arg>
|
|
<arg>host='8.135.8.221',user='root', password='password', \ port=3306,database='ztb_recycle'</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.319" level="FAIL">No keyword with name 'Connect To Database Using Custom Params' found.</msg>
|
|
<status status="FAIL" starttime="20211201 11:50:29.318" endtime="20211201 11:50:29.319"></status>
|
|
</kw>
|
|
<status status="FAIL" starttime="20211201 11:50:29.317" endtime="20211201 11:50:29.319" critical="yes">No keyword with name 'Connect To Database Using Custom Params' found.</status>
|
|
</test>
|
|
<status status="FAIL" starttime="20211201 11:50:29.314" endtime="20211201 11:50:29.319"></status>
|
|
</suite>
|
|
<suite id="s1-s2" name="1-Client(Test)" source="/root/ztb-trading-rf-api/1-Client(Test)">
|
|
<suite id="s1-s2-s1" name="1-APPlogin(Test)" source="/root/ztb-trading-rf-api/1-Client(Test)/1-APPlogin(Test).robot">
|
|
<test id="s1-s2-s1-t1" name="userlogin">
|
|
<kw name="Disable Warnings" library="urllib3">
|
|
<doc>Helper for quickly disabling all urllib3 warnings.</doc>
|
|
<status status="PASS" starttime="20211201 11:50:29.335" endtime="20211201 11:50:29.335"></status>
|
|
</kw>
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<arguments>
|
|
<arg>ZTBT</arg>
|
|
<arg>https://api-client-uec-test.qniao.cn</arg>
|
|
<arg>${header}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.336" level="INFO">Creating Session using : alias=ZTBT, url=https://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 </msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.335" endtime="20211201 11:50:29.336"></status>
|
|
</kw>
|
|
<kw name="Create Dictionary" library="BuiltIn">
|
|
<doc>Creates and returns a dictionary based on the given ``items``.</doc>
|
|
<arguments>
|
|
<arg>account=18888888888</arg>
|
|
<arg>captcha=888888</arg>
|
|
<arg>accountType=2</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${data}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:29.337" level="INFO">${data} = {'account': '18888888888', 'captcha': '888888', 'accountType': '2'}</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.336" endtime="20211201 11:50:29.337"></status>
|
|
</kw>
|
|
<kw name="Set Variable" library="BuiltIn">
|
|
<doc>Returns the given values which can then be assigned to a variables.</doc>
|
|
<arguments>
|
|
<arg>18888888888</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${account}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:29.337" level="INFO">${account} = 18888888888</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.337" endtime="20211201 11:50:29.337"></status>
|
|
</kw>
|
|
<kw name="Post On Session" library="RequestsLibrary">
|
|
<doc>Sends a POST request on a previously created HTTP Session.</doc>
|
|
<arguments>
|
|
<arg>ZTBT</arg>
|
|
<arg>uec/authorize/by-captcha</arg>
|
|
<arg>json=${data}</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${respones}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:29.528" level="INFO">POST Request : url=https://api-client-uec-test.qniao.cn/uec/authorize/by-captcha
|
|
path_url=/uec/authorize/by-captcha
|
|
headers={'User-Agent': 'python-requests/2.26.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Content-Length': '67'}
|
|
body=b'{"account": "18888888888", "captcha": "888888", "accountType": "2"}'
|
|
</msg>
|
|
<msg timestamp="20211201 11:50:29.529" level="INFO">POST Response : url=https://api-client-uec-test.qniao.cn/uec/authorize/by-captcha
|
|
status=200, reason=
|
|
headers={'Server': 'nginx/1.16.1', 'Date': 'Wed, 01 Dec 2021 03:50:29 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/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg==","userId":"659450159519895552"}}
|
|
</msg>
|
|
<msg timestamp="20211201 11:50:29.529" level="INFO">${respones} = <Response [200]></msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.338" endtime="20211201 11:50:29.529"></status>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<arguments>
|
|
<arg>${respones.status_code}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.530" level="INFO">200</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.529" endtime="20211201 11:50:29.530"></status>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<arguments>
|
|
<arg>${respones.json()}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.530" level="INFO">{'code': 0, 'message': 'successful', 'data': {'token': 'd6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg==', 'userId': '659450159519895552'}}</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.530" endtime="20211201 11:50:29.530"></status>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<arguments>
|
|
<arg>${respones.json()["data"]}</arg>
|
|
<arg>token</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${token}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:29.531" level="INFO">${token} = d6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg==</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.531" endtime="20211201 11:50:29.531"></status>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<arguments>
|
|
<arg>${token}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.531" level="INFO">${token} = d6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg==</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.531" endtime="20211201 11:50:29.532"></status>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<arguments>
|
|
<arg>${account}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.532" level="INFO">${account} = 18888888888</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.532" endtime="20211201 11:50:29.532"></status>
|
|
</kw>
|
|
<status status="PASS" starttime="20211201 11:50:29.334" endtime="20211201 11:50:29.532" critical="yes"></status>
|
|
</test>
|
|
<test id="s1-s2-s1-t2" name="login-token">
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<arguments>
|
|
<arg>ZTBT</arg>
|
|
<arg>${url}</arg>
|
|
<arg>${header}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.533" level="INFO">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 </msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.533" endtime="20211201 11:50:29.534"></status>
|
|
</kw>
|
|
<kw name="Create Dictionary" library="BuiltIn">
|
|
<doc>Creates and returns a dictionary based on the given ``items``.</doc>
|
|
<arguments>
|
|
<arg>loginToken=${token}</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${token1}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:29.534" level="INFO">${token1} = {'loginToken': 'd6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg=='}</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.534" endtime="20211201 11:50:29.534"></status>
|
|
</kw>
|
|
<kw name="Post On Session" library="RequestsLibrary">
|
|
<doc>Sends a POST request on a previously created HTTP Session.</doc>
|
|
<arguments>
|
|
<arg>ZTBT</arg>
|
|
<arg>recycle-user-center/authorize/get/product-line-token/by/login-token</arg>
|
|
<arg>json=${token1}</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${reps}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:29.658" level="INFO">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.26.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Content-Length': '106'}
|
|
body=b'{"loginToken": "d6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg=="}'
|
|
</msg>
|
|
<msg timestamp="20211201 11:50:29.658" level="INFO">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': 'Wed, 01 Dec 2021 03:50:29 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive'}
|
|
body={"code":0,"message":"successful","data":{"token":"d6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg==","userToken":null,"userId":"659450159519895552"}}
|
|
</msg>
|
|
<msg timestamp="20211201 11:50:29.658" level="INFO">${reps} = <Response [200]></msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.534" endtime="20211201 11:50:29.658"></status>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<arguments>
|
|
<arg>${reps.json()["data"]}</arg>
|
|
<arg>token</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${gettoken}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:29.659" level="INFO">${gettoken} = d6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg==</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.658" endtime="20211201 11:50:29.659"></status>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<arguments>
|
|
<arg>${reps.json()["data"]}</arg>
|
|
<arg>userId</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${userId}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:29.659" level="INFO">${userId} = 659450159519895552</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.659" endtime="20211201 11:50:29.659"></status>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<arguments>
|
|
<arg>${reps.json()["data"]["token"]}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.660" level="INFO">d6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg==</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.660" endtime="20211201 11:50:29.660"></status>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<arguments>
|
|
<arg>${gettoken}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.660" level="INFO">${gettoken} = d6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg==</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.660" endtime="20211201 11:50:29.660"></status>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<arguments>
|
|
<arg>${userId}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.661" level="INFO">${userId} = 659450159519895552</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.661" endtime="20211201 11:50:29.661"></status>
|
|
</kw>
|
|
<status status="PASS" starttime="20211201 11:50:29.532" endtime="20211201 11:50:29.661" critical="yes"></status>
|
|
</test>
|
|
<test id="s1-s2-s1-t3" name="getuserinfo">
|
|
<kw name="Create Dictionary" library="BuiltIn">
|
|
<doc>Creates and returns a dictionary based on the given ``items``.</doc>
|
|
<arguments>
|
|
<arg>content-type=application/json</arg>
|
|
<arg>X-APP-ID=470236309865238528</arg>
|
|
<arg>Authorization=${gettoken}</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${header}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:29.663" level="INFO">${header} = {'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Authorization': 'd6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg=='}</msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.662" endtime="20211201 11:50:29.663"></status>
|
|
</kw>
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<arguments>
|
|
<arg>baseinfo</arg>
|
|
<arg>${url}</arg>
|
|
<arg>${header}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:29.663" level="INFO">Creating Session using : alias=baseinfo, url=http://api-client-ztb-test.qniao.cn, headers={'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Authorization': 'd6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg=='}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.663" endtime="20211201 11:50:29.663"></status>
|
|
</kw>
|
|
<kw name="Get On Session" library="RequestsLibrary">
|
|
<doc>Sends a GET request on a previously created HTTP Session.</doc>
|
|
<arguments>
|
|
<arg>baseinfo</arg>
|
|
<arg>recycle-service/user/get/base-info</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${reps}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:30.029" level="INFO">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.26.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Authorization': 'd6SX3ESr8Jb2tYq/89Ft7HSef7LjHyTdXqhrqWRDypMxVQPBW+90MWsl9ceYu6poty0ccHoZ7QXTE+LWDHUBkg=='}
|
|
body=None
|
|
</msg>
|
|
<msg timestamp="20211201 11:50:30.029" level="INFO">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': 'Wed, 01 Dec 2021 03:50:30 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive'}
|
|
body={"code":0,"message":"successful","data":{"userId":"659450159519895552","realName":"赖勇兰","mobile":"18888888888","avatarUrl":"http://medou.oss-cn-shenzhen.aliyuncs.com/saas/20200623160820.png","isAuth":1,"isVIP":1,"isSetPassword":0,"hasStore":0,"balance":77961.0500,"memberExpiredAt":"2022-03-13 13:54:19","hasGetMember":null,"nickname":"BTPY5718","memberRewardPoint":100,"isAccountancyUser":0,"hasShowedLoginTag":false,"isSetProxyTag":false,"identityTag":"打包厂","locateCityTag":{"provinceId":120000,"provinceName":"天津","cityId":120100,"cityName":"天津市","districtId":120101,"districtName":"和平区"},"locFactoryDetail":"西站前街1号天津西站2F层","experienceTag":"1年以下","numberOfPurchaseCategoriesTag":"0个","numberOfProxyCategoriesTag":"0个","packageFactoryName":"88纸业","packageFactoryArea":1500,"numberOfEmployee":12,"numberOfPackageMachine":null,"businessLicenseUrl":"https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1637563690936.jpg","legalPersonName":"陈华","uniformSocialCreditCode":"91500113984969104D","enterpriseName":"重庆亨乐西餐食品有限公司","type":null,"capital":null,"locDetail":"待补充","establishDate":null,"shipmentPerMonth":"1000吨以下","storeOverview":{"storeId":null,"margin":null,"todayMargin":null,"todayMarginNum":null,"hasStore":0,"status":null},"accountBalance":{"accountMoney":77961.0500,"frozenMoney":77961.0500},"bizUserId":"498985714587930624","bizUserName":"张山","status":0,"bizUserCode":"9999","hasShipmentsInfo":1,"isEnterpriseAuth":1,"packerType":"是v发电设备","autoWeighingMachine":"山东化工被他人好吧","forkliftsNum":10,"logisticsVehiclesNum":25,"oftenSendPaperMill":"阿三v长度为hi法定股本v科比v积分不够看的环境的改变附加的功能日本你根本","factoryLongitude":117.162647,"factoryLatitude":39.157162,"factoryPhotoUrlList":["https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1637560667998.png","https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1637560671717.jpg","https://qncloudprintfiletest.oss-cn-shenzhen.aliyuncs.com/cloudprint/1637560676979.jpg"],"factoryMainCategoryDtoList":[{"id":"661680169953660928","factoryId":"660158494883844096","categoryId":"5","categoryName":"坑卡A","categoryProductionCapacityPerMonth":15.222,"categoryPhotoUrl":null}],"isFactoryInfoRequired":1}}
|
|
</msg>
|
|
<msg timestamp="20211201 11:50:30.030" level="INFO">${reps} = <Response [200]></msg>
|
|
<status status="PASS" starttime="20211201 11:50:29.663" endtime="20211201 11:50:30.030"></status>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<arguments>
|
|
<arg>${reps.json()["data"]}</arg>
|
|
<arg>realName</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${realName}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:30.031" level="INFO">${realName} = 赖勇兰</msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.030" endtime="20211201 11:50:30.031"></status>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<arguments>
|
|
<arg>${reps.json()["data"]}</arg>
|
|
<arg>userId</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${userId}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:30.031" level="INFO">${userId} = 659450159519895552</msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.031" endtime="20211201 11:50:30.031"></status>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<arguments>
|
|
<arg>${realName}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:30.032" level="INFO">${realName} = 赖勇兰</msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.031" endtime="20211201 11:50:30.032"></status>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<arguments>
|
|
<arg>${userId}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:30.032" level="INFO">${userId} = 659450159519895552</msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.032" endtime="20211201 11:50:30.032"></status>
|
|
</kw>
|
|
<kw name="Should Be Equal As Strings" library="BuiltIn">
|
|
<doc>Fails if objects are unequal after converting them to strings.</doc>
|
|
<arguments>
|
|
<arg>${account}</arg>
|
|
<arg>${reps.json()["data"]["mobile"]}</arg>
|
|
</arguments>
|
|
<status status="PASS" starttime="20211201 11:50:30.032" endtime="20211201 11:50:30.033"></status>
|
|
</kw>
|
|
<status status="PASS" starttime="20211201 11:50:29.661" endtime="20211201 11:50:30.033" critical="yes"></status>
|
|
</test>
|
|
<status status="PASS" starttime="20211201 11:50:29.322" endtime="20211201 11:50:30.034"></status>
|
|
</suite>
|
|
<suite id="s1-s2-s2" name="1-APPlogin(master)" source="/root/ztb-trading-rf-api/1-Client(Test)/1-APPlogin(master).robot">
|
|
<test id="s1-s2-s2-t1" name="Get_verification-code">
|
|
<kw name="Disable Warnings" library="urllib3">
|
|
<doc>Helper for quickly disabling all urllib3 warnings.</doc>
|
|
<status status="PASS" starttime="20211201 11:50:30.040" endtime="20211201 11:50:30.041"></status>
|
|
</kw>
|
|
<kw name="Create Dictionary" library="BuiltIn">
|
|
<doc>Creates and returns a dictionary based on the given ``items``.</doc>
|
|
<arguments>
|
|
<arg>content-type=application/json</arg>
|
|
<arg>X-APP-ID=470236309865238528</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${headers}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:30.041" level="INFO">${headers} = {'content-type': 'application/json', 'X-APP-ID': '470236309865238528'}</msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.041" endtime="20211201 11:50:30.041"></status>
|
|
</kw>
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<arguments>
|
|
<arg>ZTBT</arg>
|
|
<arg>https://api-client-uec.qniao.cn</arg>
|
|
<arg>${headers}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:30.041" level="INFO">Creating Session using : alias=ZTBT, url=https://api-client-uec.qniao.cn, headers={'content-type': 'application/json', 'X-APP-ID': '470236309865238528'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.041" endtime="20211201 11:50:30.042"></status>
|
|
</kw>
|
|
<kw name="Set Variable" library="BuiltIn">
|
|
<doc>Returns the given values which can then be assigned to a variables.</doc>
|
|
<arguments>
|
|
<arg>{"verifiableAccount":"13168550964","verifiableAccountType":1,"purpose":1}</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${value}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:30.042" level="INFO">${value} = {"verifiableAccount":"13168550964","verifiableAccountType":1,"purpose":1}</msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.042" endtime="20211201 11:50:30.042"></status>
|
|
</kw>
|
|
<kw name="Post On Session" library="RequestsLibrary">
|
|
<doc>Sends a POST request on a previously created HTTP Session.</doc>
|
|
<arguments>
|
|
<arg>ZTBT</arg>
|
|
<arg>uec/get/auth-captcha</arg>
|
|
<arg>${value.encode('utf-8')}</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${reps}</var>
|
|
</assign>
|
|
<msg timestamp="20211201 11:50:30.074" level="INFO">POST Request : url=https://api-client-uec.qniao.cn/uec/get/auth-captcha
|
|
path_url=/uec/get/auth-captcha
|
|
headers={'User-Agent': 'python-requests/2.26.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'content-type': 'application/json', 'X-APP-ID': '470236309865238528', 'Content-Length': '73'}
|
|
body=b'{"verifiableAccount":"13168550964","verifiableAccountType":1,"purpose":1}'
|
|
</msg>
|
|
<msg timestamp="20211201 11:50:30.074" level="INFO">POST Response : url=https://api-client-uec.qniao.cn/uec/get/auth-captcha
|
|
status=200, reason=
|
|
headers={'Server': 'nginx/1.14.1', 'Date': 'Wed, 01 Dec 2021 03:50:30 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Origin, Access-Control-Request-Method, Access-Control-Request-Headers'}
|
|
body={"code":0,"message":"successful","data":null}
|
|
</msg>
|
|
<msg timestamp="20211201 11:50:30.074" level="INFO">${reps} = <Response [200]></msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.042" endtime="20211201 11:50:30.074"></status>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<arguments>
|
|
<arg>${reps.json()}</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:30.075" level="INFO">{'code': 0, 'message': 'successful', 'data': None}</msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.075" endtime="20211201 11:50:30.075"></status>
|
|
</kw>
|
|
<kw name="Sleep" library="BuiltIn">
|
|
<doc>Pauses the test executed for the given time.</doc>
|
|
<arguments>
|
|
<arg>5</arg>
|
|
</arguments>
|
|
<msg timestamp="20211201 11:50:35.076" level="INFO">Slept 5 seconds</msg>
|
|
<status status="PASS" starttime="20211201 11:50:30.076" endtime="20211201 11:50:35.076"></status>
|
|
</kw>
|
|
<errors>
|
|
<msg timestamp="20211201 11:50:28.800" level="ERROR">Ignoring second test suite init file '/root/ztb-trading-rf-api/2-Background_system(Test)/1.2-enterprise_management/__init__.txt'.</msg>
|
|
<msg timestamp="20211201 11:50:29.313" level="ERROR">Error in file '/root/ztb-trading-rf-api': Importing test library 'SeleniumLibrary' failed: ModuleNotFoundError: No module named 'SeleniumLibrary'
|
|
Traceback (most recent call last):
|
|
None
|
|
PYTHONPATH:
|
|
/usr/local/python3/lib/python36.zip
|
|
/usr/local/python3/lib/python3.6
|
|
/usr/local/python3/lib/python3.6/lib-dynload
|
|
/usr/local/python3/lib/python3.6/site-packages</msg>
|
|
<msg timestamp="20211201 11:50:29.313" level="ERROR">Error in file '/root/ztb-trading-rf-api': Importing test library 'AppiumLibrary' failed: ModuleNotFoundError: No module named 'AppiumLibrary'
|
|
Traceback (most recent call last):
|
|
None
|
|
PYTHONPATH:
|
|
/usr/local/python3/lib/python36.zip
|
|
/usr/local/python3/lib/python3.6
|
|
/usr/local/python3/lib/python3.6/lib-dynload
|
|
/usr/local/python3/lib/python3.6/site-packages</msg>
|
|
<msg timestamp="20211201 11:50:29.316" level="ERROR">Error in file '/root/ztb-trading-rf-api/0-Database.robot': Importing test library 'DatabaseLibrary' failed: ModuleNotFoundError: No module named 'DatabaseLibrary'
|
|
Traceback (most recent call last):
|
|
None
|
|
PYTHONPATH:
|
|
/usr/local/python3/lib/python36.zip
|
|
/usr/local/python3/lib/python3.6
|
|
/usr/local/python3/lib/python3.6/lib-dynload
|
|
/usr/local/python3/lib/python3.6/site-packages</msg>
|
|
<msg timestamp="20211201 11:50:29.334" level="ERROR">Error in file '/root/ztb-trading-rf-api/1-Client(Test)/1-APPlogin(Test).robot': Importing test library 'DatabaseLibrary' failed: ModuleNotFoundError: No module named 'DatabaseLibrary'
|
|
Traceback (most recent call last):
|
|
None
|
|
PYTHONPATH:
|
|
/usr/local/python3/lib/python36.zip
|
|
/usr/local/python3/lib/python3.6
|
|
/usr/local/python3/lib/python3.6/lib-dynload
|
|
/usr/local/python3/lib/python3.6/site-packages</msg>
|
|
<msg timestamp="20211201 11:50:30.039" level="ERROR">Error in file '/root/ztb-trading-rf-api/1-Client(Test)/1-APPlogin(master).robot': Importing test library 'DatabaseLibrary' failed: ModuleNotFoundError: No module named 'DatabaseLibrary'
|
|
Traceback (most recent call last):
|
|
None
|
|
PYTHONPATH:
|
|
/usr/local/python3/lib/python36.zip
|
|
/usr/local/python3/lib/python3.6
|
|
/usr/local/python3/lib/python3.6/lib-dynload
|
|
/usr/local/python3/lib/python3.6/site-packages</msg>
|
|
</errors>
|
|
</robot>
|