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.
113 lines
5.5 KiB
113 lines
5.5 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<robot generator="Robot 3.1.2 (Python 3.6.8 on linux)" generated="20210820 09:34:13.275" rpa="false">
|
|
<suite id="s1" name="Login Get Info" source="/root/yyt-trading-rf-api/yyt_trading/login_get_info.robot">
|
|
<test id="s1-t1" name="login_customer">
|
|
<kw name="Disable Warnings" library="urllib3">
|
|
<doc>Helper for quickly disabling all urllib3 warnings.</doc>
|
|
<status status="PASS" starttime="20210820 09:34:13.406" endtime="20210820 09:34:13.406"></status>
|
|
</kw>
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<arguments>
|
|
<arg>uecclient</arg>
|
|
<arg>https://api-client-uec-test.qniao.cn</arg>
|
|
<arg>headers=${cloud_factory_header}</arg>
|
|
</arguments>
|
|
<msg timestamp="20210820 09:34:13.407" level="INFO">Creating Session using : alias=uecclient, url=https://api-client-uec-test.qniao.cn, headers={'Content-Type': 'application/json;charset=UTF-8', 'X-APP-ID': '503258978847965388'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg>
|
|
<status status="PASS" starttime="20210820 09:34:13.407" endtime="20210820 09:34:13.407"></status>
|
|
</kw>
|
|
<kw name="Set Variable" library="BuiltIn">
|
|
<doc>Returns the given values which can then be assigned to a variables.</doc>
|
|
<arguments>
|
|
<arg>{"accountType":2,"account":"13000000000","captcha":"888888"}</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${body}</var>
|
|
</assign>
|
|
<msg timestamp="20210820 09:34:13.408" level="INFO">${body} = {"accountType":2,"account":"13000000000","captcha":"888888"}</msg>
|
|
<status status="PASS" starttime="20210820 09:34:13.408" endtime="20210820 09:34:13.408"></status>
|
|
</kw>
|
|
<kw name="Post On Session" library="RequestsLibrary">
|
|
<doc>Sends a POST request on a previously created HTTP Session.</doc>
|
|
<arguments>
|
|
<arg>uecclient</arg>
|
|
<arg>/uec/authorize/by-captcha</arg>
|
|
<arg>${body}</arg>
|
|
</arguments>
|
|
<assign>
|
|
<var>${response}</var>
|
|
</assign>
|
|
<msg timestamp="20210820 09:34:13.484" 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;charset=UTF-8', 'X-APP-ID': '503258978847965388', 'Content-Length': '60'}
|
|
body={"accountType":2,"account":"13000000000","captcha":"888888"}
|
|
</msg>
|
|
<msg timestamp="20210820 09:34:13.484" 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': 'Fri, 20 Aug 2021 01:34:13 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":"iHP4V/g6O5DXHixyNrf7tnXugE03gmmVVVkL14dTnSjOdnz5PfKBQMV41s9Bon5v","userId":"4163"}}
|
|
</msg>
|
|
<msg timestamp="20210820 09:34:13.485" level="INFO">${response} = <Response [200]></msg>
|
|
<status status="PASS" starttime="20210820 09:34:13.408" endtime="20210820 09:34:13.485"></status>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<arguments>
|
|
<arg>${response.status_code}</arg>
|
|
</arguments>
|
|
<msg timestamp="20210820 09:34:13.486" level="INFO">200</msg>
|
|
<status status="PASS" starttime="20210820 09:34:13.485" endtime="20210820 09:34:13.486"></status>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<arguments>
|
|
<arg>${response.text}</arg>
|
|
</arguments>
|
|
<msg timestamp="20210820 09:34:13.486" level="INFO">{"code":0,"message":"successful","data":{"token":"iHP4V/g6O5DXHixyNrf7tnXugE03gmmVVVkL14dTnSjOdnz5PfKBQMV41s9Bon5v","userId":"4163"}}</msg>
|
|
<status status="PASS" starttime="20210820 09:34:13.486" endtime="20210820 09:34:13.486"></status>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<arguments>
|
|
<arg>${response.json()}</arg>
|
|
</arguments>
|
|
<msg timestamp="20210820 09:34:13.487" level="INFO">{'code': 0, 'message': 'successful', 'data': {'token': 'iHP4V/g6O5DXHixyNrf7tnXugE03gmmVVVkL14dTnSjOdnz5PfKBQMV41s9Bon5v', 'userId': '4163'}}</msg>
|
|
<status status="PASS" starttime="20210820 09:34:13.487" endtime="20210820 09:34:13.487"></status>
|
|
</kw>
|
|
<kw name="Should Be Equal As Numbers" library="BuiltIn">
|
|
<doc>Fails if objects are unequal after converting them to real numbers.</doc>
|
|
<arguments>
|
|
<arg>200</arg>
|
|
<arg>${response.status_code}</arg>
|
|
</arguments>
|
|
<msg timestamp="20210820 09:34:13.488" level="INFO">Argument types are:
|
|
<type 'unicode'>
|
|
<class 'int'></msg>
|
|
<status status="PASS" starttime="20210820 09:34:13.487" endtime="20210820 09:34:13.488"></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>successful</arg>
|
|
<arg>${response.json()["message"]}</arg>
|
|
</arguments>
|
|
<status status="PASS" starttime="20210820 09:34:13.488" endtime="20210820 09:34:13.488"></status>
|
|
</kw>
|
|
<status status="PASS" starttime="20210820 09:34:13.405" endtime="20210820 09:34:13.488" critical="yes"></status>
|
|
</test>
|
|
<status status="PASS" starttime="20210820 09:34:13.276" endtime="20210820 09:34:13.489"></status>
|
|
</suite>
|
|
<statistics>
|
|
<total>
|
|
<stat pass="1" fail="0">Critical Tests</stat>
|
|
<stat pass="1" fail="0">All Tests</stat>
|
|
</total>
|
|
<tag>
|
|
</tag>
|
|
<suite>
|
|
<stat pass="1" fail="0" id="s1" name="Login Get Info">Login Get Info</stat>
|
|
</suite>
|
|
</statistics>
|
|
<errors>
|
|
</errors>
|
|
</robot>
|