从公共参数删除版本路径,修改部分不正确路径引用

This commit is contained in:
dongxiaoyan
2020-06-16 16:42:04 +08:00
parent d49bacc3ac
commit a2b1f8e435
32 changed files with 123 additions and 120 deletions

View File

@@ -1,6 +1,6 @@
*** Settings ***
Resource ../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../02-Keyword/tsg_bfapi/Filter.robot
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../../02-Keyword/tsg_bfapi/Filter.robot
*** Test Cases ***
File_integrity_rate-1

View File

@@ -1,6 +1,6 @@
*** Settings ***
Resource ../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../02-Keyword/tsg_bfapi/Filter.robot
Resource ../../../02-Keyword/tsg_bfapi/PolicyObject.robot
Resource ../../../02-Keyword/tsg_bfapi/Filter.robot
*** Test Cases ***
File_size-1

View File

@@ -7,7 +7,6 @@ Library Selenium2Library
Library RequestsLibrary
Library Collections
Library string
Library REST http://${host}:${port}/${version}
Library json
*** Test Cases ***
@@ -19,7 +18,7 @@ CountLog-001
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -33,7 +32,7 @@ CountLog-002
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -47,7 +46,7 @@ CountLog-003
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -61,7 +60,7 @@ CountLog-004
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -75,7 +74,7 @@ CountLog-005
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -89,7 +88,7 @@ CountLog-006
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -103,7 +102,7 @@ CountLog-007
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","condaiapi-logaa tions":[${condition}]}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -117,7 +116,7 @@ CountLog-008
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -131,7 +130,7 @@ CountLog-009
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -145,7 +144,7 @@ CountLog-010
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -159,7 +158,7 @@ CountLog-011
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -173,7 +172,7 @@ CountLog-012
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -187,7 +186,7 @@ CountLog-013
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -201,7 +200,7 @@ CountLog-014
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -215,7 +214,7 @@ CountLog-015
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -229,7 +228,7 @@ CountLog-016
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -243,7 +242,7 @@ CountLog-017
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -257,7 +256,7 @@ CountLog-018
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -271,7 +270,7 @@ CountLog-019
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -285,7 +284,7 @@ CountLog-020
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -299,7 +298,7 @@ CountLog-021
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -313,7 +312,7 @@ CountLog-022
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -327,7 +326,7 @@ CountLog-023
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -341,7 +340,7 @@ CountLog-024
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200
@@ -355,7 +354,7 @@ CountLog-025
${endtime} Set Variable 2020-04-27 13:27:03
${logname} Set Variable active_defence_event_log
${logCondition} Set Variable {"pageNo":${pageNo},"pageSize":${pageSize},"logType":"${logname}","start_common_recv_time":"${startTime}","end_common_recv_time":"${endTime}","conditions":${condition}}
${url} Set Variable log/count
${url} Set Variable /${version}/log/count
${response} Post-Request ${url} ${logCondition}
${responsejson} Evaluate type($response)
Should Be Equal As Strings ${response}[code] 200

View File

