From 89420a9aa35a907390e54f9a1956f4657d106524 Mon Sep 17 00:00:00 2001 From: dongxiaoyan Date: Tue, 7 Apr 2020 18:20:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- log.html | 2125 -------------------------------------------- output.xml | 2265 ----------------------------------------------- report.html | 2431 --------------------------------------------------- 3 files changed, 6821 deletions(-) delete mode 100644 log.html delete mode 100644 output.xml delete mode 100644 report.html diff --git a/log.html b/log.html deleted file mode 100644 index fc7eb18..0000000 --- a/log.html +++ /dev/null @@ -1,2125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Opening Robot Framework log failed

- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/output.xml b/output.xml deleted file mode 100644 index 6eaea68..0000000 --- a/output.xml +++ /dev/null @@ -1,2265 +0,0 @@ - - - - - - -${ip} - -${ip} = 192.168.41.123 - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -'${ip}' != '${EMPTY}' -Set Global Variable -${testClentIP} -${ip} - - -Makes a variable available globally in all tests and suites. - -${testClentIP} -${ip} - -${testClentIP} = 192.168.41.123 - - - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -'${loginType}' == 'api' -ApiLoginAndAddLocalIP -aa -ELSE IF -'${loginType}' == 'cli' -CliLogin -ELSE -UiLoginAndAaddLocalIP -bb - - - -aa - - -Logs the given message with the given level. - -ApiLoginAndAddLocalIP${tempparm} - -ApiLoginAndAddLocalIPaa - - - - - -http - -*Sends a GET request to the endpoint.* - -/v1/user/encryptpwd?password=${password} - - - - - -assertions - -*Asserts the field as JSON object.* - -response body - - - - - -assertions - -*Asserts the field as JSON integer.* - -$.code -200 - - - - - -assertions - -*Asserts the field as JSON string.* - -$.data.encryptpwd - - -${pwd} - -${pwd} = ['Gg1Etyh7fs1y/v/K2XOJDg=='] - - - -Returns the value specified with an ``index`` from ``list``. - -${pwd} -0 - - -${pwdstr} - -${pwdstr} = Gg1Etyh7fs1y/v/K2XOJDg== - - - -Logs the given message with the given level. - -${pwdstr} - -Gg1Etyh7fs1y/v/K2XOJDg== - - - -Makes a variable available globally in all tests and suites. - -${encodePassword} -${pwdstr} - -${encodePassword} = Gg1Etyh7fs1y/v/K2XOJDg== - - - -Logs the given message with the given level. - -${encodePassword} - -Gg1Etyh7fs1y/v/K2XOJDg== - - - - -http - -*Sends a POST request to the endpoint.* - -/v1/user/login?username=${username}&password=${encodePassword}&authMode=${authmode} - - - - - -assertions - -*Asserts the field as JSON object.* - -response body - - - - - -assertions - -*Asserts the field as JSON integer.* - -$.code -200 - - - - - -assertions - -*Asserts the field as JSON integer.* - -$.code - - -${rescode} - -${rescode} = [200] - - - -Logs the given message with the given level. - -${rescode} - -[200] - - - - -assertions - -*Asserts the field as JSON string.* - -$.data.token - - -${tokenGlobal} - -${tokenGlobal} = ['db2191ca-37cd-43b8-ad59-c0450c489c81&981&'] - - - -Returns the value specified with an ``index`` from ``list``. - -${tokenGlobal} -0 - - -${tokenStr} - -${tokenStr} = db2191ca-37cd-43b8-ad59-c0450c489c81&981& - - - -Logs the given message with the given level. - -${tokenStr} - -db2191ca-37cd-43b8-ad59-c0450c489c81&981& - - - -Makes a variable available globally in all tests and suites. - -${token} -${tokenStr} - -${token} = db2191ca-37cd-43b8-ad59-c0450c489c81&981& - - - -Logs the given message with the given level. - -${token} - -db2191ca-37cd-43b8-ad59-c0450c489c81&981& - - - -Makes a variable available globally in all tests and suites. - -${headers} -{"Contest-Type":"application/json","Authorization":"${token}"} - -${headers} = {"Contest-Type":"application/json","Authorization":"db2191ca-37cd-43b8-ad59-c0450c489c81&981&"} - - - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -${addTestClentIPFlag}==1 -AddLocalIPObject - - - -Logs the given message with the given level. - -to_AddLocalIPObject - -to_AddLocalIPObject - - - -Returns the given values which can then be assigned to a variables. - -{"opAction":"add","returnData":1,"objectList":{"objectType":"ip","objectSubType":"endpoint","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"autotestLocalIPObject_${testClentIP}","objectDesc":"LocalIPObject_${testClentIP}自动化测试机IP","subObjectIds":[],"addItemList":[{"addrType":4,"protocol":0,"direction":0,"isSession":"endpoint","clientIp1":"${testClentIP}","clientIp2":"${testClentIP}","clientIpFormat":"range","clientPortFormat":"range","clientPort1":0,"clientPort2":0,"serverIpFormat":"range","serverIp1":"","serverIp2":"","serverPortFormat":"range","serverPort1":0,"serverPort2":0}],"updateItemList":[],"deleteItemIds":[]}} - - -${localIP} - -${localIP} = {"opAction":"add","returnData":1,"objectList":{"objectType":"ip","objectSubType":"endpoint","isValid":1,"isInitialize":0,"isExclusion":0,"objectName":"autotestLocalIPObject_192.168.41.123","objectDesc... - - - - -${localIP} - - -${rescodeip} -${objidip} - - - -/v1/policy/object -body=${body} - - -${response} - - - -settings - -*Sets new request headers or updates the existing.* - -{"Authorization":"${token}","Content-Type":"application/json"} - - - - - -http - -*Sends a POST request to the endpoint.* - -${apistr} -${body} - - -&{httpResponse} - -&{httpResponse} = { seconds=0.13933600000000002 | status=200 | body={'code': 200, 'data': {'objectList': [{'addItemList': [{'clientIp2': '192.168.41.123', 'clientIpFormat': 'range', 'serverIpFormat': 'range', 'isSessio... - - - - -assertions - -*Asserts the field as JSON object.* - -response body - - - - -Returns the given values which can then be assigned to a variables. - -${httpResponse.body} - - -${response} - -${response} = {'code': 200, 'data': {'objectList': [{'addItemList': [{'clientIp2': '192.168.41.123', 'clientIpFormat': 'range', 'serverIpFormat': 'range', 'isSession': 'endpoint', 'serverPortFormat': 'range', 'prot... - - -${response} = {'code': 200, 'data': {'objectList': [{'addItemList': [{'clientIp2': '192.168.41.123', 'clientIpFormat': 'range', 'serverIpFormat': 'range', 'isSession': 'endpoint', 'serverPortFormat': 'range', 'prot... - - - -Returns the given values which can then be assigned to a variables. - -${response['data']['objectList'][0]['objectId']} - - -${objectId} - -${objectId} = 5294 - - - -Returns the given values which can then be assigned to a variables. - -${response['code']} - - -${rescodeReturn} - -${rescodeReturn} = 200 - - -${rescodeip} = 200 -${objidip} = 5294 - - - -Logs the given message with the given level. - -${rescodeip} - -200 - - - -Logs the given message with the given level. - -LocalIP:${objidip} - -LocalIP:5294 - - - -Makes a variable available globally in all tests and suites. - -${testClentID} -${objidip} - -${testClentID} = 5294 - - - - - - - -Logs the given message with the given level. - -ApiLoginAndAddLocalIP - -ApiLoginAndAddLocalIP - - - - - - - - - - - - - - - -{ \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "objectList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "objectType":"fqdn", \ \ \ \ \ \ \ \ \ \ \ \ "objectName":"jwc_fqdn_bk", \ \ \ \ \ \ \ \ \ \ \ \ "objectDesc":"jwc_fqdn_bk", \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0, \ \ \ \ \ \ \ \ \ \ \ \ "isExclusion":0, \ \ \ \ \ \ \ \ \ \ \ \ "subObjectIds":[], \ \ \ \ \ \ \ \ \ \ \ \ "addItemList":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemName":"item name", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemDesc":"item description", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "keywordArray":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "*open.node.com" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isHexbin":0, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemName":"item name", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemDesc":"item description", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "keywordArray":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "*jd.com" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isHexbin":0, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "updateItemList":[ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "deleteItemIds":[ \ \ \ \ \ \ \ \ \ \ \ \ ] \ \ \ \ \ \ \ \ } \ \ \ \ ] } - - -${rescodeip} -${object_FQDN_Id} - - - -/v1/policy/object -body=${body} - - -${response} - - - -settings - -*Sets new request headers or updates the existing.* - -{"Authorization":"${token}","Content-Type":"application/json"} - - - - - -http - -*Sends a POST request to the endpoint.* - -${apistr} -${body} - - -&{httpResponse} - -&{httpResponse} = { seconds=0.413187 | status=200 | body={'code': 200, 'data': {'objectList': [{'addItemList': [{'itemName': 'item name', 'keywordArray': ['*open.node.com'], 'isHexbin': 0, 'itemDesc': 'item description... - - - - -assertions - -*Asserts the field as JSON object.* - -response body - - - - -Returns the given values which can then be assigned to a variables. - -${httpResponse.body} - - -${response} - -${response} = {'code': 200, 'data': {'objectList': [{'addItemList': [{'itemName': 'item name', 'keywordArray': ['*open.node.com'], 'isHexbin': 0, 'itemDesc': 'item description', 'isInitialize': 0}, {'itemName': 'it... - - -${response} = {'code': 200, 'data': {'objectList': [{'addItemList': [{'itemName': 'item name', 'keywordArray': ['*open.node.com'], 'isHexbin': 0, 'itemDesc': 'item description', 'isInitialize': 0}, {'itemName': 'it... - - - -Returns the given values which can then be assigned to a variables. - -${response['data']['objectList'][0]['objectId']} - - -${objectId} - -${objectId} = 5295 - - - -Returns the given values which can then be assigned to a variables. - -${response['code']} - - -${rescodeReturn} - -${rescodeReturn} = 200 - - -${rescodeip} = 200 -${object_FQDN_Id} = 5295 - - - -Logs the given message with the given level. - -${object_FQDN_Id} - -5295 - - - -Returns the given values which can then be assigned to a variables. - -${object_FQDN_Id} - - -${objectids} - -${objectids} = 5295 - - - -Returns the given values which can then be assigned to a variables. - -{ \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"SecurityPolicy-Intercept-Https-00001", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"tsg_security", \ \ \ \ \ \ \ \ \ \ \ \ "action":"intercept", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ \ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP", \ \ \ \ "protocol_version":{"allow_http2":1, \ \ \ \ \ \ \ \ \ \ "min":"ssl3", \ \ \ \ \ \ \ \ \ "max":"tls13", \ \ \ \ \ \ \ \ \ "mirror_client":1}, \ \ \ \ "dynamic_bypass":{"mutual_authentication":1, \ \ \ \ "cert_pinning":1,"cert_transparency":0, \ \ \ \ "protocol_errors":1,"ev_cert":0}, \ \ \ \ "decrypt_mirror":{"enable":0}, \ \ \ \ "certificate_checks":{"fail_action":"pass-through", \ \ \ \ "approach":{"self-signed":1, \ \ \ \ "expiration":1, \ \ \ \ "cn":1, \ \ \ \ "issuer":1}}, \ \ \ \ "keyring":1}, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[{"objectId":${object_FQDN_Id}, \ \ \ \ \ \ \ \ "protocolFields":["TSG_FIELD_HTTP_HOST"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] } - - -${addPolicyStr} - -${addPolicyStr} = { "opAction":"add", "returnData":1, "policyList":[ { "policyId":"", "isValid":1, "policyName":"SecurityPolicy-Intercept-Https-00001", ... - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -'${addTestClentIPFlag}'=='1' -set variable -{ \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"SecurityPolicy-Intercept-Https-00001", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"tsg_security", \ \ \ \ \ \ \ \ \ \ \ \ "action":"intercept", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ \ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP", \ \ \ \ "protocol_version":{"allow_http2":0, \ \ \ \ \ \ \ \ \ \ "min":"ssl3", \ \ \ \ \ \ \ \ \ "max":"tls13", \ \ \ \ \ \ \ \ \ "mirror_client":1}, \ \ \ \ "dynamic_bypass":{"mutual_authentication":1, \ \ \ \ "cert_pinning":1,"cert_transparency":0, \ \ \ \ "protocol_errors":1,"ev_cert":0}, \ \ \ \ "decrypt_mirror":{"enable":0}, \ \ \ \ "certificate_checks":{"fail_action":"pass-through", \ \ \ \ "approach":{"self-signed":1, \ \ \ \ "expiration":1, \ \ \ \ "cn":1, \ \ \ \ "issuer":1}}, \ \ \ \ "keyring":1}, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[{"objectId":${testClentID},"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]},{"objectId":${object_FQDN_Id}, \ \ \ \ \ \ \ \ "protocolFields":["TSG_FIELD_HTTP_HOST"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] } - - -${addPolicyStr} - - -Returns the given values which can then be assigned to a variables. - -{ \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"SecurityPolicy-Intercept-Https-00001", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"tsg_security", \ \ \ \ \ \ \ \ \ \ \ \ "action":"intercept", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ \ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP", \ \ \ \ "protocol_version":{"allow_http2":0, \ \ \ \ \ \ \ \ \ \ "min":"ssl3", \ \ \ \ \ \ \ \ \ "max":"tls13", \ \ \ \ \ \ \ \ \ "mirror_client":1}, \ \ \ \ "dynamic_bypass":{"mutual_authentication":1, \ \ \ \ "cert_pinning":1,"cert_transparency":0, \ \ \ \ "protocol_errors":1,"ev_cert":0}, \ \ \ \ "decrypt_mirror":{"enable":0}, \ \ \ \ "certificate_checks":{"fail_action":"pass-through", \ \ \ \ "approach":{"self-signed":1, \ \ \ \ "expiration":1, \ \ \ \ "cn":1, \ \ \ \ "issuer":1}}, \ \ \ \ "keyring":1}, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[{"objectId":${testClentID},"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]},{"objectId":${object_FQDN_Id}, \ \ \ \ \ \ \ \ "protocolFields":["TSG_FIELD_HTTP_HOST"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] } - - - -${addPolicyStr} = { "opAction":"add", "returnData":1, "policyList":[ { "policyId":"", "isValid":1, "policyName":"SecurityPolicy-Intercept-Https-00001", ... - - - - -${addPolicyStr} - - -${rescode} -${policyId} - - - -/v1/policy/compile -body=${body} - - -${response} - - - -settings - -*Sets new request headers or updates the existing.* - -{"Authorization":"${token}","Content-Type":"application/json"} - - - - - -http - -*Sends a POST request to the endpoint.* - -${apistr} -${body} - - -&{httpResponse} - -&{httpResponse} = { seconds=0.203673 | status=200 | body={'code': 200, 'data': {'policyList': [{'action': 'intercept', 'appObjectIdArray': [2], 'doLog': 1, 'evaluationLayer': 'session_layer', 'evaluationOrder': 1441.0,... - - - - -assertions - -*Asserts the field as JSON object.* - -response body - - - - -Returns the given values which can then be assigned to a variables. - -${httpResponse.body} - - -${response} - -${response} = {'code': 200, 'data': {'policyList': [{'action': 'intercept', 'appObjectIdArray': [2], 'doLog': 1, 'evaluationLayer': 'session_layer', 'evaluationOrder': 1441.0, 'evaluationStage': 1, 'isValid': 1, 'n... - - -${response} = {'code': 200, 'data': {'policyList': [{'action': 'intercept', 'appObjectIdArray': [2], 'doLog': 1, 'evaluationLayer': 'session_layer', 'evaluationOrder': 1441.0, 'evaluationStage': 1, 'isValid': 1, 'n... - - - -Returns the given values which can then be assigned to a variables. - -${response['data']['policyList'][0]['policyId']} - - -${policyId} - -${policyId} = 3016 - - - -Returns the given values which can then be assigned to a variables. - -${response['code']} - - -${rescode} - -${rescode} = 200 - - -${rescode} = 200 -${policyId} = 3016 - - - -Logs the given message with the given level. - -${policyId} - -3016 - - - -Returns the given values which can then be assigned to a variables. - -{"policyType":"tsg_security","policyIds":[${policyId}]} - - -${policyId1} - -${policyId1} = {"policyType":"tsg_security","policyIds":[3016]} - - - -Returns a list containing given items. - -${policyId1} - - -${policyIds} - -${policyIds} = ['{"policyType":"tsg_security","policyIds":[3016]}'] - - - - -{ \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "objectList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "objectType":"url", \ \ \ \ \ \ \ \ \ \ \ \ "objectName":"jwc_url_bk", \ \ \ \ \ \ \ \ \ \ \ \ "objectDesc":"jwc_url_bk", \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0, \ \ \ \ \ \ \ \ \ \ \ \ "isExclusion":0, \ \ \ \ \ \ \ \ \ \ \ \ "subObjectIds":[], \ \ \ \ \ \ \ \ \ \ \ \ "addItemList":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemName":"item name", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemDesc":"item description", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "keywordArray":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "action" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isHexbin":0, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemName":"item name", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemDesc":"item description", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "keywordArray":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "*jd.com" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isHexbin":0, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "updateItemList":[ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "deleteItemIds":[ \ \ \ \ \ \ \ \ \ \ \ \ ] \ \ \ \ \ \ \ \ } \ \ \ \ ] } - - -${rescodeip} -${object_url_Id} - - - -/v1/policy/object -body=${body} - - -${response} - - - -settings - -*Sets new request headers or updates the existing.* - -{"Authorization":"${token}","Content-Type":"application/json"} - - - - - -http - -*Sends a POST request to the endpoint.* - -${apistr} -${body} - - -&{httpResponse} - -&{httpResponse} = { seconds=0.144627 | status=200 | body={'code': 200, 'data': {'objectList': [{'addItemList': [{'itemName': 'item name', 'keywordArray': ['action'], 'isHexbin': 0, 'itemDesc': 'item description', 'isIn... - - - - -assertions - -*Asserts the field as JSON object.* - -response body - - - - -Returns the given values which can then be assigned to a variables. - -${httpResponse.body} - - -${response} - -${response} = {'code': 200, 'data': {'objectList': [{'addItemList': [{'itemName': 'item name', 'keywordArray': ['action'], 'isHexbin': 0, 'itemDesc': 'item description', 'isInitialize': 0}, {'itemName': 'item name'... - - -${response} = {'code': 200, 'data': {'objectList': [{'addItemList': [{'itemName': 'item name', 'keywordArray': ['action'], 'isHexbin': 0, 'itemDesc': 'item description', 'isInitialize': 0}, {'itemName': 'item name'... - - - -Returns the given values which can then be assigned to a variables. - -${response['data']['objectList'][0]['objectId']} - - -${objectId} - -${objectId} = 5296 - - - -Returns the given values which can then be assigned to a variables. - -${response['code']} - - -${rescodeReturn} - -${rescodeReturn} = 200 - - -${rescodeip} = 200 -${object_url_Id} = 5296 - - - -Returns the given values which can then be assigned to a variables. - -${object_FQDN_Id},${object_url_Id} - - -${objectids} - -${objectids} = 5295,5296 - - - - -{ \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "objectList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "objectType":"keywords", \ \ \ \ \ \ \ \ \ \ \ \ "objectName":"jwc_body_bk", \ \ \ \ \ \ \ \ \ \ \ \ "objectDesc":"jwc_body_bk", \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0, \ \ \ \ \ \ \ \ \ \ \ \ "isExclusion":0, \ \ \ \ \ \ \ \ \ \ \ \ "subObjectIds":[], \ \ \ \ \ \ \ \ \ \ \ \ "addItemList":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemName":"item name", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemDesc":"item description", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "keywordArray":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "body" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isHexbin":0, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemName":"item name", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "itemDesc":"item description", \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "keywordArray":[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "12312" \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isHexbin":0, \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "isInitialize":0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ } \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "updateItemList":[ \ \ \ \ \ \ \ \ \ \ \ \ ], \ \ \ \ \ \ \ \ \ \ \ \ "deleteItemIds":[ \ \ \ \ \ \ \ \ \ \ \ \ ] \ \ \ \ \ \ \ \ } \ \ \ \ ] } - - -${rescodeip} -${object_body_Id} - - - -/v1/policy/object -body=${body} - - -${response} - - - -settings - -*Sets new request headers or updates the existing.* - -{"Authorization":"${token}","Content-Type":"application/json"} - - - - - -http - -*Sends a POST request to the endpoint.* - -${apistr} -${body} - - -&{httpResponse} - -&{httpResponse} = { seconds=0.15984700000000002 | status=200 | body={'code': 200, 'data': {'objectList': [{'addItemList': [{'itemName': 'item name', 'keywordArray': ['body'], 'isHexbin': 0, 'itemDesc': 'item descriptio... - - - - -assertions - -*Asserts the field as JSON object.* - -response body - - - - -Returns the given values which can then be assigned to a variables. - -${httpResponse.body} - - -${response} - -${response} = {'code': 200, 'data': {'objectList': [{'addItemList': [{'itemName': 'item name', 'keywordArray': ['body'], 'isHexbin': 0, 'itemDesc': 'item description', 'isInitialize': 0}, {'itemName': 'item name', ... - - -${response} = {'code': 200, 'data': {'objectList': [{'addItemList': [{'itemName': 'item name', 'keywordArray': ['body'], 'isHexbin': 0, 'itemDesc': 'item description', 'isInitialize': 0}, {'itemName': 'item name', ... - - - -Returns the given values which can then be assigned to a variables. - -${response['data']['objectList'][0]['objectId']} - - -${objectId} - -${objectId} = 5297 - - - -Returns the given values which can then be assigned to a variables. - -${response['code']} - - -${rescodeReturn} - -${rescodeReturn} = 200 - - -${rescodeip} = 200 -${object_body_Id} = 5297 - - - -Returns the given values which can then be assigned to a variables. - -${object_FQDN_Id},${object_url_Id},${object_body_Id} - - -${objectids} - -${objectids} = 5295,5296,5297 - - - -必传参数:url、filePath(文件路径)、fileName(文件名称)、flag(模块标识) -可选参数:header(不传时使用默认值) - -${url} -${responsePageFiles} -404russian.html -resPages - - -${response} - - -Generates a string with a desired ``length`` from the given ``chars``. - -${suffix} - -${suffix} = Z1JpFNQb - - - -Catenates the given items together and returns the resulted string. - -SEPARATOR=_ -test -${suffix} - - -${randomName} - -${randomName} = test_Z1JpFNQb - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -'${flag}'=='resPages' -Set Variable -{"isValid":1,"format":"html","opAction":"add","profileName":"${randomName}","profileId":null,"returnData":1} -ELSE IF -'${flag}'=='hijack' -Set Variable -{"isValid":1,"contentType":"text/html","opAction":"add","profileName":"${randomName}","contentName":"${fileName}","profileId":null,"returnData":1} -ELSE IF -'${flag}'=='insert' -Set Variable -{"isValid":1,"format":"js","insertOn":"after_page_load","opAction":"add","profileName":"${randomName}","profileId":null,"returnData":1} - - -${value} - - -Returns the given values which can then be assigned to a variables. - -{"isValid":1,"format":"html","opAction":"add","profileName":"${randomName}","profileId":null,"returnData":1} - - - -${value} = {"isValid":1,"format":"html","opAction":"add","profileName":"test_Z1JpFNQb","profileId":null,"returnData":1} - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -${header}==[] -Set Variable -${value} -ELSE -Get From List -${header} -0 - - -${header} - - -Returns the given values which can then be assigned to a variables. - -${value} - - - -${header} = {"isValid":1,"format":"html","opAction":"add","profileName":"test_Z1JpFNQb","profileId":null,"returnData":1} - - - -Evaluates the given expression in Python and returns the results. - -open(r"${filePath}${fileName}",'rb') - - -${binFile} - -${binFile} = <_io.BufferedReader name='E:/auto_git/eclipsegit/tsg_autotest/05-Other/Response_pages_files/404russian.html'> - - - -Creates and returns a dictionary based on the given ``items``. - -file=${binFile} - - -${fileDict} - -${fileDict} = {'file': <_io.BufferedReader name='E:/auto_git/eclipsegit/tsg_autotest/05-Other/Response_pages_files/404russian.html'>} - - - -Creates and returns a dictionary based on the given ``items``. - -name="file" -filename="${fileName}" -Content-Type=application/octet-stream - - -${requestData} - -${requestData} = {'name': '"file"', 'filename': '"404russian.html"', 'Content-Type': 'application/octet-stream'} - - - -Generates a string with a desired ``length`` from the given ``chars``. - -${suffix} - -${suffix} = q89KJWMx - - - -Catenates the given items together and returns the resulted string. - -SEPARATOR=_ -test -${suffix} - - -${profileName} - -${profileName} = test_q89KJWMx - - - -Creates and returns a dictionary based on the given ``items``. - -File-Desc=${header} - - -${fileDesc} - -${fileDesc} = {'File-Desc': '{"isValid":1,"format":"html","opAction":"add","profileName":"test_Z1JpFNQb","profileId":null,"returnData":1}'} - - - - -${url} -${requestData} -${fileDict} -${fileDesc} - - -${content} - - -Adds the given ``key_value_pairs`` and ``items`` to the ``dictionary``. - -${fileDesc} -Authorization=${token} - - -${header} - -${header} = {'File-Desc': '{"isValid":1,"format":"html","opAction":"add","profileName":"test_Z1JpFNQb","profileId":null,"returnData":1}', 'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&'} - - - -Create Session: create a HTTP session to a server - -api -http://${host}:${port}/${version} -headers=${header} - -Creating Session using : alias=api, url=http://192.168.40.120:8080/v1, headers={'File-Desc': '{"isValid":1,"format":"html","opAction":"add","profileName":"test_Z1JpFNQb","profileId":null,"returnData":1}', 'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a POST request on the session object found using the -given `alias` - -api -${url} -data=${data} -files=${files} -headers=${header} - - -${remoteResponse} - -POST Request using : uri=/policy/profile/responsepages, params=None, files={'file': <_io.BufferedReader name='E:/auto_git/eclipsegit/tsg_autotest/05-Other/Response_pages_files/404russian.html'>}, allow_redirects=True, timeout=None -headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'File-Desc': '{"isValid":1,"format":"html","opAction":"add","profileName":"test_Z1JpFNQb","profileId":null,"returnData":1}', 'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&'} -data=None -json=None -${remoteResponse} = <Response [200]> - - - -Convert a string to a JSON object - -${remoteResponse.content} - - -${response} - -To JSON using : content={ - "code":200, - "data":{ - "list":[ - { - "format":"html", - "isValid":1, - "opAction":"add", - "opTime":"2020-04-07 17:44:49", - "opUser":981, - "path":"http://192.168.40.223:9090/tsg/202004071744049-NDA0cnVzc2lhbg==.html", - "profileId":9, - "profileName":"test_Z1JpFNQb", - "returnData":1 - } - ] - }, - "msg":"Success", - "success":true -} -To JSON using : pretty_print=False -${response} = {'code': 200, 'data': {'list': [{'format': 'html', 'isValid': 1, 'opAction': 'add', 'opTime': '2020-04-07 17:44:49', 'opUser': 981, 'path': 'http://192.168.40.223:9090/tsg/202004071744049-NDA0cnVzc2lh... - - - -Fails if objects are unequal after converting them to strings. - -${remoteResponse.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - -${content} = {'code': 200, 'data': {'list': [{'format': 'html', 'isValid': 1, 'opAction': 'add', 'opTime': '2020-04-07 17:44:49', 'opUser': 981, 'path': 'http://192.168.40.223:9090/tsg/202004071744049-NDA0cnVzc2lh... - - - -Returns the given values which can then be assigned to a variables. - -${content['msg']} - - -${msg} - -${msg} = Success - - - -Returns the given values which can then be assigned to a variables. - -${content['data']['list']} - - -${list} - -${list} = [{'format': 'html', 'isValid': 1, 'opAction': 'add', 'opTime': '2020-04-07 17:44:49', 'opUser': 981, 'path': 'http://192.168.40.223:9090/tsg/202004071744049-NDA0cnVzc2lhbg==.html', 'profileId': 9, 'pr... - - - -Returns the given values which can then be assigned to a variables. - -${list[0]['profileId']} - - -${profileId} - -${profileId} = 9 - - - -Returns the given values which can then be assigned to a variables. - -${list[0]['profileName']} - - -${profileName} - -${profileName} = test_Z1JpFNQb - - - -Creates and returns a dictionary based on the given ``items``. - -msg=${msg} -profileId=${profileId} -profileName=${profileName} - - -${response} - -${response} = {'msg': 'Success', 'profileId': 9, 'profileName': 'test_Z1JpFNQb'} - - - -Logs the given message with the given level. - -add operation:${msg} - -add operation:Success - - - -Logs the given message with the given level. - -profileId:${profileId} - -profileId:9 - - -${response} = {'msg': 'Success', 'profileId': 9, 'profileName': 'test_Z1JpFNQb'} - - - -Returns a value from the given ``dictionary`` based on the given ``key``. - -${response} -profileId - - -${profiledId} - -${profiledId} = 9 - - - -Returns the given values which can then be assigned to a variables. - -{ \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"ProxyPolicy-deny-Https-00009", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"pxy_manipulation", \ \ \ \ \ \ \ \ \ \ \ \ "action":"deny", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ "method": "block", "html_profile": ${profiledId} , "code": 404,\ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP" \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[ \ \ \ \ \ \ \ \ {"objectId":${object_url_Id},"protocolFields": ["TSG_FIELD_HTTP_URL"]},{"objectId":${object_body_Id},"protocolFields":["TSG_FIELD_HTTP_REQ_CONTENT"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] } - - -${addPolicyStr} - -${addPolicyStr} = { "opAction":"add", "returnData":1, "policyList":[ { "policyId":"", "isValid":1, "policyName":"ProxyPolicy-deny-Https-00009", "polic... - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -'${addTestClentIPFlag}'=='1' -set variable -{ \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"ProxyPolicy-deny-Https-00009", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"pxy_manipulation", \ \ \ \ \ \ \ \ \ \ \ \ "action":"deny", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ "method": "block", "html_profile": ${profiledId} , "code": 404,\ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP" \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[{"objectId":${testClentID},"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]},{"objectId":${object_url_Id},"protocolFields": ["TSG_FIELD_HTTP_URL"]},{"objectId":${object_body_Id},"protocolFields":["TSG_FIELD_HTTP_REQ_CONTENT"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] } - - -${addPolicyStr} - - -Returns the given values which can then be assigned to a variables. - -{ \ \ \ \ "opAction":"add", \ \ \ \ "returnData":1, \ \ \ \ "policyList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "policyId":"", \ \ \ \ \ \ \ \ \ \ \ \ "isValid":1, \ \ \ \ \ \ \ \ \ \ \ \ "policyName":"ProxyPolicy-deny-Https-00009", \ \ \ \ \ \ \ \ \ \ \ \ "policyType":"pxy_manipulation", \ \ \ \ \ \ \ \ \ \ \ \ "action":"deny", \ \ \ \ \ \ \ \ \ \ \ \ "userTags":"", \ \ \ \ \ \ \ \ \ \ \ \ "doBlacklist":0, \ \ \ \ \ \ \ \ \ \ \ \ "doLog":1, \ \ \ \ \ \ \ \ \ \ \ \ "userRegion":{ "method": "block", "html_profile": ${profiledId} , "code": 404,\ \ \ \ \ \ \ \ \ \ \ \ \ "protocol":"HTTP" \ \ \ \ }, \ \ \ \ \ \ \ \ \ \ \ \ "referenceObject":[{"objectId":${testClentID},"protocolFields":["TSG_SECURITY_SOURCE_ADDR"]},{"objectId":${object_url_Id},"protocolFields": ["TSG_FIELD_HTTP_URL"]},{"objectId":${object_body_Id},"protocolFields":["TSG_FIELD_HTTP_REQ_CONTENT"]}], \ \ \ \ \ \ \ \ \ \ \ \ "scheduleId":[],"appObjectIdArray":[2] \ \ \ \ \ \ \ \ } \ \ \ \ ] } - - - -${addPolicyStr} = { "opAction":"add", "returnData":1, "policyList":[ { "policyId":"", "isValid":1, "policyName":"ProxyPolicy-deny-Https-00009", "polic... - - - - -${addPolicyStr} - - -${rescode} -${policyId3} - - - -/v1/policy/compile -body=${body} - - -${response} - - - -settings - -*Sets new request headers or updates the existing.* - -{"Authorization":"${token}","Content-Type":"application/json"} - - - - - -http - -*Sends a POST request to the endpoint.* - -${apistr} -${body} - - -&{httpResponse} - -&{httpResponse} = { seconds=0.12234600000000001 | status=200 | body={'code': 200, 'data': {'policyList': [{'action': 'deny', 'appObjectIdArray': [2], 'doLog': 1, 'isValid': 1, 'newSrcIpObjName': 'autotestLocalIPObject_... - - - - -assertions - -*Asserts the field as JSON object.* - -response body - - - - -Returns the given values which can then be assigned to a variables. - -${httpResponse.body} - - -${response} - -${response} = {'code': 200, 'data': {'policyList': [{'action': 'deny', 'appObjectIdArray': [2], 'doLog': 1, 'isValid': 1, 'newSrcIpObjName': 'autotestLocalIPObject_192.168.41.123', 'opTime': '2020-04-07 17:44:49', ... - - -${response} = {'code': 200, 'data': {'policyList': [{'action': 'deny', 'appObjectIdArray': [2], 'doLog': 1, 'isValid': 1, 'newSrcIpObjName': 'autotestLocalIPObject_192.168.41.123', 'opTime': '2020-04-07 17:44:49', ... - - - -Returns the given values which can then be assigned to a variables. - -${response['data']['policyList'][0]['policyId']} - - -${policyId} - -${policyId} = 3017 - - - -Returns the given values which can then be assigned to a variables. - -${response['code']} - - -${rescode} - -${rescode} = 200 - - -${rescode} = 200 -${policyId3} = 3017 - - - -Logs the given message with the given level. - -${policyId3} - -3017 - - - -Returns the given values which can then be assigned to a variables. - -{"policyType":"pxy_manipulation","policyIds":[${policyId3}]} - - -${policyId2} - -${policyId2} = {"policyType":"pxy_manipulation","policyIds":[3017]} - - - -Returns a list containing given items. - -${policyId1} -${policyId2} - - -${policyIds} - -${policyIds} = ['{"policyType":"tsg_security","policyIds":[3016]}', '{"policyType":"pxy_manipulation","policyIds":[3017]}'] - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -'${systemType}'=='Windows' -set variable -curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=body&setCookie=set-cookie&contentType=content-type&resBody=Response Body" http://open.node.com/action | iconv -f utf-8 -t gbk -ELSE -set variable -curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=body&setCookie=set-cookie&contentType=content-type&resBody=Response Body" http://open.node.com/action - - -${commandstr} - - -Returns the given values which can then be assigned to a variables. - -curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=body&setCookie=set-cookie&contentType=content-type&resBody=Response Body" http://open.node.com/action | iconv -f utf-8 -t gbk - - - -${commandstr} = curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=body&setCookie=set-cookie&contentType=content-type&resBody=Response Body" http://open.node.com/action | iconv -f utf-8 -t g... - - - -Returns a list containing given items. - -X-TG-Construct-By: tfe -- 404, простите! -страница, к которой вы пришли, не существует -Извините, запрошенная страница не существует или была удалена или временно недоступна - - -${stringlist} - -${stringlist} = ['X-TG-Construct-By: tfe', '- 404, простите!', 'страница, к которой вы пришли, не существует', 'Извините, запрошенная страница не существует или была удалена или временно недоступна'] - - - -Returns the given time in the requested format. - -${starttime} - -${starttime} = 2020-04-07 17:49:44 - - - -Pauses the test executed for the given time. - -${policyVerificationSleepSeconds}s - -Slept 20 seconds - - - - -${commandstr} -${stringlist} - - -${rescode} - - -Logs the given message with the given level. - -toSystemCommand_SystemCommandTest - -toSystemCommand_SystemCommandTest - - - -Runs the given command in the system and returns the output. - -${commandstr} - - -${commandreturn} - -Running command 'curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=body&setCookie=set-cookie&contentType=content-type&resBody=Response Body" http://open.node.com/action | iconv -f utf-8 -t gbk 2>&1'. -${commandreturn} = <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - -<head> - -<meta charset="UTF-8"... - - - -Appends the given content to the specified file. - -${path}/write_file.txt -${commandstr} - -Appended to file '<a href="file://E:\auto_git\eclipsegit\tsg_autotest\05-Other\write_file.txt">E:\auto_git\eclipsegit\tsg_autotest\05-Other\write_file.txt</a>'. - - - -Appends the given content to the specified file. - -${path}/write_file.txt -%%%%%%%%%%%%%%newbat - -Appended to file '<a href="file://E:\auto_git\eclipsegit\tsg_autotest\05-Other\write_file.txt">E:\auto_git\eclipsegit\tsg_autotest\05-Other\write_file.txt</a>'. - - - -Appends the given content to the specified file. - -${path}/write_file.txt -${commandreturn} - -Appended to file '<a href="file://E:\auto_git\eclipsegit\tsg_autotest\05-Other\write_file.txt">E:\auto_git\eclipsegit\tsg_autotest\05-Other\write_file.txt</a>'. - - - -Returns and logs the length of the given item as an integer. - -${stringlist} - - -${listlenth} - -Length is 4 -${listlenth} = 4 - - - - - -Fails if ``container`` does not contain ``item`` one or more times. - -${commandreturn} -${stringlist}[${var}] - -'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - -<head> - -<meta charset="UTF-8" http-equiv="Content-Type" content="text/html; charset=utf-8" /> - -<title>iconv:(标准输入):无法转换' does not contain 'X-TG-Construct-By: tfe' - - - - - - - - - - -${policyIds} -${objectids} - - -Logs the given message with the given level. - -toDeletePolicy_DeletePolicyAndObject - -toDeletePolicy_DeletePolicyAndObject - - - -Returns and logs the length of the given item as an integer. - -${policyids} - - -${listlenth} - -Length is 2 -${listlenth} = 2 - - - - - -Logs the given message with the given level. - -${var} - -0 - - - - -${policyids}[${var}] - - -Logs the given message with the given level. - -toDeletePolicy_DeletePolicyDeletePolicy - -toDeletePolicy_DeletePolicyDeletePolicy - - - - -/v1/policy/compile -${body} - - -${response} - - -Returns the given values which can then be assigned to a variables. - -{"Authorization":"${token}","Content-Type":"application/json"} - - -${headers} - -${headers} = {"Authorization":"db2191ca-37cd-43b8-ad59-c0450c489c81&981&","Content-Type":"application/json"} - - - -Create Session: create a HTTP session to a server - -api -http://${host}:${port} -${headers} - -Creating Session using : alias=api, url=http://192.168.40.120:8080, headers={'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a DELETE request on the session object found using the -given `alias` - -api -${requestUri} -data=${data} - - -${response} - -DELETE Request using : uri=/v1/policy/compile, params=None, allow_redirects=True, timeout=None -headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&', 'Content-Type': 'application/json'} -data={"policyType":"tsg_security","policyIds":[3016]} -json=None -${response} = <Response [200]> - - - -Logs the given message with the given level. - -return data =${response} - -return data =<Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${response.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Convert a string to a JSON object - -${response.content} - - -${response} - -To JSON using : content={ - "code":200, - "msg":"Success", - "success":true -} -To JSON using : pretty_print=False -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - - -Returns a value from the given ``dictionary`` based on the given ``key``. - -${response} -code - - -${response_code} - -${response_code} = 200 - - - -Fails if objects are unequal after converting them to strings. - -${response_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Converts the given item to a Unicode string. - -${response} - - -${response} - -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - - -Logs the given message with the given level. - -${response} - -{'code': 200, 'msg': 'Success', 'success': True} - - - - - - - - -Logs the given message with the given level. - -${var} - -1 - - - - -${policyids}[${var}] - - -Logs the given message with the given level. - -toDeletePolicy_DeletePolicyDeletePolicy - -toDeletePolicy_DeletePolicyDeletePolicy - - - - -/v1/policy/compile -${body} - - -${response} - - -Returns the given values which can then be assigned to a variables. - -{"Authorization":"${token}","Content-Type":"application/json"} - - -${headers} - -${headers} = {"Authorization":"db2191ca-37cd-43b8-ad59-c0450c489c81&981&","Content-Type":"application/json"} - - - -Create Session: create a HTTP session to a server - -api -http://${host}:${port} -${headers} - -Creating Session using : alias=api, url=http://192.168.40.120:8080, headers={'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a DELETE request on the session object found using the -given `alias` - -api -${requestUri} -data=${data} - - -${response} - -DELETE Request using : uri=/v1/policy/compile, params=None, allow_redirects=True, timeout=None -headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&', 'Content-Type': 'application/json'} -data={"policyType":"pxy_manipulation","policyIds":[3017]} -json=None -${response} = <Response [200]> - - - -Logs the given message with the given level. - -return data =${response} - -return data =<Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${response.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Convert a string to a JSON object - -${response.content} - - -${response} - -To JSON using : content={ - "code":200, - "msg":"Success", - "success":true -} -To JSON using : pretty_print=False -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - - -Returns a value from the given ``dictionary`` based on the given ``key``. - -${response} -code - - -${response_code} - -${response_code} = 200 - - - -Fails if objects are unequal after converting them to strings. - -${response_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Converts the given item to a Unicode string. - -${response} - - -${response} - -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - - -Logs the given message with the given level. - -${response} - -{'code': 200, 'msg': 'Success', 'success': True} - - - - - - - - - -Logs the given message with the given level. - -todeleteobj_DeletePolicyAndObject - -todeleteobj_DeletePolicyAndObject - - - - -${objectids} - - -Logs the given message with the given level. - -todeleteobj - -todeleteobj - - - - -/v1/policy/object -{"objectIds":[${objectids}]} - - -${response} - - -Returns the given values which can then be assigned to a variables. - -{"Authorization":"${token}","Content-Type":"application/json"} - - -${headers} - -${headers} = {"Authorization":"db2191ca-37cd-43b8-ad59-c0450c489c81&981&","Content-Type":"application/json"} - - - -Create Session: create a HTTP session to a server - -api -http://${host}:${port} -${headers} - -Creating Session using : alias=api, url=http://192.168.40.120:8080, headers={'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a DELETE request on the session object found using the -given `alias` - -api -${requestUri} -data=${data} - - -${response} - -DELETE Request using : uri=/v1/policy/object, params=None, allow_redirects=True, timeout=None -headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&', 'Content-Type': 'application/json'} -data={"objectIds":[5295,5296,5297]} -json=None -${response} = <Response [200]> - - - -Logs the given message with the given level. - -return data =${response} - -return data =<Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${response.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Convert a string to a JSON object - -${response.content} - - -${response} - -To JSON using : content={ - "code":200, - "msg":"Success", - "success":true -} -To JSON using : pretty_print=False -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - - -Returns a value from the given ``dictionary`` based on the given ``key``. - -${response} -code - - -${response_code} - -${response_code} = 200 - - - -Fails if objects are unequal after converting them to strings. - -${response_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Converts the given item to a Unicode string. - -${response} - - -${response} - -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - - -Logs the given message with the given level. - -${response} - -{'code': 200, 'msg': 'Success', 'success': True} - - - - - - - -deny -Proxy_Policy -selfserver -tsg_adc -请求body+url - -'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - -<head> - -<meta charset="UTF-8" http-equiv="Content-Type" content="text/html; charset=utf-8" /> - -<title>iconv:(标准输入):无法转换' does not contain 'X-TG-Construct-By: tfe' - - - - - - - - - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -'${loginType}' == 'api' -ApiLogoutAndDelLocalIP -aa -ELSE IF -'${loginType}' == 'cli' -CliLogout -ELSE -UiLogoutAndDelLocalIP -bb - - - -aa - - -Logs the given message with the given level. - -ApiLogoutAndDelLocalIP${tempparm} - -ApiLogoutAndDelLocalIPaa - - - -Logs the given message with the given level. - -to_LogoutAndDelLocalIP_LogoutAndDelLocalIP - -to_LogoutAndDelLocalIP_LogoutAndDelLocalIP - - - -Runs the given keyword with the given arguments, if ``condition`` is true. - -${addTestClentIPFlag}==1 -DelLocalIPObject - - - -Logs the given message with the given level. - -to_DelLocalIPObject - -to_DelLocalIPObject - - - - -/v1/policy/object -{"objectIds":[${testClentID}]} - - -${response} - - -Returns the given values which can then be assigned to a variables. - -{"Authorization":"${token}","Content-Type":"application/json"} - - -${headers} - -${headers} = {"Authorization":"db2191ca-37cd-43b8-ad59-c0450c489c81&981&","Content-Type":"application/json"} - - - -Create Session: create a HTTP session to a server - -api -http://${host}:${port} -${headers} - -Creating Session using : alias=api, url=http://192.168.40.120:8080, headers={'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&', 'Content-Type': 'application/json'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 - - - -Send a DELETE request on the session object found using the -given `alias` - -api -${requestUri} -data=${data} - - -${response} - -DELETE Request using : uri=/v1/policy/object, params=None, allow_redirects=True, timeout=None -headers={'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Authorization': 'db2191ca-37cd-43b8-ad59-c0450c489c81&981&', 'Content-Type': 'application/json'} -data={"objectIds":[5294]} -json=None -${response} = <Response [200]> - - - -Logs the given message with the given level. - -return data =${response} - -return data =<Response [200]> - - - -Fails if objects are unequal after converting them to strings. - -${response.status_code} -200 - -Argument types are: -<class 'int'> -<type 'unicode'> - - - -Convert a string to a JSON object - -${response.content} - - -${response} - -To JSON using : content={ - "code":200, - "msg":"Success", - "success":true -} -To JSON using : pretty_print=False -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - -${response} = {'code': 200, 'msg': 'Success', 'success': True} - - - -Makes a variable available globally in all tests and suites. - -${testClentID} -${EMPTY} - -${testClentID} = - - - - - - - - - -http - -*Sends a POST request to the endpoint.* - -/v1/user/logout -headers=${headers} - - - - - -assertions - -*Asserts the field as JSON object.* - -response body - - - - - -assertions - -*Asserts the field as JSON integer.* - -$.code -200 - - - - - -assertions - -*Asserts the field as JSON integer.* - -$.code - - -${rescode} - -${rescode} = [200] - - - - - - - - - - - - - - -Critical Tests -All Tests - - -deny -Proxy_Policy -selfserver -tsg_adc -请求body+url - - -Tsg Autotest -Tsg Autotest.01-TestCase -Tsg Autotest.01-TestCase.Tsg Adc -Tsg Autotest.01-TestCase.Tsg Adc.Api Proxy -Tsg Autotest.01-TestCase.Tsg Adc.Api Proxy.DenyHttpTests - - - - - diff --git a/report.html b/report.html deleted file mode 100644 index ee998fe..0000000 --- a/report.html +++ /dev/null @@ -1,2431 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Opening Robot Framework report failed

- -
- - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -