b步骤添加Verify用例提交

This commit is contained in:
hebingning
2021-04-12 14:51:02 +08:00
parent 213d280dc9
commit 783443473c
34 changed files with 132 additions and 210 deletions

View File

@@ -90,7 +90,7 @@ Proxy-Policy-deny-00003
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
Proxy-Policy-allow-00004
Proxy-Policy-deny-00004
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "bbs.nga.cn"}
@@ -150,8 +150,8 @@ Proxy-Policy-deny-00006
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.playgroundsessions.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.choicehotels.com/quality-inn"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "Mozilla/5.0aaffwefweaf","district": "User-Agent"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.playgroundsessions.com/about/software-features"}
${req_hdr_ua} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "AppleWebKit","district": "User-Agent"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${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"}
@@ -248,7 +248,7 @@ Proxy-Policy-deny-00009
${rescode} ${resData} VerifyPolicies ${verifyList}
# 打印检查结果
${objectid_verify} Set Variable ${testClentIpId}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId19} ${deny_objectId20} ${deny_objectId21} ${deny_policyId8}
${objectid_verify} Catenate SEPARATOR=, ${objectid_verify} ${deny_objectId20} ${deny_objectId21} ${deny_policyId8}
# # 调用关键字 提取应答json获取其中所有的id值并判断新下发的id值是否在应答json的id中
log ${objectid_verify}
${testType} Evaluate type($objectid_verify)
@@ -437,7 +437,7 @@ Proxy-Policy-deny-000016
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "mt.meipai.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "mt.meipai.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "mt.meipai.com/"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${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"}
@@ -460,44 +460,14 @@ Proxy-Policy-deny-000016
${ok} VerifyProxy ${resData} ${objectid_verify}
Should Be Equal As Strings ${ok} true
Proxy-Policy-deny-000017
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.orbitz.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.orbitz.com/Flights"}
${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_body} Create Dictionary attributeType=string attributeName=req_body appId=106 appName=http protocol=http attributeValue={"string": "ProxydenyTest001402"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${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} ${req_hdr_ua} ${req_body}
${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} ${deny_objectId36} ${deny_objectId37} ${deny_objectId38} ${deny_objectId39} ${deny_objectId40} ${deny_policyId15}
# # 调用关键字 提取应答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-deny-000018
#新增策略验证
#创建attributes中的字典
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.orbitz.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.orbitz.com/Flights"}
${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": "afsf123Domain=.orbitz.com","district": "Set-Cookie"}
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "Proxydeny001502"}
${fqdn} Create Dictionary attributeType=string attributeName=host appId=106 appName=http protocol=http attributeValue={"string": "www.umusicpub.com"}
${url} Create Dictionary attributeType=string attributeName=url appId=106 appName=http protocol=http attributeValue={"string": "www.umusicpub.com/au/"}
${req_hdr_ck} Create Dictionary attributeType=signature attributeName=req_hdr appId=106 appName=http protocol=http attributeValue={"string": "timezoneoffset","district": "Cookie"}
${res_hdr_sc} Create Dictionary attributeType=signature attributeName=res_hdr appId=106 appName=http protocol=http attributeValue={"string": "Domain=.umusicpub.com","district": "Set-Cookie"}
${res_body} Create Dictionary attributeType=string attributeName=res_body appId=106 appName=http protocol=http attributeValue={"string": "NOFOLLOW"}
${app_id} Create Dictionary attributeType=string attributeName=app_id attributeValue={"string": "106"}
${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"}