1、调整版本掺入位置,适应版本变化;

2、调整日志查询时间范围为当前;
3、调整case引用文件路径错误;
This commit is contained in:
dongxiaoyan
2020-06-18 11:19:51 +08:00
parent 0c697853fc
commit 578115e865
5 changed files with 116 additions and 62 deletions

View File

@@ -2,283 +2,333 @@
Force Tags api api-log api-log-active_defence_event_log api-log-active_defence_event_log-batch
Library downloadexcel.py
Resource ../../../02-Keyword/tsg_bfapi/Log_keyword.robot
Library DateTime
*** Variables ***
@{logType} security_event_log proxy_event_log connection_record_log radius_record_log
${path} http://${host}:${port}/${version}
${path} ${path}
*** Test Cases ***
ExportLog-001
${conditions} Set Variable {"field":"common_log_id","type":"long","symbol":"=","value":["59526984506148866"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-002
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"=", "value":["2020-04-27 12:48:33"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-003
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"=", "value":["774"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-004
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"=", "value":["774"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-005
${conditions} Set Variable { "field":"ad_cc_target_url", "type":"string", "symbol":"sub", "value":["www.jianshu.com"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-006
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"sub", "value":["22"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-007
${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"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... [${conditions}]
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-008
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"prefix", "value":["10"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-009
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"suffix", "value":["222"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-010
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "symbol":"exactly", "value":["10.3.22.222"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-011
${conditions} Set Variable { "field":"ad_target_ip", "type":"string", "value":["10"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-012
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "value":["774"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-013
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"!=", "value":["774"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-014
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">", "value":["774"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-015
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<", "value":["774"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-016
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"<=", "value":["774"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-017
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":">=", "value":["774"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-018
${conditions} Set Variable { "field":"common_policy_id", "type":"int", "symbol":"in", "value":["774","95"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-019
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-020
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">", "value":["2020-04-27 12:48:33"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-021
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<", "value":["2020-04-27 12:48:33"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-022
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"<=", "value":["2020-04-27 12:48:33"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-023
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":">=", "value":["2020-04-27 12:48:33"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-024
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"between", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "symbol":"between", "value":["2020-04-27 12:48:33","${endtime}"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed
ExportLog-025
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33","2020-04-27 13:27:03"] }
${conditions} Set Variable { "field":"common_recv_time", "type":"timestamp", "value":["2020-04-27 12:48:33","${endtime}"] }
${logname} Set Variable active_defence_event_log
${logCondition} GetLogCondition ${logname} 2020-04-26 12:27:03 2020-04-27 13:27:03 30 1
${starttime} Get Time
${endtime}= Add Time To Date ${starttime} -1 days
${logCondition} GetLogCondition ${logname} ${starttime} ${endtime} 30 1
... ${conditions}
log ${logCondition}
${header} Create Dictionary Content-Type=application/json Authorization=${token}
${success} downloadexcel ${header} ${logCondition} http://${host}:${port}/${version}/log/batch
${success} downloadexcel ${header} ${logCondition} ${path}/log/batch
log ${success}
Should Be Equal ${success} ${200} active_defence_event_log\ test query export failed

View File

@@ -1,9 +1,10 @@
*** Settings ***
Resource ../../02-Keyword/tsg_bfapi/LogStatistics.robot
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
Resource ../../../03-Variable/BifangApiVariable.txt
Library DateTime
*** Variables ***
${url} /report/url/recommend
${url} /${version}/report/url/recommend
*** Test Cases ***
LogStatistics-Recommend-00001

View File

@@ -1,8 +1,9 @@
*** Settings ***
Resource ../../02-Keyword/tsg_bfapi/LogStatistics.robot
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
Resource ../../../03-Variable/BifangApiVariable.txt
*** Variables ***
${url} /report/policyevent/hit/timeandcount
${url} /${version}/report/policyevent/hit/timeandcount
*** Test Cases ***
LogStatistics-Timeandcount-00001

View File

@@ -38,7 +38,7 @@ GetApi
${condition} catenate SEPARATOR= ${strstrartTime} ${strendTime} ${strstatisticTime} ${strlimit} ${strstatisticsUnit} ${strtimeGranularity} ${strpolicy_id} ${strip} ${strdevice_ids} ${strpolicy_ids} ${strorderBy}
#创建请求信息
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded Authorization=${token}
Create Session api http://${host}:${port}/${version}
Create Session api http://${host}:${port}
#发送请求
${remoteResponse} Get Request api ${url}?${condition} headers=${header}
${bifang} to json ${remoteResponse.content}
@@ -235,7 +235,8 @@ SplicingTrafficSql
Recommend
[Arguments] ${url} ${statisticTime}
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded Authorization=${token}
Create Session api http://${host}:${port}/${version} headers=${header}
#Create Session api http://${host}:${port}/${version} headers=${header}
Create Session api http://${host}:${port} headers=${header}
${remoteResponse} Get Request api ${url}?statisticTime=${statisticTime} headers=${header}
${response} to json ${remoteResponse.content}
Should Be Equal As Strings ${remoteResponse.status_code} 200
@@ -252,7 +253,8 @@ Trend
Timeandcount
[Arguments] ${url} ${logType} ${policyIds}
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded Authorization=${token}
Create Session api http://${host}:${port}/${version} headers=${header}
#Create Session api http://${host}:${port}/${version} headers=${header}
Create Session api http://${host}:${port} headers=${header}
${remoteResponse} Get Request api ${url}?policyIds=${policyIds}&logType=${logType} headers=${header}
${response} to json ${remoteResponse.content}
Should Be Equal As Strings ${remoteResponse.status_code} 200

View File

@@ -13,7 +13,7 @@ Library json
*** Keywords ***
GetLogCondition
[Arguments] ${logname} ${start_time} ${end_time} ${page_size} ${page_no} ${condition1}
${responsedata} Get-Request log/schema?logType=active_defence_event_log
${responsedata} Get-Request /${version}/log/schema?logType=active_defence_event_log
${fields} Set Variable ${responsedata['data']['fields']}
${field} json.dumps ${fields}
log ${field}