Merge branch 'develop' of https://git.mesalab.cn/dongxiaoyan/tsg_autotest.git into develop
This commit is contained in:
@@ -14,8 +14,8 @@ SecurityPolicy-Allow-Ssl-00001
|
|||||||
Comment 功能端验证HTTP验证
|
Comment 功能端验证HTTP验证
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00001.bat
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00001.bat
|
||||||
... ELSE set variable curl https://homebank.kz/
|
... ELSE set variable curl https://homebank.kz/
|
||||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Виртуальная
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Переводы
|
||||||
... ELSE Create List Виртуальная
|
... ELSE Create List Переводы
|
||||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||||
Comment 改变Allow策略
|
Comment 改变Allow策略
|
||||||
${policyDict} Create Dictionary policyId=${allow_ssl_policyId} source=${allow_ssl_objectId2}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Allow-Ssl-00001 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SSL"} filterList=${allow_ssl_objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
|
${policyDict} Create Dictionary policyId=${allow_ssl_policyId} source=${allow_ssl_objectId2}|TSG_SECURITY_SOURCE_LOCATION policyName=SecurityPolicy-Allow-Ssl-00001 policyType=tsg_security policyDesc=autotest action=allow userRegion={"protocol":"SSL"} filterList=${allow_ssl_objectId}|TSG_FIELD_SSL_SNI isValid=${1} appIdObjects=${SSL_ID}
|
||||||
@@ -25,8 +25,8 @@ SecurityPolicy-Allow-Ssl-00001
|
|||||||
Comment 功能端验证HTTP验证
|
Comment 功能端验证HTTP验证
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00001.bat
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/command/SecurityPolicy_Allow_SSL_00001.bat
|
||||||
... ELSE set variable curl https://homebank.kz/
|
... ELSE set variable curl https://homebank.kz/
|
||||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List Виртуальная
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Переводы
|
||||||
... ELSE Create List Виртуальная
|
... ELSE Create List Переводы
|
||||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||||
|
|
||||||
SecurityPolicy-Allow-Ssl-00002
|
SecurityPolicy-Allow-Ssl-00002
|
||||||
|
|||||||
@@ -17,161 +17,108 @@ ${url} /v1/policy/profile/responsepages
|
|||||||
${profiledId} ${EMPTY}
|
${profiledId} ${EMPTY}
|
||||||
|
|
||||||
*** Test Cases ***
|
*** Test Cases ***
|
||||||
create_PacketCapture_Select_Location
|
create_PacketCapture_Select_DataCenter
|
||||||
# 创建捕包策略
|
# 创建捕包策略
|
||||||
log 创建捕包策略
|
log 创建捕包策略
|
||||||
${PacketCapture} Create Dictionary policyId= policyName=zmmtest addrType=4 protocol=6 clientIp=192.168.50.60 clientPort=8080 serverIp=0.0.0.0 serverPort=0 maxPacket=1000 captureDuration=1
|
${PacketCapture} Create Dictionary policyId= policyName=${TEST NAME} addrType=4 protocol=6 clientIp=${testClentIP} clientPort=0-65535 serverIp=0.0.0.0 serverPort=0-65535 maxPacket=10 captureDuration=1
|
||||||
${location} Create List Almaty Nursurtan
|
# ${location} Create List Almaty
|
||||||
# ${location} Create List
|
${DataCenter} Create List Almaty
|
||||||
# ${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
# ${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
||||||
${isp} Create List
|
|
||||||
log ${PacketCapture}
|
log ${PacketCapture}
|
||||||
${PacketCaptureresponse} Add&Edit_PacketCapture ${PacketCapture} ${location} ${isp}
|
${response_policy_id} ${response_task_id} Add&Edit_PacketCapture ${PacketCapture} ${DataCenter}
|
||||||
LOG WEQEWEQWEWEWERWERWQERWEQRWERWEQRWQEQWERWEQR
|
LOG WEQEWEQWEWEWERWERWQERWEQRWERWEQRWQEQWERWEQR
|
||||||
#创建策略
|
|
||||||
Comment 创建应答头
|
|
||||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
|
||||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
|
||||||
${objectids} set Variable ${objectId}
|
|
||||||
Comment 创建安全策略
|
|
||||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
|
||||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
|
||||||
#删除策略
|
|
||||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
||||||
${policyIds} Create List ${policyId1}
|
|
||||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
||||||
${profiledId} Get From Dictionary ${response} profileId
|
|
||||||
Comment 创建管控策略
|
|
||||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00014 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","html_profile":${profiledId},"code":403,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR
|
|
||||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
|
||||||
#删除策略
|
|
||||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
|
||||||
${policyIds} Create List ${policyId1} ${policyId2}
|
|
||||||
Comment 功能端验证HTTP验证
|
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0001.bat
|
|
||||||
... ELSE set variable curl http://open.node.com/test/xiaozhu/xiaozhu.html
|
|
||||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
||||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
||||||
${starttime} Get Time
|
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
|
||||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
|
||||||
${endtime} Get Time
|
|
||||||
#日志验证
|
|
||||||
${s} Convert to String ${policyId3}
|
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
||||||
|
|
||||||
|
|
||||||
LOG 捕包进度查询
|
LOG 捕包进度查询
|
||||||
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${policyId3} v1
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${response_policy_id} v1
|
||||||
|
${response_task_id} Set Variable ${progress_response['data']['list'][0]['taskId']}
|
||||||
LOG 捕包任务详情查询
|
LOG 捕包任务详情查询
|
||||||
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${PacketCaptureresponse} v1
|
${progress_response_task} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${response_task_id} v1
|
||||||
LOG 捕包设备执行情况查询
|
LOG 捕包设备执行情况查询
|
||||||
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${PacketCaptureresponse} v1
|
${progress_response_detail} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${response_task_id} v1
|
||||||
|
log 删除task
|
||||||
|
# ${delete_task_res} BaseGetRequestForV2 troubleshooting/packetcapture/policy taskId=${response_task_id} v1
|
||||||
|
${policyid1} Set Variable {"policyIds":[${response_policy_id}]}
|
||||||
|
log ${policyid1}
|
||||||
|
log 删除policy
|
||||||
|
${delete_policy_res} BaseDeleteRequest v1/troubleshooting/packetcapture/policy ${policyid1}
|
||||||
|
|
||||||
|
create_PacketCapture_Select_maxPacket
|
||||||
|
|
||||||
create_PacketCapture_Select_ISP
|
|
||||||
# 创建捕包策略
|
# 创建捕包策略
|
||||||
log 创建捕包策略
|
log 创建捕包策略
|
||||||
${PacketCapture} Create Dictionary policyId= policyName=zmmtest addrType=4 protocol=6 clientIp=192.168.50.60 clientPort=8080 serverIp=0.0.0.0 serverPort=0 maxPacket=1000 captureDuration=1
|
${PacketCapture} Create Dictionary policyId= policyName=${TEST NAME} addrType=4 protocol=6 clientIp=${testClentIP} clientPort=0-65535 serverIp=0.0.0.0 serverPort=0-65535 maxPacket=100000 captureDuration=2
|
||||||
# ${location} Create List Almaty Nursurtan
|
# ${location} Create List Almaty
|
||||||
${location} Create List
|
${DataCenter} Create List Almaty
|
||||||
${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
# ${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
||||||
# ${isp} Create List
|
|
||||||
log ${PacketCapture}
|
log ${PacketCapture}
|
||||||
${PacketCaptureresponse} Add&Edit_PacketCapture ${PacketCapture} ${location} ${isp}
|
${response_policy_id} ${response_task_id} Add&Edit_PacketCapture ${PacketCapture} ${DataCenter}
|
||||||
|
LOG WEQEWEQWEWEWERWERWQERWEQRWERWEQRWQEQWERWEQ
|
||||||
#创建策略
|
|
||||||
Comment 创建应答头
|
|
||||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
|
||||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
|
||||||
${objectids} set Variable ${objectId}
|
|
||||||
Comment 创建安全策略
|
|
||||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
|
||||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
|
||||||
#删除策略
|
|
||||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
||||||
${policyIds} Create List ${policyId1}
|
|
||||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
||||||
${profiledId} Get From Dictionary ${response} profileId
|
|
||||||
Comment 创建管控策略
|
|
||||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00014 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","html_profile":${profiledId},"code":403,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR
|
|
||||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
|
||||||
#删除策略
|
|
||||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
|
||||||
${policyIds} Create List ${policyId1} ${policyId2}
|
|
||||||
Comment 功能端验证HTTP验证
|
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0001.bat
|
|
||||||
... ELSE set variable curl http://open.node.com/test/xiaozhu/xiaozhu.html
|
|
||||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
||||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
||||||
${starttime} Get Time
|
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
|
||||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
|
||||||
${endtime} Get Time
|
|
||||||
#日志验证
|
|
||||||
${s} Convert to String ${policyId3}
|
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
||||||
|
|
||||||
|
|
||||||
LOG 捕包进度查询
|
LOG 捕包进度查询
|
||||||
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${policyId3} v1
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${response_policy_id} v1
|
||||||
|
${response_task_id} Set Variable ${progress_response['data']['list'][0]['taskId']}
|
||||||
LOG 捕包任务详情查询
|
LOG 捕包任务详情查询
|
||||||
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${PacketCaptureresponse} v1
|
${progress_response_task} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${response_task_id} v1
|
||||||
LOG 捕包设备执行情况查询
|
LOG 捕包设备执行情况查询
|
||||||
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${PacketCaptureresponse} v1
|
${progress_response_detail} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${response_task_id} v1
|
||||||
|
log 删除task
|
||||||
|
${taskid} Set Variable {"taskId":${response_task_id}}
|
||||||
|
${delete_task_res} BaseDeleteRequest v1/troubleshooting/packetcapture/policy ${taskid}
|
||||||
|
${policyid1} Set Variable {"policyIds":[${response_policy_id}]}
|
||||||
|
log ${policyid1}
|
||||||
|
log 删除policy
|
||||||
|
${delete_policy_res} BaseDeleteRequest v1/troubleshooting/packetcapture/policy ${policyid1}
|
||||||
|
|
||||||
create_PacketCapture_Select_ISP
|
create_PacketCapture_Select_captureDuration
|
||||||
# 创建捕包策略
|
# 创建捕包策略
|
||||||
log 创建捕包策略
|
log 创建捕包策略
|
||||||
${PacketCapture} Create Dictionary policyId= policyName=zmmtest addrType=4 protocol=6 clientIp=192.168.50.60 clientPort=8080 serverIp=0.0.0.0 serverPort=0 maxPacket=1000 captureDuration=1
|
${PacketCapture} Create Dictionary policyId= policyName=${TEST NAME} addrType=4 protocol=6 clientIp=${testClentIP} clientPort=0-65535 serverIp=0.0.0.0 serverPort=0-65535 maxPacket=100000 captureDuration=5
|
||||||
${location} Create List Almaty Nursurtan
|
# ${location} Create List Almaty
|
||||||
# ${location} Create List
|
${DataCenter} Create List Almaty
|
||||||
${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
# ${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
||||||
# ${isp} Create List
|
|
||||||
log ${PacketCapture}
|
log ${PacketCapture}
|
||||||
${PacketCaptureresponse} Add&Edit_PacketCapture ${PacketCapture} ${location} ${isp}
|
${response_policy_id} ${response_task_id} Add&Edit_PacketCapture ${PacketCapture} ${DataCenter}
|
||||||
|
LOG WEQEWEQWEWEWERWERWQERWEQRWERWEQRWQEQWERWEQ
|
||||||
#创建策略
|
|
||||||
Comment 创建应答头
|
|
||||||
${objectDict} Create Dictionary objectType=http_signature isValid=${1} addItemList=html|Content-Type
|
|
||||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
|
||||||
${objectids} set Variable ${objectId}
|
|
||||||
Comment 创建安全策略
|
|
||||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol": "HTTP"} referenceObject= isValid=${1} appObjectIdArray=2
|
|
||||||
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
|
||||||
#删除策略
|
|
||||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
|
||||||
${policyIds} Create List ${policyId1}
|
|
||||||
${response} CreatePolicyFile2 ${url} ${responsePageFiles} 404china.html resPages
|
|
||||||
${profiledId} Get From Dictionary ${response} profileId
|
|
||||||
Comment 创建管控策略
|
|
||||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00014 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","html_profile":${profiledId},"code":403,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_HDR
|
|
||||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
|
||||||
#删除策略
|
|
||||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
|
||||||
${policyIds} Create List ${policyId1} ${policyId2}
|
|
||||||
Comment 功能端验证HTTP验证
|
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Intercept-HTTP-0001.bat
|
|
||||||
... ELSE set variable curl http://open.node.com/test/xiaozhu/xiaozhu.html
|
|
||||||
${stringlist} run keyword if '${systemType}'=='Windows' Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
||||||
... ELSE Create List 对不起,您请求的页面不存在、或已被删除、或暂时不可用
|
|
||||||
${starttime} Get Time
|
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
|
||||||
${rescode} SystemCommands ${commandstr} ${stringlist}
|
|
||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
|
||||||
${endtime} Get Time
|
|
||||||
#日志验证
|
|
||||||
${s} Convert to String ${policyId3}
|
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
|
||||||
|
|
||||||
|
|
||||||
LOG 捕包进度查询
|
LOG 捕包进度查询
|
||||||
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${policyId3} v1
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${response_policy_id} v1
|
||||||
|
${response_task_id} Set Variable ${progress_response['data']['list'][0]['taskId']}
|
||||||
LOG 捕包任务详情查询
|
LOG 捕包任务详情查询
|
||||||
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${PacketCaptureresponse} v1
|
${progress_response_task} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${response_task_id} v1
|
||||||
LOG 捕包设备执行情况查询
|
LOG 捕包设备执行情况查询
|
||||||
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${PacketCaptureresponse} v1
|
${progress_response_detail} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${response_task_id} v1
|
||||||
|
log 删除task
|
||||||
|
${taskid} Set Variable {"taskId":${response_task_id}}
|
||||||
|
${delete_task_res} BaseDeleteRequest v1/troubleshooting/packetcapture/policy ${taskid}
|
||||||
|
${policyid1} Set Variable {"policyIds":[${response_policy_id}]}
|
||||||
|
log ${policyid1}
|
||||||
|
log 删除policy
|
||||||
|
${delete_policy_res} BaseDeleteRequest v1/troubleshooting/packetcapture/policy ${policyid1}
|
||||||
|
|
||||||
|
create_PacketCapture_Select_captureDuration
|
||||||
|
# 创建捕包策略
|
||||||
|
log 创建捕包策略
|
||||||
|
${PacketCapture} Create Dictionary policyId= policyName=${TEST NAME} addrType=4 protocol=6 clientIp=${testClentIP} clientPort=0-65535 serverIp=${testClentIP2} serverPort=0-65535 maxPacket=100000 captureDuration=5
|
||||||
|
# ${location} Create List Almaty
|
||||||
|
${DataCenter} Create List Almaty
|
||||||
|
# ${isp} Create List transtel tnsplus ktel-mask ktel-bng ktel-mxpe
|
||||||
|
log ${PacketCapture}
|
||||||
|
${response_policy_id} ${response_task_id} Add&Edit_PacketCapture ${PacketCapture} ${DataCenter}
|
||||||
|
LOG WEQEWEQWEWEWERWERWQERWEQRWERWEQRWQEQWERWEQ
|
||||||
|
LOG 捕包进度查询
|
||||||
|
${progress_response} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress policyId=${response_policy_id} v1
|
||||||
|
${response_task_id} Set Variable ${progress_response['data']['list'][0]['taskId']}
|
||||||
|
LOG 捕包任务详情查询
|
||||||
|
${progress_response_task} BaseGetRequestForV2 troubleshooting/packetcapture/log/detail taskId=${response_task_id} v1
|
||||||
|
LOG 捕包设备执行情况查询
|
||||||
|
${progress_response_detail} BaseGetRequestForV2 troubleshooting/packetcapture/log/progress/detail taskId=${response_task_id} v1
|
||||||
|
log 删除task
|
||||||
|
${taskid} Set Variable {"taskId":${response_task_id}}
|
||||||
|
${delete_task_res} BaseDeleteRequest v1/troubleshooting/packetcapture/policy ${taskid}
|
||||||
|
${policyid1} Set Variable {"policyIds":[${response_policy_id}]}
|
||||||
|
log ${policyid1}
|
||||||
|
log 删除policy
|
||||||
|
${delete_policy_res} BaseDeleteRequest v1/troubleshooting/packetcapture/policy ${policyid1}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
287
01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_Rtp.robot
Normal file
287
01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_Rtp.robot
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown DeletePolicyAndGroupObject ${policyIds} ${objectids}
|
||||||
|
Force Tags tsg_bf_api Trusted_Certificate_Authorities
|
||||||
|
Library String
|
||||||
|
Library OperatingSystem
|
||||||
|
Library Selenium2Library
|
||||||
|
Library Collections
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/Common.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||||
|
Resource ../../../../03-Variable/BifangApiVariable.txt
|
||||||
|
Library OperatingSystem
|
||||||
|
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
Resource ../../../../03-Variable/Policy_Objects_Module.txt
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/Object.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/Log.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/Common.robot
|
||||||
|
Library json
|
||||||
|
Library DateTime
|
||||||
|
Library demjson
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot
|
||||||
|
Library ../../../../04-CustomLibrary/Library/VerifyPolicy.py
|
||||||
|
Resource ../../../../05-Other/AllFlowCaseVariable.txt
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /v1/policy/profile/trustedcacertobj
|
||||||
|
${certId} ${EMPTY}
|
||||||
|
${policyIds} ${EMPTY}
|
||||||
|
${objectids} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
VerifySecurity--Allow-SIP-example
|
||||||
|
[Tags] VerifyAllowSipexample
|
||||||
|
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest"}
|
||||||
|
${san} Create Dictionary attributeType=string attributeName=san appId=126 appName=ssl protocol=ssl attributeValue={"string": "verify.com"}
|
||||||
|
${cn} Create Dictionary attributeType=string attributeName=cn appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest.com"}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test3"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"192.168.50.3","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${sni} ${san} ${cn} ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
# 将 策略id 加入对象 id
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id}
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity-Allow-Rtp-00001
|
||||||
|
[Tags] VerifyAllowRtp00001
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"65500","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity-Allow-Rtp-00002And0004
|
||||||
|
[Tags] VerifyAllowRtp00002
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity-Allow-Rtp-00003
|
||||||
|
[Tags] VerifyAllowRtp00003
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity-Allow-Rtp-00005
|
||||||
|
[Tags] VerifyAllowRtp00005
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"30000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity-Allow-Rtp-00006
|
||||||
|
[Tags] VerifyAllowRtp00006
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity-Allow-Rtp-00008
|
||||||
|
[Tags] VerifyAllowRtp00008
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"60000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity-Allow-Rtp-00009
|
||||||
|
[Tags] VerifyAllowRtp00009
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"20000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity-Allow-Rtp-000010
|
||||||
|
[Tags] VerifyAllowRtp000010
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "142"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"1.1.1.1","port":"2222","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"${testClentIP3}","port":"50000","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
483
01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_sip.robot
Normal file
483
01-TestCase/tsg_bfapi/setting/Verify/VerifySecurity_sip.robot
Normal file
@@ -0,0 +1,483 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Test Teardown DeletePolicyAndGroupObject ${policyIds} ${objectids}
|
||||||
|
Force Tags tsg_bf_api Trusted_Certificate_Authorities
|
||||||
|
Library String
|
||||||
|
Library OperatingSystem
|
||||||
|
Library Selenium2Library
|
||||||
|
Library Collections
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/Common.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot
|
||||||
|
Resource ../../../../03-Variable/BifangApiVariable.txt
|
||||||
|
Library OperatingSystem
|
||||||
|
Resource ../../../../02-Keyword/tsg_adc/SystemCommand.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/LogVariable.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/ApiRequest.robot
|
||||||
|
Resource ../../../../03-Variable/AllFlowCaseVariable.txt
|
||||||
|
Resource ../../../../03-Variable/Policy_Objects_Module.txt
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/PolicyObject.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/Policy.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/Object.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/Log.robot
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/Common.robot
|
||||||
|
Library json
|
||||||
|
Library DateTime
|
||||||
|
Library demjson
|
||||||
|
Resource ../../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot
|
||||||
|
Library ../../../../04-CustomLibrary/Library/VerifyPolicy.py
|
||||||
|
Resource ../../../../05-Other/AllFlowCaseVariable.txt
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${url} /v1/policy/profile/trustedcacertobj
|
||||||
|
${certId} ${EMPTY}
|
||||||
|
${policyIds} ${EMPTY}
|
||||||
|
${objectids} ${EMPTY}
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
VerifySecurity--Allow-SIP-example
|
||||||
|
[Tags] VerifyAllowSipexample
|
||||||
|
log ${intid}
|
||||||
|
#新增策略验证
|
||||||
|
#创建attributes中的字典
|
||||||
|
${sni} Create Dictionary attributeType=string attributeName=sni appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest"}
|
||||||
|
${san} Create Dictionary attributeType=string attributeName=san appId=126 appName=ssl protocol=ssl attributeValue={"string": "verify.com"}
|
||||||
|
${cn} Create Dictionary attributeType=string attributeName=cn appId=126 appName=ssl protocol=ssl attributeValue={"string": "verifytest.com"}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "126"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test3"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"192.168.50.3","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${sni} ${san} ${cn} ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
# 将 策略id 加入对象 id
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id}
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity--Allow-SIP-00001_To_003
|
||||||
|
[Tags] VerifyAllowSip0001_to_0003
|
||||||
|
log ${intid}
|
||||||
|
#新增策略验证1
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
sleep 5
|
||||||
|
#新增策略验证2
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
sleep 5
|
||||||
|
#新增策略验证3
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
sleep 5
|
||||||
|
#新增策略验证4
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
sleep 5
|
||||||
|
#新增策略验证5
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP1}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
#新增策略验证6
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
sleep 5
|
||||||
|
#新增策略验证7
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP3}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
sleep 5
|
||||||
|
#新增策略验证8
|
||||||
|
#创建attributes中的字典
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP4}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
VerifySecurity--Allow-SIP-000011and000012
|
||||||
|
[Tags] Verify
|
||||||
|
#新增策略验证1
|
||||||
|
#创建attributes中的字典
|
||||||
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzyq12voip"}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
#新增策略验证2
|
||||||
|
#创建attributes中的字典
|
||||||
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "zdjzy22131"}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
#新增策略验证3
|
||||||
|
#创建attributes中的字典
|
||||||
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "yq12v1ss"}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
#新增策略验证4
|
||||||
|
#创建attributes中的字典
|
||||||
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "12voip888"}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity--Allow-SIP-000013and00014
|
||||||
|
[Tags] Verify
|
||||||
|
#新增策略验证1
|
||||||
|
#创建attributes中的字典
|
||||||
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "wx7051406391"}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
#新增策略验证2
|
||||||
|
#创建attributes中的字典
|
||||||
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "wx7053123121231"}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
#新增策略验证3
|
||||||
|
#创建attributes中的字典
|
||||||
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "51406afswr"}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
#新增策略验证4
|
||||||
|
#创建attributes中的字典
|
||||||
|
${from} Create Dictionary attributeType=string attributeName=from appId=120 appName=SIP protocol=SIP attributeValue={"string": "afsfsfsf51406391"}
|
||||||
|
${to}
|
||||||
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "120"}
|
||||||
|
${subscriberid} Create Dictionary attributeType=string attributeName=subscriberid attributeValue={"string": "test56"}
|
||||||
|
${ipsource} Create Dictionary attributeType=ip attributeName=source attributeValue={"ip":"${testClentIP2}","port":"6666","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_SOURCE_ADDR"}
|
||||||
|
${ipdestination} Create Dictionary attributeType=ip attributeName=destination attributeValue={"ip":"254.253.252.251","port":"1","addrType":4,"protocol":"6","tableName":"TSG_SECURITY_DESTINATION_ADDR"}
|
||||||
|
# 合成attributes字典集
|
||||||
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination}
|
||||||
|
${verifySession} Create Dictionary attributes=${attributes}
|
||||||
|
${verifyList} Create Dictionary policyType=tsg_security verifySession=${verifySession}
|
||||||
|
log ${verifyList}
|
||||||
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
||||||
|
# 打印检查结果
|
||||||
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${policyId}
|
||||||
|
# ${objectids} Create List ${object_Source_Id} ${object_Destination_Id} ${object_SubId_Id} ${object_SNI_Id} ${object_SAN_Id} ${object_CN_Id} ${policyId}
|
||||||
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
||||||
|
log 1111111111111111${objectid_verify}
|
||||||
|
${testType} Evaluate type($objectid_verify)
|
||||||
|
${testType} Evaluate type($resData)
|
||||||
|
log 222222222222222${resData}
|
||||||
|
sleep 5
|
||||||
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
||||||
|
# # ${ok} VerifyProxy ${objectids} ${resData}
|
||||||
|
Should Be Equal As Strings ${ok} true
|
||||||
|
|
||||||
|
VerifySecurity--Allow-SIP-000016
|
||||||
|
[Tags] Verify
|
||||||
|
|
||||||
|
|
||||||
205
01-TestCase/tsg_ui/ui_proxy/ProxyCase.robot
Normal file
205
01-TestCase/tsg_ui/ui_proxy/ProxyCase.robot
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Force Tags tsg-ui Policies Proxy
|
||||||
|
Library Selenium2Library
|
||||||
|
Resource ../../../02-Keyword/tsg_ui/objects/NewObjectPages.robot
|
||||||
|
Resource ../../../02-Keyword/tsg_ui/objects/NewObject.robot
|
||||||
|
Resource ../../../02-Keyword/tsg_ui/Menu.robot
|
||||||
|
Resource ../../../03-Variable/PolicyObjectDefault.txt
|
||||||
|
Resource ../../../02-Keyword/tsg_ui/policy/UIPolicy.robot
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
|
||||||
|
CreateProxyAllow
|
||||||
|
[Tags] Positive UI Proxy Policies Allow
|
||||||
|
CreatePage FQDN single ProxyFQDN keywordtext=*travelgam.com
|
||||||
|
CreatePage URL single ProxyURL keywordtext=*travelgam.com
|
||||||
|
CreatePage HTTPSignature single ProxyHTTPSignature reqrestype=req reqresheader=ck keywordtext=1234@#%
|
||||||
|
${ip_name1} create list Proxy_IP
|
||||||
|
${filter} create list Host URL Request Header Response Header
|
||||||
|
${Host} create list ProxyFQDN
|
||||||
|
${URL} create list ProxyURL
|
||||||
|
${Request Header} create list ProxyHTTPSignature
|
||||||
|
${Response Header} create list ProxyHTTPSignature
|
||||||
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header}
|
||||||
|
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${destinationAddIpList} Create List ${dip1}
|
||||||
|
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||||
|
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=Proxy_IP Ipclienttext1=192.168.40.11-192.168.40.110 Port=1-65535
|
||||||
|
${sourceAddIpList} Create List ${sip}
|
||||||
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||||
|
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||||
|
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} DestinationInfo=${destinationInfo} FilterInfo=${filterInfo}
|
||||||
|
PoliciesDelete
|
||||||
|
|
||||||
|
CreateProxyDeny
|
||||||
|
[Tags] Positive UI Proxy Policies Deny
|
||||||
|
CreatePage Key single proxykey keywordtext=Poplar Systems
|
||||||
|
${httpsignature} set variable ProxyHTTPSignature
|
||||||
|
${Key} set variable proxykey
|
||||||
|
${ip_name1} create list Proxy_IP
|
||||||
|
${filter} create list Host URL Request Header Response Header Request Content Response Content
|
||||||
|
${Host} create list ProxyFQDN
|
||||||
|
${URL} create list ProxyURL
|
||||||
|
${Request Header} create list ${httpsignature}
|
||||||
|
${Response Header} create list ${httpsignature}
|
||||||
|
${Request Content} create list ${Key}
|
||||||
|
${Response Content} create list ${Key}
|
||||||
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header} Request Contentname=${Request Content} Response Contentname=${Response Content}
|
||||||
|
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${destinationAddIpList} Create List ${dip1}
|
||||||
|
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||||
|
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${sourceAddIpList} Create List ${sip}
|
||||||
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||||
|
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Deny ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||||
|
${ProxyDenyadd} Create Dictionary DenyCode=403 Action=Deny ContentType=TEXT TextValue=Test
|
||||||
|
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} ProxyDenyadd=${ProxyDenyadd}
|
||||||
|
PoliciesDelete
|
||||||
|
|
||||||
|
CreateProxyMonitor
|
||||||
|
[Tags] Positive UI Proxy Policies Monitor
|
||||||
|
${httpsignature} set variable ProxyHTTPSignature
|
||||||
|
${Key} set variable proxykey
|
||||||
|
${ip_name1} create list Proxy_IP
|
||||||
|
${filter} create list Host URL Request Header Response Header Request Content Response Content
|
||||||
|
${Host} create list ProxyFQDN
|
||||||
|
${URL} create list ProxyURL
|
||||||
|
${Request Header} create list ${httpsignature}
|
||||||
|
${Response Header} create list ${httpsignature}
|
||||||
|
${Request Content} create list ${Key}
|
||||||
|
${Response Content} create list ${Key}
|
||||||
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header} Request Contentname=${Request Content} Response Contentname=${Response Content}
|
||||||
|
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${destinationAddIpList} Create List ${dip1}
|
||||||
|
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||||
|
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${sourceAddIpList} Create List ${sip}
|
||||||
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||||
|
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Monitor ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||||
|
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
|
||||||
|
PoliciesDelete
|
||||||
|
|
||||||
|
CreateProxyRedirect
|
||||||
|
[Tags] Positive UI Proxy Policies Redirect
|
||||||
|
${httpsignature} set variable ProxyHTTPSignature
|
||||||
|
${Key} set variable proxykey
|
||||||
|
${ip_name1} create list Proxy_IP
|
||||||
|
${filter} create list Host URL Request Header Response Header Request Content
|
||||||
|
${Host} create list ProxyFQDN
|
||||||
|
${URL} create list ProxyURL
|
||||||
|
${Request Header} create list ${httpsignature}
|
||||||
|
${Response Header} create list ${httpsignature}
|
||||||
|
${Request Content} create list ${Key}
|
||||||
|
${HTTPRedirectadd} Create Dictionary Response Code=301 Redirect URL=https://www.vip.com
|
||||||
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header} Request Contentname=${Request Content}
|
||||||
|
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${destinationAddIpList} Create List ${dip1}
|
||||||
|
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||||
|
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${sourceAddIpList} Create List ${sip}
|
||||||
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||||
|
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Redirect ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||||
|
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} HTTPRedirectadd=${HTTPRedirectadd}
|
||||||
|
PoliciesDelete
|
||||||
|
|
||||||
|
CreateProxyReplace
|
||||||
|
[Tags] Positive UI Proxy Policies Replace
|
||||||
|
${httpsignature} set variable ProxyHTTPSignature
|
||||||
|
${ip_name1} create list Proxy_IP
|
||||||
|
${filter} create list Host URL Request Header Response Header
|
||||||
|
${Host} create list ProxyFQDN
|
||||||
|
${URL} create list ProxyURL
|
||||||
|
${Request Header} create list ${httpsignature}
|
||||||
|
${Response Header} create list ${httpsignature}
|
||||||
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header}
|
||||||
|
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${destinationAddIpList} Create List ${dip1}
|
||||||
|
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||||
|
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${sourceAddIpList} Create List ${sip}
|
||||||
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||||
|
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Replace ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||||
|
${ParametersType} create list HTTP Request-URI
|
||||||
|
${ReplaceActionParameters} Create Dictionary ParametersType=${ParametersType} RequestURIFind=test RequestURIReplacewith=TEXT
|
||||||
|
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} ReplaceActionParameters=${ReplaceActionParameters}
|
||||||
|
PoliciesDelete
|
||||||
|
|
||||||
|
CreateProxyHijack
|
||||||
|
[Tags] Positive UI Proxy Policies Hijack
|
||||||
|
${httpsignature} set variable ProxyHTTPSignature
|
||||||
|
${ip_name1} create list Proxy_IP
|
||||||
|
${filter} create list Host URL Request Header Response Header
|
||||||
|
${Host} create list ProxyFQDN
|
||||||
|
${URL} create list ProxyURL
|
||||||
|
${Request Header} create list ${httpsignature}
|
||||||
|
${Response Header} create list ${httpsignature}
|
||||||
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header}
|
||||||
|
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${destinationAddIpList} Create List ${dip1}
|
||||||
|
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||||
|
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${sourceAddIpList} Create List ${sip}
|
||||||
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||||
|
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Hijack ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||||
|
${HijackFileadd} Create Dictionary SearchorCreate=Search Hijackname=by自动化测试勿动
|
||||||
|
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} HijackFileadd=${HijackFileadd}
|
||||||
|
PoliciesDelete
|
||||||
|
|
||||||
|
CreateProxyInsert
|
||||||
|
[Tags] Positive UI Proxy Policies Insert
|
||||||
|
${httpsignature} set variable ProxyHTTPSignature
|
||||||
|
${ip_name1} create list Proxy_IP
|
||||||
|
${filter} create list Host URL Request Header Response Header
|
||||||
|
${Host} create list ProxyFQDN
|
||||||
|
${URL} create list ProxyURL
|
||||||
|
${Request Header} create list ${httpsignature}
|
||||||
|
${Response Header} create list ${httpsignature}
|
||||||
|
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header}
|
||||||
|
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${destinationAddIpList} Create List ${dip1}
|
||||||
|
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||||
|
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||||
|
${sourceAddIpList} Create List ${sip}
|
||||||
|
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||||
|
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Insert ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||||
|
${InsertScript} Create Dictionary SearchorCreate=Search Insertname=自动化-勿动
|
||||||
|
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} InsertScript=${InsertScript}
|
||||||
|
PoliciesDelete
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
*** Settings ***
|
*** Settings ***
|
||||||
|
Force Tags tsg-ui Policies Security
|
||||||
Library Selenium2Library
|
Library Selenium2Library
|
||||||
Resource ../../../02-Keyword/tsg_ui/objects/NewObjectPages.robot
|
Resource ../../../02-Keyword/tsg_ui/objects/NewObjectPages.robot
|
||||||
Resource ../../../02-Keyword/tsg_ui/objects/NewObject.robot
|
Resource ../../../02-Keyword/tsg_ui/objects/NewObject.robot
|
||||||
@@ -421,18 +422,3 @@ CreateSecurityIntercept
|
|||||||
${policyInfo} Create Dictionary PolicyType=Security Policy PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=1
|
${policyInfo} Create Dictionary PolicyType=Security Policy PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=1
|
||||||
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} DestinationInfo=${destinationInfo} FilterInfo=${filterInfo}
|
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} DestinationInfo=${destinationInfo} FilterInfo=${filterInfo}
|
||||||
PoliciesDelete
|
PoliciesDelete
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ EffectiveRangeValueType2
|
|||||||
FOR ${var} IN @{list1}
|
FOR ${var} IN @{list1}
|
||||||
Append To List ${valueList1} ${var}
|
Append To List ${valueList1} ${var}
|
||||||
END
|
END
|
||||||
${obj1} Create Dictionary tag=location value=${valueList1}
|
${obj1} Create Dictionary tag=data_center value=${valueList1}
|
||||||
# ISP
|
# ISP
|
||||||
${valueList2} Create List
|
${valueList2} Create List
|
||||||
${list2} Evaluate re.split('[&]', '${list}[1]') re
|
${list2} Evaluate re.split('[&]', '${list}[1]') re
|
||||||
@@ -173,7 +173,7 @@ EffectiveRangeValueType3
|
|||||||
FOR ${var} IN @{list}
|
FOR ${var} IN @{list}
|
||||||
Append To List ${valueList} ${var}
|
Append To List ${valueList} ${var}
|
||||||
END
|
END
|
||||||
${obj} Create Dictionary tag=location value=${valueList}
|
${obj} Create Dictionary tag=data_center value=${valueList}
|
||||||
#适应adc设定标签
|
#适应adc设定标签
|
||||||
#${obj} Create Dictionary tag=device_id value=${valueList}
|
#${obj} Create Dictionary tag=device_id value=${valueList}
|
||||||
${return} Create List ${obj}
|
${return} Create List ${obj}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Resource ../../../03-Variable/BifangApiVariable.txt
|
|||||||
|
|
||||||
UIAddPolicies
|
UIAddPolicies
|
||||||
[Arguments] ${PolicyInfo} ${SourceInfo}=null ${DestinationInfo}=null ${FilterInfo}=null ${Subactionadd}=null ${Keyring}=null ${MirrorDecryptedTrafficInfo}=null ${DecryptionProfile}=null
|
[Arguments] ${PolicyInfo} ${SourceInfo}=null ${DestinationInfo}=null ${FilterInfo}=null ${Subactionadd}=null ${Keyring}=null ${MirrorDecryptedTrafficInfo}=null ${DecryptionProfile}=null
|
||||||
... ${ProxyDenyadd}=null ${DenyRedirectadd}=null ${ReplaceActionParameters}=null ${HijackFileadd}=null ${InsertScript}=null
|
... ${ProxyDenyadd}=null ${DenyRedirectadd}=null ${HTTPRedirectadd}=null ${ReplaceActionParameters}=null ${HijackFileadd}=null ${InsertScript}=null
|
||||||
[Documentation] 创建策略
|
[Documentation] 创建策略
|
||||||
... 调用次关键字前需要添加参数:
|
... 调用次关键字前需要添加参数:
|
||||||
... ${PolicyInfo}是个字典:实例 ${PolicyInfo} Create Dictionary PolicyType=Security Policy PolicyName=${TEST NAME} PolicyAction=deny PolicySubAction=RST ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
... ${PolicyInfo}是个字典:实例 ${PolicyInfo} Create Dictionary PolicyType=Security Policy PolicyName=${TEST NAME} PolicyAction=deny PolicySubAction=RST ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||||
@@ -78,18 +78,20 @@ UIAddPolicies
|
|||||||
Run Keyword If "${DestinationInfo}"=="${EMPTY}" log there is no DestinationInfo
|
Run Keyword If "${DestinationInfo}"=="${EMPTY}" log there is no DestinationInfo
|
||||||
... ELSE UIPolicy.CreateEditDeleteDestination ${DestinationInfo}
|
... ELSE UIPolicy.CreateEditDeleteDestination ${DestinationInfo}
|
||||||
|
|
||||||
UIPolicy.Create-Application-Button ${PolicyType} ${ApplicationSearchV} ${PolicyAction}
|
UIPolicy.Create-Application-Button ${PolicyType} ${ApplicationSearchV} ${PolicyAction}
|
||||||
#编辑filter
|
#编辑filter
|
||||||
Run Keyword If "${FilterInfo}"=="null" log there is no FilterInfo
|
Run Keyword If "${FilterInfo}"=="null" log there is no FilterInfo
|
||||||
... ELSE Create-Filter-SecurityOrProxy ${PolicyType} ${ApplicationSearchV}[0] ${FilterInfo}
|
... ELSE Create-Filter-SecurityOrProxy ${PolicyType} ${ApplicationSearchV}[0] ${FilterInfo} ${PolicyAction}
|
||||||
Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="Deny" run keywords sleep ${sleep}
|
Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="Deny" run keywords sleep ${sleep}
|
||||||
... AND Deny-subaction-1 ${PolicyAction} ${PolicySubAction} ${Subactionadd}
|
... AND Deny-subaction-1 ${PolicyAction} ${PolicySubAction} ${Subactionadd}
|
||||||
Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="intercept" and "${ApplicationSearchV}"=="SSL" run keywords sleep ${sleep}
|
Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="intercept" and "${ApplicationSearchV}"=="SSL" run keywords sleep ${sleep}
|
||||||
... AND Interceptadd ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile}
|
... AND Interceptadd ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile}
|
||||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Deny" run keywords sleep ${sleep}
|
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Deny" run keywords sleep ${sleep}
|
||||||
... AND Proxy-Deny ${ProxyDenyadd}
|
... AND Proxy-Deny ${ProxyDenyadd}
|
||||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Redirect" run keywords sleep ${sleep}
|
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Redirect" and "${ApplicationSearch}" == "DoH" run keywords sleep ${sleep}
|
||||||
... AND Deny-Redirect ${DenyRedirectadd}
|
... AND Deny-Redirect ${DenyRedirectadd}
|
||||||
|
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Redirect" and "${ApplicationSearch}" == "HTTP" run keywords sleep ${sleep}
|
||||||
|
... AND ProxyHTTPRedirect ${HTTPRedirectadd}
|
||||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Replace" run keywords sleep ${sleep}
|
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Replace" run keywords sleep ${sleep}
|
||||||
... AND Replace-Action-Parameters-for1 ${ReplaceActionParameters}
|
... AND Replace-Action-Parameters-for1 ${ReplaceActionParameters}
|
||||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Hijack" run keywords sleep ${sleep}
|
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Hijack" run keywords sleep ${sleep}
|
||||||
@@ -497,7 +499,7 @@ Create-name
|
|||||||
run keyword if "${PolicyType}"=="Security Policy" run keywords sleep ${sleep}
|
run keyword if "${PolicyType}"=="Security Policy" run keywords sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[2]/label[contains(text(), "Name")]/following-sibling::div/div/input ${Name}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[2]/label[contains(text(), "Name")]/following-sibling::div/div/input ${Name}
|
||||||
run keyword if "${PolicyType}"=="Proxy Policy" run keywords sleep ${sleep}
|
run keyword if "${PolicyType}"=="Proxy Policy" run keywords sleep ${sleep}
|
||||||
... AND input text id=manipulation_elInput_policyName ${Name}
|
... AND input text id=manipulation_elInput_policyName1 ${Name}
|
||||||
Create-actions
|
Create-actions
|
||||||
[Arguments] ${PolicyType} ${Action}
|
[Arguments] ${PolicyType} ${Action}
|
||||||
sleep ${sleep}
|
sleep ${sleep}
|
||||||
@@ -606,7 +608,7 @@ ProxyApplicationSearch
|
|||||||
[Documentation] 调用次关键字前需要添加必填参数:
|
[Documentation] 调用次关键字前需要添加必填参数:
|
||||||
... ${Action}:填入是action的内容,例如redirect或deny
|
... ${Action}:填入是action的内容,例如redirect或deny
|
||||||
... 选择search对象
|
... 选择search对象
|
||||||
run keyword if "${Action}"=="redirect" run keywords sleep ${sleep}
|
run keyword if "${Action}"=="Redirect" run keywords sleep ${sleep}
|
||||||
... AND click element id=interceptionadd_application
|
... AND click element id=interceptionadd_application
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND HttpOrDoh ${HttpOrDoh}
|
... AND HttpOrDoh ${HttpOrDoh}
|
||||||
@@ -616,16 +618,17 @@ HttpOrDoh
|
|||||||
[Documentation] 调用次关键字前需要添加必填参数:
|
[Documentation] 调用次关键字前需要添加必填参数:
|
||||||
... ${HttpOrDoh}:填入是Application的内容,例如Doh或HTTP
|
... ${HttpOrDoh}:填入是Application的内容,例如Doh或HTTP
|
||||||
... 选择search对象
|
... 选择search对象
|
||||||
|
${HttpOrDoh} set variable ${HttpOrDoh}[0]
|
||||||
run keyword if "${HttpOrDoh}"=="HTTP" run keywords sleep ${sleep}
|
run keyword if "${HttpOrDoh}"=="HTTP" run keywords sleep ${sleep}
|
||||||
... AND click element id=interceptionadd_checkappshow1
|
... AND click element id=interceptionadd_checkappshow1
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[7]/div[3]/div/button
|
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[7]/div[3]/div/button
|
||||||
... ELSE IF "${HttpOrDoh}"=="Doh" run keywords sleep ${sleep}
|
... ELSE IF "${HttpOrDoh}"=="DoH" run keywords sleep ${sleep}
|
||||||
... AND click element id=interceptionadd_checkappshow0
|
... AND click element id=interceptionadd_checkappshow0
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[7]/div[3]/div/button
|
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[7]/div[3]/div/button
|
||||||
Create-Filter-SecurityOrProxy
|
Create-Filter-SecurityOrProxy
|
||||||
[Arguments] ${PolicyType} ${Application} ${addFilter}
|
[Arguments] ${PolicyType} ${Application} ${addFilter} ${PolicyAction}
|
||||||
[Documentation] 点击Application的加号
|
[Documentation] 点击Application的加号
|
||||||
${return} ${Filter} Run Keyword And Ignore Error Get From Dictionary ${addFilter} Filter
|
${return} ${Filter} Run Keyword And Ignore Error Get From Dictionary ${addFilter} Filter
|
||||||
${Filter} Run Keyword If "${return}"=="FAIL" or "${Filter}"=="${EMPTY}" set variable null
|
${Filter} Run Keyword If "${return}"=="FAIL" or "${Filter}"=="${EMPTY}" set variable null
|
||||||
@@ -699,8 +702,8 @@ Create-Filter-SecurityOrProxy
|
|||||||
run keyword if "${PolicyType}"=="Security Policy" Create-SecurityFilter-judge ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname}
|
run keyword if "${PolicyType}"=="Security Policy" Create-SecurityFilter-judge ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname}
|
||||||
... ${Response Contentname} ${SSLSNIname} ${CNname} ${SANname} ${QNAMEname} ${Subjectname} ${MAILContentname} ${Attachment Namename}
|
... ${Response Contentname} ${SSLSNIname} ${CNname} ${SANname} ${QNAMEname} ${Subjectname} ${MAILContentname} ${Attachment Namename}
|
||||||
... ${Attachment Contentname} ${Fromname} ${Toname} ${MAILAccountname} ${URIname} ${FTPContentname} ${FTPAccountname} ${QUICSNIname}
|
... ${Attachment Contentname} ${Fromname} ${Toname} ${MAILAccountname} ${URIname} ${FTPContentname} ${FTPAccountname} ${QUICSNIname}
|
||||||
run keyword if "${PolicyType}"=="Proxy Policy" Create-ProxyFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname}
|
run keyword if "${PolicyType}"=="Proxy Policy" and "${PolicyAction}" == "Redirect" Create_Proxy_RedirectFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ${Response Contentname} ${QNAMEname} ${DohHostname}
|
||||||
... ${Response Contentname} ${QNAMEname} ${DohHostname}
|
... ELSE Create-ProxyFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ${Response Contentname} ${QNAMEname} ${DohHostname}
|
||||||
|
|
||||||
Create-SecurityFilter-judge
|
Create-SecurityFilter-judge
|
||||||
[Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null
|
[Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null
|
||||||
@@ -803,6 +806,7 @@ Create-SecurityFilter
|
|||||||
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[2]
|
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[2]
|
||||||
... AND Create-Object-Search ${Toname} ${i}
|
... AND Create-Object-Search ${Toname} ${i}
|
||||||
END
|
END
|
||||||
|
|
||||||
Create-ProxyFilter
|
Create-ProxyFilter
|
||||||
[Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null
|
[Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null
|
||||||
... ${Response Contentname}=null ${QNAMEname}=null ${DohHostname}=null
|
... ${Response Contentname}=null ${QNAMEname}=null ${DohHostname}=null
|
||||||
@@ -818,29 +822,60 @@ Create-ProxyFilter
|
|||||||
sleep ${sleep}
|
sleep ${sleep}
|
||||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Host" run keywords sleep ${sleep}
|
run keyword if "${Application}"=="HTTP" and "${i}"=="Host" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
|
||||||
... AND Create-Object-Search ${Hostname} ${i}
|
... AND Create-Object-Proxy-Search ${Hostname} ${i}
|
||||||
run keyword if "${Application}"=="HTTP" and "${i}"=="URL" run keywords sleep ${sleep}
|
run keyword if "${Application}"=="HTTP" and "${i}"=="URL" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
|
||||||
... AND Create-Object-Search ${URLname} ${i}
|
... AND Create-Object-Proxy-Search ${URLname} ${i}
|
||||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Header" run keywords sleep ${sleep}
|
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Header" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow2"][contains(text(), "${i}")]
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow2"][contains(text(), "${i}")]
|
||||||
... AND Create-Object-Search ${Request Headername} ${i}
|
... AND Create-Object-Proxy-Search ${Request Headername} ${i}
|
||||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Header" run keywords sleep ${sleep}
|
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Header" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow3"][contains(text(), "${i}")]
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow3"][contains(text(), "${i}")]
|
||||||
... AND Create-Object-Search ${Response Headername} ${i}
|
... AND Create-Object-Proxy-Search ${Response Headername} ${i}
|
||||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Content" run keywords sleep ${sleep}
|
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Content" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow4"][contains(text(), "${i}")]
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow4"][contains(text(), "${i}")]
|
||||||
... AND Create-Object-Search ${Request Contentname} ${i}
|
... AND Create-Object-Proxy-Search ${Request Contentname} ${i}
|
||||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Content" run keywords sleep ${sleep}
|
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Content" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow5"][contains(text(), "${i}")]
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow5"][contains(text(), "${i}")]
|
||||||
... AND Create-Object-Search ${Response Contentname} ${i}
|
... AND Create-Object-Proxy-Search ${Response Contentname} ${i}
|
||||||
run keyword if "${Application}"=="Doh" and "${i}"=="Host" run keywords sleep ${sleep}
|
run keyword if "${Application}"=="Doh" and "${i}"=="Host" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
|
||||||
... AND Create-Object-Search ${DohHostname} ${i}
|
... AND Create-Object-Proxy-Search ${DohHostname} ${i}
|
||||||
run keyword if "${Application}"=="Doh" and "${i}"=="QNAME" run keywords sleep ${sleep}
|
run keyword if "${Application}"=="Doh" and "${i}"=="QNAME" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
|
||||||
... AND Create-Object-Search ${QNAMEname} ${i}
|
... AND Create-Object-Proxy-Search ${QNAMEname} ${i}
|
||||||
END
|
END
|
||||||
|
|
||||||
|
Create_Proxy_RedirectFilter
|
||||||
|
[Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null
|
||||||
|
... ${Response Contentname}=null ${QNAMEname}=null ${DohHostname}=null
|
||||||
|
[Documentation] 调用次关键字前需要添加必填参数:
|
||||||
|
... ${Application}:填入是Application的内容,例如SSL或HTTP
|
||||||
|
... ${Filter}:是一个列表,列表中填入filter类型,例如Host或URL等
|
||||||
|
... name:各个对象名称的列表
|
||||||
|
... 判断添加filter类型 xpath=//*[@id="policy_paper_left"]/div[8]/div/div[1]/label[contains(text(), "${filter}")]/following-sibling::div/div //*[@id="interceptionadd_checkappshow0"][contains(text(), "${filter}")]
|
||||||
|
sleep ${sleep}
|
||||||
|
FOR ${i} IN @{Filter}
|
||||||
|
sleep ${sleep}
|
||||||
|
click element id=interceptionadd_add_filter
|
||||||
|
sleep ${sleep}
|
||||||
|
run keyword if "${Application}"=="HTTP" and "${i}"=="Host" run keywords sleep ${sleep}
|
||||||
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
|
||||||
|
... AND Create-Object-Proxy-Search ${Hostname} ${i}
|
||||||
|
run keyword if "${Application}"=="HTTP" and "${i}"=="URL" run keywords sleep ${sleep}
|
||||||
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
|
||||||
|
... AND Create-Object-Proxy-Search ${URLname} ${i}
|
||||||
|
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Header" run keywords sleep ${sleep}
|
||||||
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow2"][contains(text(), "${i}")]
|
||||||
|
... AND Create-Object-Proxy-Search ${Request Headername} ${i}
|
||||||
|
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Header" run keywords sleep ${sleep}
|
||||||
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow3"][contains(text(), "${i}")]
|
||||||
|
... AND Create-Object-Proxy-Search ${Response Headername} ${i}
|
||||||
|
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Content" run keywords sleep ${sleep}
|
||||||
|
... AND click element xpath=//*[@id="interceptionadd_checkappshow4"][contains(text(), "${i}")]
|
||||||
|
... AND Create-Object-Proxy-Search ${Request Contentname} ${i}
|
||||||
|
END
|
||||||
|
|
||||||
Deny-subaction-1
|
Deny-subaction-1
|
||||||
[Arguments] ${Action} ${subaction} ${Subactionadd}
|
[Arguments] ${Action} ${subaction} ${Subactionadd}
|
||||||
[Documentation] 调用次关键字前需要添加必填参数:
|
[Documentation] 调用次关键字前需要添加必填参数:
|
||||||
@@ -979,19 +1014,19 @@ Deny-Redirect
|
|||||||
... ${CNAMEvalue}:根据${QType}填入A的CNAME的域名值或AAAA的CNAME域名值
|
... ${CNAMEvalue}:根据${QType}填入A的CNAME的域名值或AAAA的CNAME域名值
|
||||||
... ${CNAMEttl}:根据${QType}填入A的CNAME的ttl值或AAAA的CNAME的ttl值
|
... ${CNAMEttl}:根据${QType}填入A的CNAME的ttl值或AAAA的CNAME的ttl值
|
||||||
... 新建Redirect
|
... 新建Redirect
|
||||||
${return} ${QType} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} QType
|
${return} ${QType} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} QType
|
||||||
${QType} Run Keyword If "${return}"=="FAIL" or "${QType}"=="${EMPTY}" set variable null
|
${QType} Run Keyword If "${return}"=="FAIL" or "${QType}"=="${EMPTY}" set variable null
|
||||||
... ELSE set variable ${QType}
|
... ELSE set variable ${QType}
|
||||||
${return} ${Avalue} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} Avalue
|
${return} ${Avalue} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} Avalue
|
||||||
${Avalue} Run Keyword If "${return}"=="FAIL" or "${Avalue}"=="${EMPTY}" set variable null
|
${Avalue} Run Keyword If "${return}"=="FAIL" or "${Avalue}"=="${EMPTY}" set variable null
|
||||||
... ELSE set variable ${Avalue}
|
... ELSE set variable ${Avalue}
|
||||||
${return} ${Attl} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} Attl
|
${return} ${Attl} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} Attl
|
||||||
${Attl} Run Keyword If "${return}"=="FAIL" or "${Attl}"=="${EMPTY}" set variable null
|
${Attl} Run Keyword If "${return}"=="FAIL" or "${Attl}"=="${EMPTY}" set variable null
|
||||||
... ELSE set variable ${Attl}
|
... ELSE set variable ${Attl}
|
||||||
${return} ${CNAMEvalue} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} CNAMEvalue
|
${return} ${CNAMEvalue} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} CNAMEvalue
|
||||||
${CNAMEvalue} Run Keyword If "${return}"=="FAIL" or "${CNAMEvalue}"=="${EMPTY}" set variable null
|
${CNAMEvalue} Run Keyword If "${return}"=="FAIL" or "${CNAMEvalue}"=="${EMPTY}" set variable null
|
||||||
... ELSE set variable ${CNAMEvalue}
|
... ELSE set variable ${CNAMEvalue}
|
||||||
${return} ${CNAMEttl} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} CNAMEttl
|
${return} ${CNAMEttl} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} CNAMEttl
|
||||||
${CNAMEttl} Run Keyword If "${return}"=="FAIL" or "${CNAMEttl}"=="${EMPTY}" set variable null
|
${CNAMEttl} Run Keyword If "${return}"=="FAIL" or "${CNAMEttl}"=="${EMPTY}" set variable null
|
||||||
... ELSE set variable ${CNAMEttl}
|
... ELSE set variable ${CNAMEttl}
|
||||||
run keyword if "${QType}"=="A" run keywords sleep ${sleep}
|
run keyword if "${QType}"=="A" run keywords sleep ${sleep}
|
||||||
@@ -1017,6 +1052,26 @@ Deny-Redirect
|
|||||||
... AND input text id=ttl01 ${CNAMEttl}
|
... AND input text id=ttl01 ${CNAMEttl}
|
||||||
sleep ${sleep}
|
sleep ${sleep}
|
||||||
click element id=interceptionadd_shezhidns
|
click element id=interceptionadd_shezhidns
|
||||||
|
|
||||||
|
ProxyHTTPRedirect
|
||||||
|
[Arguments] ${HTTPRedirectadd}
|
||||||
|
[Documentation] 调用次关键字前需要添加必填参数:
|
||||||
|
... ${Response Code}: 填入响应码302或者301
|
||||||
|
... ${Redirect URL}: 填入重定向的URL地址
|
||||||
|
${return} ${Response Code} Run Keyword And Ignore Error Get From Dictionary ${HTTPRedirectadd} Response Code
|
||||||
|
${Response Code} Run Keyword If "${return}"=="FAIL" or "${Response Code}"=="${EMPTY}" set variable null
|
||||||
|
... ELSE set variable ${Response Code}
|
||||||
|
${return} ${Redirect URL} Run Keyword And Ignore Error Get From Dictionary ${HTTPRedirectadd} Redirect URL
|
||||||
|
${Redirect URL} Run Keyword If "${return}"=="FAIL" or "${Redirect URL}"=="${EMPTY}" set variable null
|
||||||
|
... ELSE set variable ${Redirect URL}
|
||||||
|
sleep ${sleep}
|
||||||
|
click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[1]/div[1]/div/div/div/span/span/i
|
||||||
|
run keyword if "${Response Code}" == "302" or "${Response Code}" == "301" run keywords sleep ${sleep}
|
||||||
|
... AND click element //span[.="${Response Code}"]
|
||||||
|
sleep ${sleep}
|
||||||
|
input text id=manipulontion_elInput_userRegin1 ${Redirect URL}
|
||||||
|
sleep ${sleep}
|
||||||
|
|
||||||
Interceptadd
|
Interceptadd
|
||||||
[Arguments] ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile}
|
[Arguments] ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile}
|
||||||
[Documentation] 引用次关键字,填入必填参数
|
[Documentation] 引用次关键字,填入必填参数
|
||||||
@@ -1354,6 +1409,23 @@ Create-Object-Search
|
|||||||
click element xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[2]/div/div/ul/li[1]
|
click element xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[2]/div/div/ul/li[1]
|
||||||
sleep ${sleep}
|
sleep ${sleep}
|
||||||
END
|
END
|
||||||
|
|
||||||
|
Create-Object-Proxy-Search
|
||||||
|
[Arguments] ${Name} ${filter}
|
||||||
|
[Documentation] 调用次关键字前需要添加必填参数:
|
||||||
|
... ${Name}:填入是一个列表,列表内容为object的name
|
||||||
|
... 选择search对象
|
||||||
|
sleep ${sleep}
|
||||||
|
click element xpath=//*[@id="policy_paper_left"]/div[9]/div/div[1]/label[contains(text(), "${filter}")]/following-sibling::div/div
|
||||||
|
sleep ${sleep}
|
||||||
|
FOR ${i} IN @{Name}
|
||||||
|
input text xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[1]/input ${i}
|
||||||
|
sleep ${sleep}
|
||||||
|
press keys xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[1]/input ENTER
|
||||||
|
sleep ${sleep}
|
||||||
|
click element xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[2]/div/div/ul/li[1]
|
||||||
|
sleep ${sleep}
|
||||||
|
END
|
||||||
|
|
||||||
SourceIPCreateOrSearch
|
SourceIPCreateOrSearch
|
||||||
[Arguments] ${PolicyType} ${CreateOrSearch} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1}
|
[Arguments] ${PolicyType} ${CreateOrSearch} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1}
|
||||||
@@ -1656,8 +1728,8 @@ DestinationIPGroupAdd
|
|||||||
|
|
||||||
SourceCreate-name
|
SourceCreate-name
|
||||||
[Arguments] ${ObjName}
|
[Arguments] ${ObjName}
|
||||||
Wait Until Element Is Enabled id=objectAdd_name ${sleep_Wait}
|
Wait Until Element Is Enabled id=objectAdd_name1 ${sleep_Wait}
|
||||||
input text id=objectAdd_name ${ObjName}
|
input text id=objectAdd_name1 ${ObjName}
|
||||||
|
|
||||||
SourceCreate-ok
|
SourceCreate-ok
|
||||||
sleep ${sleep}
|
sleep ${sleep}
|
||||||
@@ -1783,7 +1855,7 @@ Deny-subaction
|
|||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND click element //span[.="${DenyCode}"]
|
... AND click element //span[.="${DenyCode}"]
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND
|
|
||||||
Deny-content
|
Deny-content
|
||||||
[Arguments] ${ContentType}=File ${SearchorCreate}=null ${ProfileName}=null ${File}=null ${TextValue}=null
|
[Arguments] ${ContentType}=File ${SearchorCreate}=null ${ProfileName}=null ${File}=null ${TextValue}=null
|
||||||
[Documentation] 调用次关键字前需要添加必填参数:
|
[Documentation] 调用次关键字前需要添加必填参数:
|
||||||
@@ -1796,7 +1868,7 @@ Deny-content
|
|||||||
... ${TextValue}:填入text输入框内容
|
... ${TextValue}:填入text输入框内容
|
||||||
... 添加block数据内容
|
... 添加block数据内容
|
||||||
sleep ${sleep}
|
sleep ${sleep}
|
||||||
run keyword if "${ContentType}"=="File" run keywords sleep ${sleep}
|
run keyword if "${ContentType}"=="Profile" run keywords sleep ${sleep}
|
||||||
... AND click element id=manipulation_select_blockInfo
|
... AND click element id=manipulation_select_blockInfo
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND click element id=ResponseContentFile
|
... AND click element id=ResponseContentFile
|
||||||
@@ -1804,12 +1876,12 @@ Deny-content
|
|||||||
... AND click element id=manipulation_select_htmlProfile
|
... AND click element id=manipulation_select_htmlProfile
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND Profile-SearchorCreate ${SearchorCreate} ${ProfileName} ${File}
|
... AND Profile-SearchorCreate ${SearchorCreate} ${ProfileName} ${File}
|
||||||
run keyword if "${ContentType}"=="Text" run keywords sleep ${sleep}
|
run keyword if "${ContentType}"=="TEXT" run keywords sleep ${sleep}
|
||||||
... AND click element id=manipulation_select_blockInfo
|
... AND click element id=manipulation_select_blockInfo
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND click ellement id=ResponseContentText
|
... AND click element id=ResponseContentTEXT
|
||||||
... AND sllep 1
|
... AND sleep 1
|
||||||
... AND input text id=manipulation_elInput_blockselect ${TextValue}
|
... AND input text id=manipulation_elInput_blockselect1 ${TextValue}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
|
|
||||||
|
|
||||||
@@ -1874,37 +1946,49 @@ Replace-Action-Parameters-for2
|
|||||||
... ${xxxFind}:是Find输入框输入的值
|
... ${xxxFind}:是Find输入框输入的值
|
||||||
... ${XXXReplacewith} :是 Replacewith输入框中输入的值
|
... ${XXXReplacewith} :是 Replacewith输入框中输入的值
|
||||||
FOR ${j} IN @{ParametersType}
|
FOR ${j} IN @{ParametersType}
|
||||||
run keyword if "${j}"=="RequestURI" run keywords sleep ${sleep}
|
run keyword if "${j}"=="HTTP Request-URI" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
|
... AND click element //li[.="${j}"]
|
||||||
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${RequestURIFind}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${RequestURIFind}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
|
... AND click element //li[.="${j}"]
|
||||||
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${RequestURIReplacewith}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${RequestURIReplacewith}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
run keyword if "${j}"=="RequestBody" run keywords sleep ${sleep}
|
run keyword if "${j}"=="HTTP Request Body" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
|
... AND click element //li[.="${j}"]
|
||||||
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${RequestBodyFind}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${RequestBodyFind}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${RequestBodyReplacewith}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${RequestBodyReplacewith}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
run keyword if "${j}"=="ResponseBody" run keywords sleep ${sleep}
|
run keyword if "${j}"=="HTTP Response Body" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
|
... AND click element //li[.="${j}"]
|
||||||
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${ResponseBodyFind}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${ResponseBodyFind}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${ResponseBodyReplacewith}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${ResponseBodyReplacewith}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
run keyword if "${j}"=="RequestHeader" run keywords sleep ${sleep}
|
run keyword if "${j}"=="HTTP Request Header" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
|
... AND click element //li[.="${j}"]
|
||||||
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${RequestHeaderFind}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${RequestHeaderFind}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${RequestHeaderReplacewith}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${RequestHeaderReplacewith}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
run keyword if "${j}"=="ResponseHeader" run keywords sleep ${sleep}
|
run keyword if "${j}"=="HTTP Response Header" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
|
... AND click element //li[.="${j}"]
|
||||||
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${ResponseHeaderFind}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${ResponseHeaderFind}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${ResponseHeaderReplacewith}
|
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${ResponseHeaderReplacewith}
|
||||||
@@ -1944,11 +2028,11 @@ HijackFile-SearchorCreate
|
|||||||
click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[4]/div/div/div/div
|
click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[4]/div/div/div/div
|
||||||
sleep ${sleep}
|
sleep ${sleep}
|
||||||
run keyword if "${SearchorCreate}"=="Search" run keywords sleep ${sleep}
|
run keyword if "${SearchorCreate}"=="Search" run keywords sleep ${sleep}
|
||||||
... AND input text xapth=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ${Hijackname}
|
... AND input text xpath=/html/body/div[last()]/div[1]/div[1]/ul/div[1]/div/input ${Hijackname}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND press keys xapth=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ENTER
|
... AND press keys xpath=/html/body/div[last()]/div[1]/div[1]/ul/div[1]/div/input ENTER
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[2]/div/li[1]
|
... AND click element xpath=/html/body/div[last()]/div[1]/div[1]/ul/div[2]/li[1]
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... ELSE IF "${SearchorCreate}"=="Create" run keywords sleep ${sleep}
|
... ELSE IF "${SearchorCreate}"=="Create" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/div/button
|
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/div/button
|
||||||
@@ -2008,12 +2092,12 @@ InsertScript-SearchorCreate
|
|||||||
click element id=manipulation_select_insetScript
|
click element id=manipulation_select_insetScript
|
||||||
sleep ${sleep}
|
sleep ${sleep}
|
||||||
run keyword if "${SearchorCreate}"=="Search" run keywords sleep ${sleep}
|
run keyword if "${SearchorCreate}"=="Search" run keywords sleep ${sleep}
|
||||||
... AND input text xapth=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ${Insertname}
|
... AND input text xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ${Insertname}
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
... AND press keys xapth=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ENTER
|
... AND press keys xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ENTER
|
||||||
... AND sleep ${sleep}
|
|
||||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[2]/div/li[1]
|
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
|
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[2]/li[2]
|
||||||
|
... AND sleep ${sleep}
|
||||||
... ELSE IF "${SearchorCreate}"=="Create" run keywords sleep ${sleep}
|
... ELSE IF "${SearchorCreate}"=="Create" run keywords sleep ${sleep}
|
||||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/div/button
|
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/div/button
|
||||||
... AND sleep ${sleep}
|
... AND sleep ${sleep}
|
||||||
|
|||||||
Reference in New Issue
Block a user