Browse Source

new report file

master
梁金满 4 years ago
parent
commit
9cd4dfcba4
4 changed files with 54 additions and 58 deletions
  1. 3
      __init__.robot
  2. 10
      log.html
  3. 93
      output.xml
  4. 6
      report.html

3
__init__.robot

@ -3,6 +3,3 @@ Library RequestsLibrary
Library Collections
Library urllib3
*** Variables ***
&{cloud_factory_header} Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965388
{operation_backend_header} Content-Type=application/x-www-form-urlencoded

10
log.html
File diff suppressed because it is too large
View File

93
output.xml

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 3.1.2 (Python 3.6.8 on linux)" generated="20210820 15:13:34.897" rpa="false">
<robot generator="Robot 3.1.2 (Python 3.6.8 on linux)" generated="20210820 15:15:02.253" rpa="false">
<suite id="s1" name="Yyt-Trading-Rf-Api" source="/root/yyt-trading-rf-api">
<suite id="s1-s1" name="Login Get Info" source="/root/yyt-trading-rf-api/login_get_info">
<suite id="s1-s1-s1" name="Login Customer" source="/root/yyt-trading-rf-api/login_get_info/login_customer.robot">
<test id="s1-s1-s1-t1" name="customer_phone">
<kw name="Disable Warnings" library="urllib3">
<doc>Helper for quickly disabling all urllib3 warnings.</doc>
<status status="PASS" starttime="20210820 15:13:35.038" endtime="20210820 15:13:35.039"></status>
<status status="PASS" starttime="20210820 15:15:02.369" endtime="20210820 15:15:02.370"></status>
</kw>
<kw name="Create Session" library="RequestsLibrary">
<doc>Create Session: create a HTTP session to a server</doc>
@ -15,8 +15,8 @@
<arg>https://api-client-uec-test.qniao.cn</arg>
<arg>headers=${cloud_factory_header}</arg>
</arguments>
<msg timestamp="20210820 15:13:35.039" 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 15:13:35.039" endtime="20210820 15:13:35.040"></status>
<msg timestamp="20210820 15:15:02.370" 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 15:15:02.370" endtime="20210820 15:15:02.370"></status>
</kw>
<kw name="Set Variable" library="BuiltIn">
<doc>Returns the given values which can then be assigned to a variables.</doc>
@ -26,8 +26,8 @@
<assign>
<var>${body}</var>
</assign>
<msg timestamp="20210820 15:13:35.040" level="INFO">${body} = {"accountType":2,"account":"13000000000","captcha":"888888"}</msg>
<status status="PASS" starttime="20210820 15:13:35.040" endtime="20210820 15:13:35.040"></status>
<msg timestamp="20210820 15:15:02.371" level="INFO">${body} = {"accountType":2,"account":"13000000000","captcha":"888888"}</msg>
<status status="PASS" starttime="20210820 15:15:02.371" endtime="20210820 15:15:02.371"></status>
</kw>
<kw name="Post On Session" library="RequestsLibrary">
<doc>Sends a POST request on a previously created HTTP Session.</doc>
@ -39,42 +39,42 @@
<assign>
<var>${response}</var>
</assign>
<msg timestamp="20210820 15:13:35.113" level="INFO">POST Request : url=https://api-client-uec-test.qniao.cn/uec/authorize/by-captcha
<msg timestamp="20210820 15:15:02.447" 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 15:13:35.113" level="INFO">POST Response : url=https://api-client-uec-test.qniao.cn/uec/authorize/by-captcha
<msg timestamp="20210820 15:15:02.447" 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 07:13:35 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/g6O5DXHixyNrf7tnXugE03gmmVVVkL14dTnShiazjqAEnZIkRukwGrw5XW","userId":"4163"}}
headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 20 Aug 2021 07:15:02 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/g6O5DXHixyNrf7tnXugE03gmmVVVkL14dTnSjr5JOnrrEUcLJR93RJg65m","userId":"4163"}}
</msg>
<msg timestamp="20210820 15:13:35.113" level="INFO">${response} = &lt;Response [200]&gt;</msg>
<status status="PASS" starttime="20210820 15:13:35.040" endtime="20210820 15:13:35.113"></status>
<msg timestamp="20210820 15:15:02.447" level="INFO">${response} = &lt;Response [200]&gt;</msg>
<status status="PASS" starttime="20210820 15:15:02.371" endtime="20210820 15:15:02.447"></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 15:13:35.114" level="INFO">200</msg>
<status status="PASS" starttime="20210820 15:13:35.113" endtime="20210820 15:13:35.114"></status>
<msg timestamp="20210820 15:15:02.448" level="INFO">200</msg>
<status status="PASS" starttime="20210820 15:15:02.447" endtime="20210820 15:15:02.448"></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 15:13:35.115" level="INFO">{"code":0,"message":"successful","data":{"token":"iHP4V/g6O5DXHixyNrf7tnXugE03gmmVVVkL14dTnShiazjqAEnZIkRukwGrw5XW","userId":"4163"}}</msg>
<status status="PASS" starttime="20210820 15:13:35.114" endtime="20210820 15:13:35.115"></status>
<msg timestamp="20210820 15:15:02.449" level="INFO">{"code":0,"message":"successful","data":{"token":"iHP4V/g6O5DXHixyNrf7tnXugE03gmmVVVkL14dTnSjr5JOnrrEUcLJR93RJg65m","userId":"4163"}}</msg>
<status status="PASS" starttime="20210820 15:15:02.448" endtime="20210820 15:15:02.449"></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 15:13:35.115" level="INFO">{'code': 0, 'message': 'successful', 'data': {'token': 'iHP4V/g6O5DXHixyNrf7tnXugE03gmmVVVkL14dTnShiazjqAEnZIkRukwGrw5XW', 'userId': '4163'}}</msg>
<status status="PASS" starttime="20210820 15:13:35.115" endtime="20210820 15:13:35.116"></status>
<msg timestamp="20210820 15:15:02.449" level="INFO">{'code': 0, 'message': 'successful', 'data': {'token': 'iHP4V/g6O5DXHixyNrf7tnXugE03gmmVVVkL14dTnSjr5JOnrrEUcLJR93RJg65m', 'userId': '4163'}}</msg>
<status status="PASS" starttime="20210820 15:15:02.449" endtime="20210820 15:15:02.449"></status>
</kw>
<kw name="Should Be Equal As Numbers" library="BuiltIn">
<doc>Fails if objects are unequal after converting them to real numbers.</doc>
@ -82,10 +82,10 @@
<arg>200</arg>
<arg>${response.status_code}</arg>
</arguments>
<msg timestamp="20210820 15:13:35.116" level="INFO">Argument types are:
<msg timestamp="20210820 15:15:02.450" level="INFO">Argument types are:
&lt;type 'unicode'&gt;
&lt;class 'int'&gt;</msg>
<status status="PASS" starttime="20210820 15:13:35.116" endtime="20210820 15:13:35.116"></status>
<status status="PASS" starttime="20210820 15:15:02.450" endtime="20210820 15:15:02.450"></status>
</kw>
<kw name="Should Be Equal As Strings" library="BuiltIn">
<doc>Fails if objects are unequal after converting them to strings.</doc>
@ -93,17 +93,17 @@
<arg>successful</arg>
<arg>${response.json()["message"]}</arg>
</arguments>
<status status="PASS" starttime="20210820 15:13:35.116" endtime="20210820 15:13:35.117"></status>
<status status="PASS" starttime="20210820 15:15:02.450" endtime="20210820 15:15:02.451"></status>
</kw>
<status status="PASS" starttime="20210820 15:13:35.038" endtime="20210820 15:13:35.117" critical="yes"></status>
<status status="PASS" starttime="20210820 15:15:02.369" endtime="20210820 15:15:02.451" critical="yes"></status>
</test>
<status status="PASS" starttime="20210820 15:13:35.034" endtime="20210820 15:13:35.117"></status>
<status status="PASS" starttime="20210820 15:15:02.365" endtime="20210820 15:15:02.451"></status>
</suite>
<suite id="s1-s1-s2" name="Login Operate" source="/root/yyt-trading-rf-api/login_get_info/login_operate.robot">
<test id="s1-s1-s2-t1" name="operate_mail">
<kw name="Disable Warnings" library="urllib3">
<doc>Helper for quickly disabling all urllib3 warnings.</doc>
<status status="PASS" starttime="20210820 15:13:35.122" endtime="20210820 15:13:35.122"></status>
<status status="PASS" starttime="20210820 15:15:02.457" endtime="20210820 15:15:02.458"></status>
</kw>
<kw name="Create Session" library="RequestsLibrary">
<doc>Create Session: create a HTTP session to a server</doc>
@ -112,8 +112,8 @@
<arg>http://api-ops-yyt-test.qniao.cn</arg>
<arg>headers=${operation_backend_header}</arg>
</arguments>
<msg timestamp="20210820 15:13:35.122" level="INFO">Creating Session using : alias=yytops, url=http://api-ops-yyt-test.qniao.cn, headers={'Content-Type': 'application/x-www-form-urlencoded'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg>
<status status="PASS" starttime="20210820 15:13:35.122" endtime="20210820 15:13:35.123"></status>
<msg timestamp="20210820 15:15:02.458" level="INFO">Creating Session using : alias=yytops, url=http://api-ops-yyt-test.qniao.cn, headers={'Content-Type': 'application/x-www-form-urlencoded'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 </msg>
<status status="PASS" starttime="20210820 15:15:02.458" endtime="20210820 15:15:02.459"></status>
</kw>
<kw name="Create Dictionary" library="BuiltIn">
<doc>Creates and returns a dictionary based on the given ``items``.</doc>
@ -124,8 +124,8 @@
<assign>
<var>&amp;{data}</var>
</assign>
<msg timestamp="20210820 15:13:35.123" level="INFO">&amp;{data} = { username=liangjinman@qniao.cn | password=qn123456 }</msg>
<status status="PASS" starttime="20210820 15:13:35.123" endtime="20210820 15:13:35.123"></status>
<msg timestamp="20210820 15:15:02.460" level="INFO">&amp;{data} = { username=liangjinman@qniao.cn | password=qn123456 }</msg>
<status status="PASS" starttime="20210820 15:15:02.459" endtime="20210820 15:15:02.460"></status>
</kw>
<kw name="Post On Session" library="RequestsLibrary">
<doc>Sends a POST request on a previously created HTTP Session.</doc>
@ -137,42 +137,42 @@
<assign>
<var>${resp}</var>
</assign>
<msg timestamp="20210820 15:13:35.252" level="INFO">POST Request : url=http://api-ops-yyt-test.qniao.cn/cloud-factory-operation-backend/admin/login
<msg timestamp="20210820 15:15:02.591" level="INFO">POST Request : url=http://api-ops-yyt-test.qniao.cn/cloud-factory-operation-backend/admin/login
path_url=/cloud-factory-operation-backend/admin/login
headers={'User-Agent': 'python-requests/2.26.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': '49'}
body=username=liangjinman%40qniao.cn&amp;password=qn123456
</msg>
<msg timestamp="20210820 15:13:35.252" level="INFO">POST Response : url=http://api-ops-yyt-test.qniao.cn/cloud-factory-operation-backend/admin/login
<msg timestamp="20210820 15:15:02.591" level="INFO">POST Response : url=http://api-ops-yyt-test.qniao.cn/cloud-factory-operation-backend/admin/login
status=200, reason=
headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 20 Aug 2021 07:13:35 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 4a8bb5b51207941b91dfa6f617504a38', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'X-Frame-Options': 'DENY'}
headers={'Server': 'nginx/1.16.1', 'Date': 'Fri, 20 Aug 2021 07:15:02 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 4a8bb5b51207941b91dfa6f617504a38', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'X-Frame-Options': 'DENY'}
body={"code":200,"message":"登陆成功"}
</msg>
<msg timestamp="20210820 15:13:35.253" level="INFO">${resp} = &lt;Response [200]&gt;</msg>
<status status="PASS" starttime="20210820 15:13:35.124" endtime="20210820 15:13:35.253"></status>
<msg timestamp="20210820 15:15:02.592" level="INFO">${resp} = &lt;Response [200]&gt;</msg>
<status status="PASS" starttime="20210820 15:15:02.460" endtime="20210820 15:15:02.592"></status>
</kw>
<kw name="Log" library="BuiltIn">
<doc>Logs the given message with the given level.</doc>
<arguments>
<arg>${resp.status_code}</arg>
</arguments>
<msg timestamp="20210820 15:13:35.254" level="INFO">200</msg>
<status status="PASS" starttime="20210820 15:13:35.253" endtime="20210820 15:13:35.254"></status>
<msg timestamp="20210820 15:15:02.593" level="INFO">200</msg>
<status status="PASS" starttime="20210820 15:15:02.593" endtime="20210820 15:15:02.593"></status>
</kw>
<kw name="Log" library="BuiltIn">
<doc>Logs the given message with the given level.</doc>
<arguments>
<arg>${resp.text}</arg>
</arguments>
<msg timestamp="20210820 15:13:35.255" level="INFO">{"code":200,"message":"登陆成功"}</msg>
<status status="PASS" starttime="20210820 15:13:35.254" endtime="20210820 15:13:35.255"></status>
<msg timestamp="20210820 15:15:02.594" level="INFO">{"code":200,"message":"登陆成功"}</msg>
<status status="PASS" starttime="20210820 15:15:02.594" endtime="20210820 15:15:02.594"></status>
</kw>
<kw name="Log" library="BuiltIn">
<doc>Logs the given message with the given level.</doc>
<arguments>
<arg>${resp.json()}</arg>
</arguments>
<msg timestamp="20210820 15:13:35.255" level="INFO">{'code': 200, 'message': '登陆成功'}</msg>
<status status="PASS" starttime="20210820 15:13:35.255" endtime="20210820 15:13:35.255"></status>
<msg timestamp="20210820 15:15:02.595" level="INFO">{'code': 200, 'message': '登陆成功'}</msg>
<status status="PASS" starttime="20210820 15:15:02.594" endtime="20210820 15:15:02.595"></status>
</kw>
<kw name="Should Be Equal As Numbers" library="BuiltIn">
<doc>Fails if objects are unequal after converting them to real numbers.</doc>
@ -180,10 +180,10 @@
<arg>200</arg>
<arg>${resp.status_code}</arg>
</arguments>
<msg timestamp="20210820 15:13:35.256" level="INFO">Argument types are:
<msg timestamp="20210820 15:15:02.595" level="INFO">Argument types are:
&lt;type 'unicode'&gt;
&lt;class 'int'&gt;</msg>
<status status="PASS" starttime="20210820 15:13:35.256" endtime="20210820 15:13:35.256"></status>
<status status="PASS" starttime="20210820 15:15:02.595" endtime="20210820 15:15:02.596"></status>
</kw>
<kw name="Should Be Equal As Strings" library="BuiltIn">
<doc>Fails if objects are unequal after converting them to strings.</doc>
@ -191,15 +191,15 @@
<arg>登陆成功</arg>
<arg>${resp.json()["message"]}</arg>
</arguments>
<status status="PASS" starttime="20210820 15:13:35.256" endtime="20210820 15:13:35.257"></status>
<status status="PASS" starttime="20210820 15:15:02.596" endtime="20210820 15:15:02.596"></status>
</kw>
<status status="PASS" starttime="20210820 15:13:35.121" endtime="20210820 15:13:35.257" critical="yes"></status>
<status status="PASS" starttime="20210820 15:15:02.457" endtime="20210820 15:15:02.596" critical="yes"></status>
</test>
<status status="PASS" starttime="20210820 15:13:35.118" endtime="20210820 15:13:35.257"></status>
<status status="PASS" starttime="20210820 15:15:02.452" endtime="20210820 15:15:02.597"></status>
</suite>
<status status="PASS" starttime="20210820 15:13:35.031" endtime="20210820 15:13:35.258"></status>
<status status="PASS" starttime="20210820 15:15:02.361" endtime="20210820 15:15:02.598"></status>
</suite>
<status status="PASS" starttime="20210820 15:13:34.898" endtime="20210820 15:13:35.258"></status>
<status status="PASS" starttime="20210820 15:15:02.254" endtime="20210820 15:15:02.599"></status>
</suite>
<statistics>
<total>
@ -216,6 +216,5 @@
</suite>
</statistics>
<errors>
<msg timestamp="20210820 15:13:34.899" level="ERROR">Error in file '/root/yyt-trading-rf-api': Setting variable '{operation_backend_header}' failed: Invalid variable name '{operation_backend_header}'.</msg>
</errors>
</robot>

