2021-04-08 20:09:19 +08:00
|
|
|
|
*** Settings ***
|
|
|
|
|
|
Force Tags tsg_adc_wp 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
|
|
|
|
|
|
Resource ../../../02-Keyword/tsg_bfapi/policy_object/ProcessPolicyBody.robot
|
|
|
|
|
|
Library ../../../04-CustomLibrary/Library/VerifyPolicy.py
|
|
|
|
|
|
Resource ../../../05-Other/AllFlowCaseVariable.txt
|
|
|
|
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
|
Proxy-Policy-replace-00001
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "destidotcom.wordpress.com"}
|
|
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "destidotcom.wordpress.com/contact/"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${fqdn} ${url}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId39} ${replace_objectId43} ${replace_policyId}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00002
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "airastana.com"}
|
|
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "airastana.com/kaz/kk-kz/Josparlau/Kop-baghytty-ushu"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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字典集
|
2021-04-12 14:51:02 +08:00
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${url} ${fqdn}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId44} ${replace_policyId1}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00003
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${url1} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "umcfa.webs.com/"}
|
|
|
|
|
|
${url2} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.pjpugliese.com/"}
|
|
|
|
|
|
${url3} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "carblog.co.za/"}
|
|
|
|
|
|
${url4} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.ornithomedia.com/"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${url1} ${url2} ${url3} ${url4}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId3} ${replace_policyId2}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00004
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.ino.com/news/headlines/"}
|
|
|
|
|
|
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "afsfssfMozilla/5.0afsfsdafsafs","district": "User-Agent"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${url} ${req_hdr_ua}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId5} ${replace_objectId45} ${replace_policyId3}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00005
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.bestwestern.com"}
|
|
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.bestwestern.com/en_US.html"}
|
|
|
|
|
|
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/31.0.1650.63 Safari/537.36","district": "User-Agent"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${fqdn} ${url} ${req_hdr_ua}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId7} ${replace_objectId8} ${replace_objectId9} ${replace_policyId4}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00006
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.quickenloans.com"}
|
|
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.quickenloans.com/mortgage-education/home-buyers-guide?qlsource=nav"}
|
|
|
|
|
|
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "AppleWebKitaaaaaaa","district": "User-Agent"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${fqdn} ${url} ${req_hdr_ua}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId10} ${replace_objectId11} ${replace_objectId12} ${replace_policyId5}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00007
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.gobank.com"}
|
|
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.gobank.com/mobile-banking/mobile-app"}
|
|
|
|
|
|
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "hahahahsfeSafari/537.36","district": "User-Agent"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${fqdn} ${url} ${req_hdr_ua}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId13} ${replace_objectId14} ${replace_objectId15} ${replace_policyId6}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00008
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.ghzq.com.cn/ghzq/index.html"}
|
|
|
|
|
|
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "htmlaaffe","district": "Content-Type"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${url} ${res_hdr_ct}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
2021-04-12 14:51:02 +08:00
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId17} ${replace_policyId7}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00009
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.zcool.com.cn"}
|
|
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.zcool.com.cn/"}
|
|
|
|
|
|
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html; charset=utf-8","district": "Content-Type"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${fqdn} ${url} ${res_hdr_ct}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId19} ${replace_objectId20} ${replace_objectId21} ${replace_policyId8}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00011
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.shfe.com.cn"}
|
|
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.shfe.com.cn/products/au/"}
|
|
|
|
|
|
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "text/html; charset=utf-8","district": "Content-Type"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${fqdn} ${url} ${res_hdr_ct}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
2021-04-12 14:51:02 +08:00
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId26} ${replace_objectId27} ${replace_policyId10}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00012
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.national-park.com"}
|
|
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.national-park.com/welcome-to-canyonlands-national-park/"}
|
|
|
|
|
|
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "saltkeyfafghlh","district": "Cookie"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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字典集
|
2021-04-12 14:51:02 +08:00
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId28} ${replace_objectId29} ${replace_objectId30} ${replace_policyId11}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00013
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn1} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.expedia.co.uk"}
|
|
|
|
|
|
${fqdn2} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "welcome.expediagroup.com"}
|
|
|
|
|
|
${fqdn3} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.expediacruises.com"}
|
|
|
|
|
|
${fqdn4} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.classicvacations.com"}
|
|
|
|
|
|
${url1} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.expedia.co.uk/?pwaLob=wizard-hotel-pwa-v2"}
|
|
|
|
|
|
${url2} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "welcome.expediagroup.com/en?joinexpedia"}
|
|
|
|
|
|
${url3} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.expediacruises.com/en-US/corporate"}
|
|
|
|
|
|
${url4} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.classicvacations.com/collections/all-inclusive"}
|
|
|
|
|
|
${res_hdr_sc1} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "AWSALB","district": "Set-Cookie"}
|
|
|
|
|
|
${res_hdr_sc2} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "Domain=.expedia.co.uk; Secure; SameSite=None","district": "Set-Cookie"}
|
|
|
|
|
|
${res_hdr_sc3} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "AWSALBCORS=","district": "Set-Cookie"}
|
|
|
|
|
|
${res_hdr_sc4} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "CurentCulture=en-US","district": "Set-Cookie"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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} ${fqdn1} ${fqdn2} ${fqdn3} ${fqdn4} ${url1} ${url2} ${url3} ${url4}
|
|
|
|
|
|
... ${res_hdr_sc1} ${res_hdr_sc2} ${res_hdr_sc3} ${res_hdr_sc4}
|
|
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId31} ${replace_objectId32} ${replace_objectId41} ${replace_policyId12}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|
|
|
|
|
|
|
|
|
|
|
|
Proxy-Policy-replace-00014
|
|
|
|
|
|
#新增策略验证
|
|
|
|
|
|
#创建attributes中的字典
|
2021-05-17 09:50:56 +08:00
|
|
|
|
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.engadget.com"}
|
|
|
|
|
|
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.engadget.com/gaming/"}
|
|
|
|
|
|
${res_hdr_ct} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "charset=text","district": "Content-Type"}
|
|
|
|
|
|
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0fsfwhh","district": "User-Agent"}
|
|
|
|
|
|
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "__stripe_sidafdsvxvx","district": "Cookie"}
|
|
|
|
|
|
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "Domain=.engadget.com","district": "Set-Cookie"}
|
|
|
|
|
|
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${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字典集
|
2021-04-12 14:51:02 +08:00
|
|
|
|
${attributes} Create List ${app_id} ${subscriberid} ${ipsource} ${ipdestination} ${fqdn} ${url} ${req_hdr_ck} ${res_hdr_sc} ${req_hdr_ua} ${res_hdr_ct}
|
2021-04-08 20:09:19 +08:00
|
|
|
|
${verifySession} Create Dictionary attributes=${attributes}
|
|
|
|
|
|
${verifyList} Create Dictionary policyType=pxy_manipulation verifySession=${verifySession}
|
|
|
|
|
|
log ${verifyList}
|
|
|
|
|
|
${rescode} ${resData} VerifyPolicies ${verifyList}
|
|
|
|
|
|
# 打印检查结果
|
|
|
|
|
|
${objectid_verify} Set Variable ${testClentIpId}
|
|
|
|
|
|
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${replace_objectId33} ${replace_objectId34} ${replace_objectId35} ${replace_objectId36} ${replace_objectId37} ${replace_policyId13} ${replace_objectId38}
|
|
|
|
|
|
# # 调用关键字 提取应答json获取其中所有的id值,并判断新下发的id值是否在应答json的id中
|
|
|
|
|
|
log ${objectid_verify}
|
|
|
|
|
|
${testType} Evaluate type($objectid_verify)
|
|
|
|
|
|
${testType} Evaluate type($resData)
|
|
|
|
|
|
log ${resData}
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
${ok} VerifyProxy ${resData} ${objectid_verify}
|
|
|
|
|
|
Should Be Equal As Strings ${ok} true
|