@@ -5,7 +5,7 @@ Resource ../../../02-Keyword/tsg_bfapi/Log_keyword.robot
*** Variables ***
@{logType} security_event_log proxy_event_log connection_record_log radius_record_log
${path} http://${host}:${port}/${version}
*** Test Cases ***
ExportLog-001
${conditions} Set Variable {"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] }

View File

@@ -7,7 +7,7 @@ Library Collections
Resource ../../../02-Keyword/tsg_bfapi/Log_schema.robot
Resource ../../../02-Keyword/tsg_bfapi/Log_search.robot
Library string
Library REST http://${host}:${port}/${version}
Library REST http://${host}:${port}
Resource ../../../02-Keyword/tsg_bfapi/Log_keyword.robot
*** Test Cases ***
@@ -17,7 +17,7 @@ log-schema-001
log-search-002
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} []
log ${response}
@@ -25,7 +25,7 @@ log-search-002
log-search-003
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable {"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
@@ -39,7 +39,7 @@ log-search-003
log-search-004
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["2020-04-27 12:48:33"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
@@ -53,7 +53,7 @@ log-search-004
log-search-005
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"=", "value":["774"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -67,7 +67,7 @@ log-search-005
log-search-006
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"ad_cc_target_url", "type":"string", "symbol":"sub", "value":["www.jianshu.com"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -81,7 +81,7 @@ log-search-006
log-search-007
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"sub", "value":["22"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -95,7 +95,7 @@ log-search-007
log-search-008
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"prefix", "value":["10"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -109,7 +109,7 @@ log-search-008
log-search-009
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"suffix", "value":["222"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -123,7 +123,7 @@ log-search-009
log-search-010
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"exactly", "value":["10.3.22.222"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -137,7 +137,7 @@ log-search-010
log-search-011
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"exactly", "value":["10.3.22.222"] },{"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] },{ "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["2020-04-27 13:27:02"] },{ "field":"common_policy_id", "type":"int", "symbol":"=", "value":["95"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
@@ -160,7 +160,7 @@ log-search-012
${simpleCondition} Set Variable "common_server_ips": "40"
${logCondition} GetLogCondition active_defence_event_log 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
... ${conditions}
${response} BasePostRequest v1/log/list ${logCondition}
${response} BasePostRequest /${version}/log/list ${logCondition}
Should Be Equal As Strings ${response.code} 200
${responsedata} Get From Dictionary ${response} data
log ${responsedata}
@@ -170,7 +170,7 @@ log-search-012
log-search-013
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "value":["774"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -184,7 +184,7 @@ log-search-013
log-search-014
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"!=", "value":["774"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -193,7 +193,7 @@ log-search-014
log-search-015
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">", "value":["774"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -202,7 +202,7 @@ log-search-015
log-search-016
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<", "value":["774"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -211,7 +211,7 @@ log-search-016
log-search-017
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<=", "value":["774"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -220,7 +220,7 @@ log-search-017
log-search-018
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">=", "value":["774"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -229,7 +229,7 @@ log-search-018
log-search-019
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"in", "value":["774","95"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} ${conditions}
@@ -238,7 +238,7 @@ log-search-019
log-search-020
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
@@ -252,7 +252,7 @@ log-search-020
log-search-021
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">", "value":["2020-04-27 12:48:33"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
@@ -261,7 +261,7 @@ log-search-021
log-search-022
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<", "value":["2020-04-27 12:48:33"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
@@ -270,7 +270,7 @@ log-search-022
log-search-023
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<=", "value":["2020-04-27 12:48:33"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
@@ -284,7 +284,7 @@ log-search-023
log-search-024
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">=", "value":["2020-04-27 12:48:33"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
@@ -293,7 +293,7 @@ log-search-024
log-search-025
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"between", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]
@@ -302,7 +302,7 @@ log-search-025
log-search-026
#${filds} schema
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${filds} Set Variable ${responsedata['data']['fields']}
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
${response} log_search 2020-04-26 12:27:03 2020-04-27 13:27:03 active_defence_event_log ${filds} [${conditions}]

View File

@@ -10,7 +10,7 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywor
Resource ../../../03-Variable/BifangApiVariable.txt
*** Variables ***
${url} /policy/profile/decryption
${url} /v1/policy/profile/decryption
${profileId} ${EMPTY}
*** Test Cases ***

View File

@@ -11,24 +11,28 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
Library Custometest
*** Variables ***
${url} /policy/profile/hijackfiles
${url} /v1/policy/profile/hijackfiles
${profileId} ${EMPTY}
*** Keywords ***
ProfileComman
[Arguments] ${objectedit} ${type}
${default_json} ${default_files} ${default_url} Run Keyword If "${type}"=="hijack" Set Variable ${setting_proxy_profiles_hijack} hijack_files/ /policy/profile/hijackfiles
[Arguments] ${objectedit} ${type} ${fileName}
${default_json} ${default_files} ${default_url} Run Keyword If "${type}"=="hijack" Set Variable ${setting_proxy_profiles_hijack} hijack_files/ /policy/profile/hijackfiles
... ELSE IF Run Keyword If "${type}"=="insert" Set Variable ${setting_proxy_profiles_insert} insert_files/ /policy/profile/insertfiles
... ELSE Set Variable a b c
${objectDict} Jsoneditmanu ${default_json} ${objectedit}
log ${objectDict}
${response} CreatePolicyFile4 ${default_url} ${default_files} ${objectDict}
${response} CreatePolicyFile4 ${default_url} ${default_files} ${fileName} ${objectDict}
#${url} ${filePath} ${fileName} ${objectDict}
[Return] ${response}
*** Test Cases ***
Hijack_file_24_type-test
Hijack_file_24_type-apk
#Hijack 需要修改的内容
${objectedit} Create Dictionary profileName=Hijack_file_24_type-00000 contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
${response} ProfileComman ${objectedit} hijack
${objectedit} Create Dictionary profileName=Hijack_file_24_type-apk contentName=Create-Hijack Files-test-0.apk contentType=application/vnd.android.package-archive
${response} ProfileComman ${objectedit} hijack Create-Hijack Files-test-0.apk
# 查询
${profileId} Get From Dictionary ${response} profileId
${profileId} set Variable ${profileId}
Hijack_file_24_type-00000
#Hijack 需要修改的内容

View File

@@ -9,7 +9,7 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywor
Resource ../../../03-Variable/BifangApiVariable.txt
*** Variables ***
${url} /policy/exch/intermediacert
${url} /v1/policy/exch/intermediacert
*** Test Cases ***
Intermedia Cert Policy case

View File

@@ -10,7 +10,7 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/FunctionalKeywor
Resource ../../../03-Variable/BifangApiVariable.txt
*** Variables ***
${url} /policy/profile/trafficmirror
${url} /v1/policy/profile/trafficmirror
${profileId} ${EMPTY}
*** Test Cases ***

View File

@@ -11,7 +11,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
Library Custometest
*** Variables ***
${url} policy/profile/claimedsrcip
${url} /v1/policy/profile/claimedsrcip
${profileId} ${EMPTY}
*** Test Cases ***

View File

@@ -18,7 +18,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
Library Custometest
*** Variables ***
${url} /policy/profile/decryption
${url} /v1/policy/profile/decryption
${profileId} ${EMPTY}
*** Test Cases ***

View File

@@ -11,7 +11,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
Library Custometest
*** Variables ***
${url} /policy/profile/dnsrecords
${url} /v1/policy/profile/dnsrecords
${profileId} ${EMPTY}
*** Test Cases ***

View File

@@ -9,7 +9,7 @@ Resource ../../../02-Keyword/tsg_bfapi/policy_file_interface/Functional
Resource ../../../03-Variable/BifangApiVariable.txt
*** Variables ***
${url} /policy/exch/intermediacert
${url} /v1/policy/exch/intermediacert
*** Test Cases ***
IntermediaCertPolicy-00001

View File

@@ -11,7 +11,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
Library Custometest
*** Variables ***
${url} policy/profile/reflector
${url} /v1/policy/profile/reflector
${profileId} ${EMPTY}
*** Test Cases ***

View File

@@ -11,7 +11,7 @@ Resource ../../../03-Variable/Policy_Objects_Module.txt
Library Custometest
*** Variables ***
${url} policy/profile/reflector/payload
${url} /v1/policy/profile/reflector/payload
${profileId} ${EMPTY}
*** Test Cases ***

View File

@@ -21,7 +21,7 @@ Resource ../../../02-Keyword/tsg_bfapi/ApiRequest.robot
Resource ../../../03-Variable/BifangApiVariable.txt
*** Variables ***
${url} /policy/profile/trafficmirror
${url} /v1/policy/profile/trafficmirror
${profileId} ${EMPTY}
*** Test Cases ***