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.
335 lines
16 KiB
335 lines
16 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<robot rpa="false" generated="20211119 10:45:59.419" schemaversion="2" generator="Robot 4.1.2 (Python 2.7.5 on linux2)">
|
|
<suite source="/root/ztb-trading-rf-api/ztb-trading-rf-api/1-Client(Test)/2.2createActiveorder-1.robot" id="s1" name="2.2createActiveorder-1">
|
|
<test id="s1-t1" name="proxy-sell-activity_list">
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<arg>ZTBT</arg>
|
|
<arg>${url}</arg>
|
|
<arg>${headers}</arg>
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<msg timestamp="20211119 10:45:59.547" level="FAIL">Variable '${headers}' not found.</msg>
|
|
<status status="FAIL" endtime="20211119 10:45:59.547" starttime="20211119 10:45:59.544"/>
|
|
</kw>
|
|
<kw name="GET On Session" library="RequestsLibrary">
|
|
<var>${repsponse}</var>
|
|
<arg>ZTBT</arg>
|
|
<arg>recycle-service/proxy-sell-activity/list</arg>
|
|
<arg>params=pageNum=1&pageSize=15</arg>
|
|
<doc>Sends a GET request on a previously created HTTP Session.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.548" starttime="20211119 10:45:59.548"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${records}</var>
|
|
<arg>${repsponse.json()["data"]}</arg>
|
|
<arg>records</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.549" starttime="20211119 10:45:59.548"/>
|
|
</kw>
|
|
<for flavor="IN">
|
|
<var>${item}</var>
|
|
<value>@{records}</value>
|
|
<iter>
|
|
<var name="${item}">${item}</var>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${activityName}</var>
|
|
<arg>${item}</arg>
|
|
<arg>activityName</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.549" starttime="20211119 10:45:59.549"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${paperCategoryList}</var>
|
|
<arg>${item}</arg>
|
|
<arg>paperCategoryList</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.550" starttime="20211119 10:45:59.550"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${paperMillId}</var>
|
|
<arg>${item}</arg>
|
|
<arg>paperMillId</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.550" starttime="20211119 10:45:59.550"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${activityId}</var>
|
|
<arg>${item}</arg>
|
|
<arg>activityId</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.551" starttime="20211119 10:45:59.550"/>
|
|
</kw>
|
|
<kw name="Exit For Loop If" library="BuiltIn">
|
|
<arg>'${activityName}'=='无账期活动一次'</arg>
|
|
<doc>Stops executing the enclosing for loop if the ``condition`` is true.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.551" starttime="20211119 10:45:59.551"/>
|
|
</kw>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.551" starttime="20211119 10:45:59.549"/>
|
|
</iter>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.551" starttime="20211119 10:45:59.549"/>
|
|
</for>
|
|
<kw name="Evaluate" library="BuiltIn">
|
|
<var>${Category_value}</var>
|
|
<arg>random.choice(${paperCategoryList})</arg>
|
|
<arg>random</arg>
|
|
<doc>Evaluates the given expression in Python and returns the result.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.552" starttime="20211119 10:45:59.551"/>
|
|
</kw>
|
|
<kw name="Log To Console" library="BuiltIn">
|
|
<arg>\nvalue: ${Category_value}</arg>
|
|
<doc>Logs the given message to the console.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.552" starttime="20211119 10:45:59.552"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${categoryId}</var>
|
|
<arg>${Category_value}</arg>
|
|
<arg>categoryId</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.552" starttime="20211119 10:45:59.552"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${categoryName}</var>
|
|
<arg>${Category_value}</arg>
|
|
<arg>categoryName</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.553" starttime="20211119 10:45:59.553"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${unitPrice}</var>
|
|
<arg>${Category_value}</arg>
|
|
<arg>unitPrice</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.553" starttime="20211119 10:45:59.553"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${paperMillId}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.554" starttime="20211119 10:45:59.554"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${activityId}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.554" starttime="20211119 10:45:59.554"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${categoryId}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.554" starttime="20211119 10:45:59.554"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${categoryName}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.555" starttime="20211119 10:45:59.555"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${unitPrice}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.555" starttime="20211119 10:45:59.555"/>
|
|
</kw>
|
|
<status status="FAIL" endtime="20211119 10:45:59.555" starttime="20211119 10:45:59.543">Variable '${headers}' not found.</status>
|
|
</test>
|
|
<test id="s1-t2" name="get-carinfo">
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<arg>get-carinfo</arg>
|
|
<arg>${url}</arg>
|
|
<arg>${headers}</arg>
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<msg timestamp="20211119 10:45:59.558" level="FAIL">Variable '${headers}' not found.</msg>
|
|
<status status="FAIL" endtime="20211119 10:45:59.558" starttime="20211119 10:45:59.556"/>
|
|
</kw>
|
|
<kw name="GET On Session" library="RequestsLibrary">
|
|
<var>${reps}</var>
|
|
<arg>get-carinfo</arg>
|
|
<arg>recycle-service/proxy-sell/get/his-car-info</arg>
|
|
<doc>Sends a GET request on a previously created HTTP Session.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.559" starttime="20211119 10:45:59.559"/>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<arg>${reps.json()}</arg>
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.559" starttime="20211119 10:45:59.559"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${carNumber}</var>
|
|
<arg>${reps.json()["data"]}</arg>
|
|
<arg>records</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.559" starttime="20211119 10:45:59.559"/>
|
|
</kw>
|
|
<kw name="Evaluate" library="BuiltIn">
|
|
<var>${plateNumber_value}</var>
|
|
<arg>random.sample(${carNumber},1)</arg>
|
|
<arg>random</arg>
|
|
<doc>Evaluates the given expression in Python and returns the result.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.559" starttime="20211119 10:45:59.559"/>
|
|
</kw>
|
|
<kw name="Log To Console" library="BuiltIn">
|
|
<arg>\nvalue:${plateNumber_value}</arg>
|
|
<doc>Logs the given message to the console.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.560" starttime="20211119 10:45:59.560"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${plateNumber1}</var>
|
|
<arg>${plateNumber_value[0]}</arg>
|
|
<arg>plateNumber</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.561" starttime="20211119 10:45:59.560"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${plateNumber1}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.561" starttime="20211119 10:45:59.561"/>
|
|
</kw>
|
|
<status status="FAIL" endtime="20211119 10:45:59.562" starttime="20211119 10:45:59.556">Variable '${headers}' not found.</status>
|
|
</test>
|
|
<test id="s1-t3" name="get_paper-mill-paper-category-price-details">
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<arg>ZTBT</arg>
|
|
<arg>${url}</arg>
|
|
<arg>${headers}</arg>
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<msg timestamp="20211119 10:45:59.566" level="FAIL">Variable '${headers}' not found.</msg>
|
|
<status status="FAIL" endtime="20211119 10:45:59.566" starttime="20211119 10:45:59.564"/>
|
|
</kw>
|
|
<kw name="GET On Session" library="RequestsLibrary">
|
|
<var>${reps}</var>
|
|
<arg>ZTBT</arg>
|
|
<arg>recycle-service/get/paper-mill-paper-category-price-details/${paperMillId}</arg>
|
|
<doc>Sends a GET request on a previously created HTTP Session.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.566" starttime="20211119 10:45:59.566"/>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<arg>${reps.json()}</arg>
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.566" starttime="20211119 10:45:59.566"/>
|
|
</kw>
|
|
<status status="FAIL" endtime="20211119 10:45:59.567" starttime="20211119 10:45:59.563">Variable '${headers}' not found.</status>
|
|
</test>
|
|
<test id="s1-t4" name="get_relation">
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<arg>ZTBT</arg>
|
|
<arg>${url}</arg>
|
|
<arg>${headers}</arg>
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<msg timestamp="20211119 10:45:59.570" level="FAIL">Variable '${headers}' not found.</msg>
|
|
<status status="FAIL" endtime="20211119 10:45:59.570" starttime="20211119 10:45:59.568"/>
|
|
</kw>
|
|
<kw name="GET On Session" library="RequestsLibrary">
|
|
<var>${reps}</var>
|
|
<arg>ZTBT</arg>
|
|
<arg>recycle-service/proxy-sell/get/relation</arg>
|
|
<doc>Sends a GET request on a previously created HTTP Session.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.571" starttime="20211119 10:45:59.571"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${bizUserId}</var>
|
|
<arg>${reps.json()["data"]}</arg>
|
|
<arg>bizUserId</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.571" starttime="20211119 10:45:59.571"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${cusormerId}</var>
|
|
<arg>${reps.json()["data"]}</arg>
|
|
<arg>cusormerId</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.571" starttime="20211119 10:45:59.571"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${customerName}</var>
|
|
<arg>${reps.json()["data"]}</arg>
|
|
<arg>customerName</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.572" starttime="20211119 10:45:59.571"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${bizUserId}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.572" starttime="20211119 10:45:59.572"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${cusormerId}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.572" starttime="20211119 10:45:59.572"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${customerName}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.572" starttime="20211119 10:45:59.572"/>
|
|
</kw>
|
|
<status status="FAIL" endtime="20211119 10:45:59.573" starttime="20211119 10:45:59.567">Variable '${headers}' not found.</status>
|
|
</test>
|
|
<test id="s1-t5" name="create_order">
|
|
<kw name="Create Session" library="RequestsLibrary">
|
|
<arg>ZTBT</arg>
|
|
<arg>${url}</arg>
|
|
<arg>${headers}</arg>
|
|
<doc>Create Session: create a HTTP session to a server</doc>
|
|
<msg timestamp="20211119 10:45:59.576" level="FAIL">Variable '${headers}' not found.</msg>
|
|
<status status="FAIL" endtime="20211119 10:45:59.576" starttime="20211119 10:45:59.574"/>
|
|
</kw>
|
|
<kw name="Get Current Date" library="DateTime">
|
|
<var>${datatime}</var>
|
|
<arg>result_format=%Y-%m-%d</arg>
|
|
<doc>Returns current local or UTC time with an optional increment.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.576" starttime="20211119 10:45:59.576"/>
|
|
</kw>
|
|
<kw name="Set Variable" library="BuiltIn">
|
|
<var>${order_data}</var>
|
|
<arg>{ \ \ \ \ "paperCategoryId":"${categoryId}", \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ "totalEstimatedWeight":30000, \ \ \ \ "activityId":"${activityId}", \ \ \ \ "customerName":"${customerName}", \ \ \ \ "deliveryTime":"${datatime}", \ \ \ \ "carInfos":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "plateNumber":"${plateNumber1}" \ \ \ \ \ \ \ \ } \ \ \ \ ] }</arg>
|
|
<doc>Returns the given values which can then be assigned to a variables.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.577" starttime="20211119 10:45:59.577"/>
|
|
</kw>
|
|
<kw name="POST On Session" library="RequestsLibrary">
|
|
<var>${reps}</var>
|
|
<arg>ZTBT</arg>
|
|
<arg>recycle-service/proxy-sell/create/order</arg>
|
|
<arg>${order_data.encode('utf-8')}</arg>
|
|
<doc>Sends a POST request on a previously created HTTP Session.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.577" starttime="20211119 10:45:59.577"/>
|
|
</kw>
|
|
<kw name="Log" library="BuiltIn">
|
|
<arg>${reps.json()}</arg>
|
|
<doc>Logs the given message with the given level.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.577" starttime="20211119 10:45:59.577"/>
|
|
</kw>
|
|
<kw name="Get From Dictionary" library="Collections">
|
|
<var>${orderId}</var>
|
|
<arg>${reps.json()["data"]}</arg>
|
|
<arg>orderId</arg>
|
|
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.578" starttime="20211119 10:45:59.577"/>
|
|
</kw>
|
|
<kw name="Should Be Equal As Strings" library="BuiltIn">
|
|
<arg>${reps.json()["message"]}</arg>
|
|
<arg>successful</arg>
|
|
<doc>Fails if objects are unequal after converting them to strings.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.578" starttime="20211119 10:45:59.578"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${orderId}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.578" starttime="20211119 10:45:59.578"/>
|
|
</kw>
|
|
<kw name="Set Global Variable" library="BuiltIn">
|
|
<arg>${datatime}</arg>
|
|
<doc>Makes a variable available globally in all tests and suites.</doc>
|
|
<status status="NOT RUN" endtime="20211119 10:45:59.578" starttime="20211119 10:45:59.578"/>
|
|
</kw>
|
|
<status status="FAIL" endtime="20211119 10:45:59.579" starttime="20211119 10:45:59.573">Variable '${headers}' not found.</status>
|
|
</test>
|
|
<status status="FAIL" endtime="20211119 10:45:59.580" starttime="20211119 10:45:59.420"/>
|
|
</suite>
|
|
<statistics>
|
|
<total>
|
|
<stat fail="5" skip="0" pass="0">All Tests</stat>
|
|
</total>
|
|
<tag>
|
|
</tag>
|
|
<suite>
|
|
<stat fail="5" skip="0" id="s1" name="2.2createActiveorder-1" pass="0">2.2createActiveorder-1</stat>
|
|
</suite>
|
|
</statistics>
|
|
<errors>
|
|
<msg timestamp="20211119 10:45:59.541" level="ERROR">Error in file '/root/ztb-trading-rf-api/ztb-trading-rf-api/1-Client(Test)/2.2createActiveorder-1.robot' on line 8: Setting variable '${headers}' failed: Variable '${gettoken}' not found.</msg>
|
|
</errors>
|
|
</robot>
|