*** Settings *** Test Teardown TeardownDelete ${url} geoNameIds ${geoNameId} Force Tags tsg_bf_api dict_create #Suite Teardown Delete All Sessions Library String Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywords.robot Resource ../../../03-Variable/BifangApiVariable.txt Resource ../../../03-Variable/Policy_Objects_Module.txt Library Custometest *** Variables *** ${url} /${version}/geolocation/dict ${geoNameId} ${EMPTY} *** Test Cases *** dictcrease-01 ${objectedit} Create Dictionary geoNameId=1001 Comment 打印需要修改的json内容 log ${objectedit} ${objectDict} Jsoneditmanu ${settig_proxy_profiles_geolocation_dictcrease} ${objectedit} log ${objectDict} ${response} CreateRequest_locationId ${url} ${objectDict} # 查询 ${geoNameId} Get From Dictionary ${response} geoNameId #log ${geoNameId} #${locationId} Get From Dictionary ${response} locationId #log ${locationId} QueryPolicyFile ${url} geoNameId=${geoNameId} #QueryPolicyFile ${url} locationId=${locationId} # 修改 ${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"locationId":1,"addrType":4,"startIp":"221.178.125.0","endIp":"221.178.125.255","geoNameId":"1001","latitude":22.4984,"longitude":112.9947,"coords":1000,"language":"Chinese (zh-CN)","continentAbbr":"AS","continentFull":"Asia","countryAbbr":"CN","countryFull":"China","provinceAbbr":"GD","provinceFull":"Guangdong","cityFull":"shenzhen","timeZone":"Asia/Shanghai"}]} UpdatePolicyFile2 ${url} ${reqData_edit} [Teardown] log to console ${\n} dictcrease-02 ${objectedit} Create Dictionary geoNameId=1001 Comment 打印需要修改的json内容 log ${objectedit} ${objectDict} Jsoneditmanu ${settig_proxy_profiles_geolocation_dictcreases} ${objectedit} log ${objectDict} ${response} CreateRequest_locationId ${url} ${objectDict} # 查询 ${geoNameId} Get From Dictionary ${response} geoNameId #log ${geoNameId} #${locationId} Get From Dictionary ${response} locationId #log ${locationId} QueryPolicyFile ${url} geoNameId=${geoNameId} #QueryPolicyFile ${url} locationId=${locationId} # 修改 ${reqData_edit} Set Variable {"opAction":"update","returnData":1,"list":[{"locationId":1,"addrType":4,"startIp":"221.178.125.0","endIp":"221.178.125.255","geoNameId":"1001","latitude":22.4984,"longitude":112.9947,"coords":1000,"language":"Chinese (zh-CN)","continentAbbr":"AS","continentFull":"Asia","countryAbbr":"CN","countryFull":"China","provinceAbbr":"GD","provinceFull":"Guangdong","cityFull":"shenzhen","timeZone":"Asia/Shanghai"}]} UpdatePolicyFile2 ${url} ${reqData_edit} [Teardown] log to console ${\n}