6
report.html

@ -1585,7 +1585,7 @@ storage = function () {
window.output = {};
</script>
<script type="text/javascript">
window.output["suite"] = [1,2,3,0,[],[1,0,360],[[4,5,6,0,[],[1,133,227],[[7,8,9,0,[],[1,136,83],[],[[10,0,1,0,[],[1,140,79],[]]],[],[1,1,1,1]],[11,12,13,0,[],[1,220,139],[],[[14,0,1,0,[],[1,223,136],[]]],[],[1,1,1,1]]],[],[],[2,2,2,2]]],[],[],[2,2,2,2]];
window.output["suite"] = [1,2,3,0,[],[1,0,345],[[4,5,6,0,[],[1,107,237],[[7,8,9,0,[],[1,111,86],[],[[10,0,1,0,[],[1,115,82],[]]],[],[1,1,1,1]],[11,12,13,0,[],[1,198,145],[],[[14,0,1,0,[],[1,203,139],[]]],[],[1,1,1,1]]],[],[],[2,2,2,2]]],[],[],[2,2,2,2]];
</script>
<script type="text/javascript">
window.output["strings"] = [];
@ -1597,10 +1597,10 @@ window.output["strings"] = window.output["strings"].concat(["*","*Yyt-Trading-Rf
window.output["stats"] = [[{"elapsed":"00:00:00","fail":0,"label":"Critical Tests","pass":2},{"elapsed":"00:00:00","fail":0,"label":"All Tests","pass":2}],[],[{"elapsed":"00:00:00","fail":0,"id":"s1","label":"Yyt-Trading-Rf-Api","name":"Yyt-Trading-Rf-Api","pass":2},{"elapsed":"00:00:00","fail":0,"id":"s1-s1","label":"Yyt-Trading-Rf-Api.Login Get Info","name":"Login Get Info","pass":2},{"elapsed":"00:00:00","fail":0,"id":"s1-s1-s1","label":"Yyt-Trading-Rf-Api.Login Get Info.Login Customer","name":"Login Customer","pass":1},{"elapsed":"00:00:00","fail":0,"id":"s1-s1-s2","label":"Yyt-Trading-Rf-Api.Login Get Info.Login Operate","name":"Login Operate","pass":1}]];
</script>
<script type="text/javascript">
window.output["baseMillis"] = 1629443614898;
window.output["baseMillis"] = 1629443702254;
</script>
<script type="text/javascript">
window.output["generated"] = 369;
window.output["generated"] = 354;
</script>
<script type="text/javascript">
window.settings = {"background":{"fail":"#f66","nonCriticalFail":"#9e9","pass":"#9e9"},"logURL":"log.html","rpa":false,"title":""};

Loading…
Cancel
Save