添加请求体、应答体and和or关系自动化用例
This commit is contained in:
@@ -835,128 +835,128 @@ ProxyPolicy-Deny-Http-00024
|
|||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
Sleep ${policyLogVerificationSleepSeconds}s
|
||||||
${endtime} Get Time
|
${endtime} Get Time
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||||
ProxyPolicy-Deny-Ssl-00025
|
ProxyPolicy-Deny-Http-00025
|
||||||
[Tags] selfserver ip+请求体and关系
|
[Tags] selfserver ip+请求体and关系
|
||||||
Comment 创建请求体
|
Comment 创建请求体
|
||||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ctes&t123
|
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=ctes&t123
|
||||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||||
${objectids} set Variable ${objectId}
|
${objectids} set Variable ${objectId}
|
||||||
Comment 创建安全策略
|
Comment 创建安全策略
|
||||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
${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}
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||||
#删除策略
|
#删除策略
|
||||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||||
${policyIds} Create List ${policyId1}
|
${policyIds} Create List ${policyId1}
|
||||||
Comment 创建管控策略
|
Comment 创建管控策略
|
||||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-SSL-00025 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00025 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||||
#删除策略
|
#删除策略
|
||||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||||
${policyIds} Create List ${policyId1} ${policyId2}
|
${policyIds} Create List ${policyId1} ${policyId2}
|
||||||
Comment 功能端验证HTTP验证
|
Comment 功能端验证HTTP验证
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-SSL-0024.bat
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv https://open.node.com/action
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
... ELSE Create List Connection reset by peer
|
||||||
${starttime} Get Time
|
${starttime} Get Time
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
Sleep ${policyVerificationSleepSeconds}s
|
||||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
Sleep ${policyLogVerificationSleepSeconds}s
|
||||||
${endtime} Get Time
|
${endtime} Get Time
|
||||||
#日志验证
|
#日志验证
|
||||||
${s} Convert to String ${policyId3}
|
${s} Convert to String ${policyId3}
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||||
|
|
||||||
ProxyPolicy-Deny-Ssl-00026
|
ProxyPolicy-Deny-Http-00026
|
||||||
[Tags] selfserver ip+请求体或关系
|
[Tags] selfserver ip+请求体或更新
|
||||||
Comment 创建请求体
|
Comment 创建请求体
|
||||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test,你好明天
|
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=test,qazx
|
||||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||||
${objectids} set Variable ${objectId}
|
${objectids} set Variable ${objectId}
|
||||||
Comment 创建安全策略
|
Comment 创建安全策略
|
||||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":1,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
${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}
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||||
#删除策略
|
#删除策略
|
||||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||||
${policyIds} Create List ${policyId1}
|
${policyIds} Create List ${policyId1}
|
||||||
Comment 创建管控策略
|
Comment 创建管控策略
|
||||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-SSL-00026 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00026 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_REQ_CONTENT
|
||||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||||
#删除策略
|
#删除策略
|
||||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||||
${policyIds} Create List ${policyId1} ${policyId2}
|
${policyIds} Create List ${policyId1} ${policyId2}
|
||||||
Comment 功能端验证HTTP验证
|
Comment 功能端验证HTTP验证
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redirect-SSL-0024.bat
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Redircet-HTTP-0024.bat
|
||||||
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv https://open.node.com/action
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=jwctest123&setCookie=12345678&contentType=content-type&resBody=Response Body" -kv http://open.node.com/action
|
||||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
... ELSE Create List Connection reset by peer
|
||||||
${starttime} Get Time
|
${starttime} Get Time
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
Sleep ${policyVerificationSleepSeconds}s
|
||||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
Sleep ${policyLogVerificationSleepSeconds}s
|
||||||
${endtime} Get Time
|
${endtime} Get Time
|
||||||
#日志验证
|
#日志验证
|
||||||
${s} Convert to String ${policyId3}
|
${s} Convert to String ${policyId3}
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||||
|
|
||||||
ProxyPolicy-Deny-Ssl-00027
|
ProxyPolicy-Deny-Http-00027
|
||||||
[Tags] selfserver ip+应答体and关系
|
[Tags] selfserver ip+应答体and关系
|
||||||
Comment 创建应答体
|
Comment 创建应答体
|
||||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response& Body
|
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response& Body
|
||||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||||
${objectids} set Variable ${objectId}
|
${objectids} set Variable ${objectId}
|
||||||
Comment 创建安全策略
|
Comment 创建安全策略
|
||||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
${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}
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||||
#删除策略
|
#删除策略
|
||||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||||
${policyIds} Create List ${policyId1}
|
${policyIds} Create List ${policyId1}
|
||||||
Comment 创建管控策略
|
Comment 创建管控策略
|
||||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-ssl-00027 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00027 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
||||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||||
#删除策略
|
#删除策略
|
||||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||||
${policyIds} Create List ${policyId1} ${policyId2}
|
${policyIds} Create List ${policyId1} ${policyId2}
|
||||||
Comment 功能端验证HTTP验证
|
Comment 功能端验证HTTP验证
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
... ELSE Create List Connection reset by peer
|
||||||
${starttime} Get Time
|
${starttime} Get Time
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
Sleep ${policyVerificationSleepSeconds}s
|
||||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
Sleep ${policyLogVerificationSleepSeconds}s
|
||||||
${endtime} Get Time
|
${endtime} Get Time
|
||||||
#日志验证
|
#日志验证
|
||||||
${s} Convert to String ${policyId3}
|
${s} Convert to String ${policyId3}
|
||||||
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
GetLogList proxy_event_log ${starttime} ${endtime} ${testClentIP} ${s} http_host open.node.com
|
||||||
|
|
||||||
ProxyPolicy-Deny-Ssl-00028
|
ProxyPolicy-Deny-Http-00028
|
||||||
[Tags] selfserver ip+应答体或关系
|
[Tags] selfserver ip+应答体或关系
|
||||||
Comment 创建应答体
|
Comment 创建应答体
|
||||||
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response,你好明天
|
${objectDict} Create Dictionary objectType=keywords isValid=${1} addItemList=Response,12345
|
||||||
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
${rescode} ${objectId} AddObject2 ${1} ${objectDict}
|
||||||
${objectids} set Variable ${objectId}
|
${objectids} set Variable ${objectId}
|
||||||
Comment 创建安全策略
|
Comment 创建安全策略
|
||||||
${policyDict} Create Dictionary policyName=SecurityPolicy-Intercept-HTTP-00001 policyType=tsg_security policyDesc=autotest userTags= action=intercept effectiveRange= userRegion={"protocol":"SSL","keyring":1,"decryption":109,"decrypt_mirror":{"enable":0,"mirror_profile":null}} referenceObject= isValid=${1} appObjectIdArray=3
|
${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}
|
${rescode} ${policyId} AddPolicy2 ${1} ${policyDict}
|
||||||
#删除策略
|
#删除策略
|
||||||
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
${policyId1} set Variable {"policyType":"tsg_security","policyIds":[${policyId}]}
|
||||||
${policyIds} Create List ${policyId1}
|
${policyIds} Create List ${policyId1}
|
||||||
Comment 创建管控策略
|
Comment 创建管控策略
|
||||||
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-ssl-00028 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
${policyDict} Create Dictionary policyName=proxyPolicy-Deny-HTTP-00028 policyType=pxy_manipulation policyDesc=autotest userTags= action=deny effectiveRange= userRegion={"method":"block","message":"Извините","code":451,"protocol":"HTTP"} isValid=${1} appObjectIdArray=2 referenceObject=${objectId}|TSG_FIELD_HTTP_RES_CONTENT
|
||||||
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
${rescode} ${policyId3} AddPolicy2 ${1} ${policyDict}
|
||||||
#删除策略
|
#删除策略
|
||||||
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
${policyId2} set Variable {"policyType":"pxy_manipulation","policyIds":[${policyId3}]}
|
||||||
${policyIds} Create List ${policyId1} ${policyId2}
|
${policyIds} Create List ${policyId1} ${policyId2}
|
||||||
Comment 功能端验证HTTP验证
|
Comment 功能端验证HTTP验证
|
||||||
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/ProxyPolicy-Deny-SSL-0019.bat
|
${commandstr} run keyword if '${systemType}'=='Windows' set variable ${curlbatpath}/selfserver/SecurityPolicy-Deny-HTTP-0017.bat
|
||||||
... ELSE set variable curl -kv -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" https://open.node.com/action
|
... ELSE set variable curl -H "Content-Type:application/x-www-form-urlencoded" -X POST -d "reqBody=test&setCookie=12345678&contentType=content-type&resBody=Response Body" http://open.node.com/action
|
||||||
@{stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset Tango Secure Gateway CA
|
${stringlist} run keyword if '${systemType}'=='Windows' Create List Connection was reset
|
||||||
... ELSE Create List Connection reset by peer Tango Secure Gateway CA
|
... ELSE Create List Connection reset by peer
|
||||||
${starttime} Get Time
|
${starttime} Get Time
|
||||||
Sleep ${policyVerificationSleepSeconds}s
|
Sleep ${policyVerificationSleepSeconds}s
|
||||||
${rescode} SystemCommand ${commandstr} @{stringlist}
|
${rescode} SystemCommands ${commandstr} ${stringlist}
|
||||||
Sleep ${policyLogVerificationSleepSeconds}s
|
Sleep ${policyLogVerificationSleepSeconds}s
|
||||||
${endtime} Get Time
|
${endtime} Get Time
|
||||||
#日志验证
|
#日志验证
|
||||||
|
|||||||
Reference in New Issue
Block a user