新增ReportCase测试文件,新增Reportid写入文件关键字
This commit is contained in:
30
01-TestCase/tsg_bfapi/report/ReportCase.robot
Normal file
30
01-TestCase/tsg_bfapi/report/ReportCase.robot
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Force Tags tsg_bf_api report
|
||||||
|
Library OperatingSystem
|
||||||
|
Library GetTimeLibrary
|
||||||
|
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||||
|
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||||
|
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
||||||
|
Resource ../../../02-Keyword/tsg_adc/FileOperation.robot
|
||||||
|
*** Variables ***
|
||||||
|
${dataset_url} /${version}/report/dataset
|
||||||
|
${datasetId} ${EMPTY}
|
||||||
|
${reportId} ${EMPTY}
|
||||||
|
${report_url} /${version}/report/offlinejob
|
||||||
|
${chartId} ${EMPTY}
|
||||||
|
${chart_url} /${version}/report/chart
|
||||||
|
${result_url} /${version}/report/offlinejob/result
|
||||||
|
${resultId} ${EMPTY}
|
||||||
|
*** Test Cases ***
|
||||||
|
|
||||||
|
testSecurity Event
|
||||||
|
${name} Set Variable Report_SecurityEventActionHit-006-1
|
||||||
|
#新建DataSet
|
||||||
|
#${name} Set Variable Report_Result-001
|
||||||
|
BasePostRequestOK ${dataset_url} {"list":{"name":"${name}","logType":"security_event_log","groupColumnList":[{"name":"common_action"}],"queryColumnList":[{"name":"common_action","expression":"","label":"Action"},{"name":"common_c2s_pkt_num,common_s2c_pkt_num","expression":"sum","label":"Packets Sent+Packets Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_c2s_byte_num,common_s2c_byte_num","expression":"sum","label":"Bytes Sent+Bytes Received","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]},{"name":"common_log_id","expression":"count","label":"sessions","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]}],"filterCondition":null,"havingCondition":null,"isInitialize":0}}
|
||||||
|
#获取dataset的ID
|
||||||
|
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${name}&logType=&opStartTime=&opEndTime=&opUser=
|
||||||
|
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||||
|
${data1} Create Dictionary ids=${datasetId}
|
||||||
|
BaseDeleteRequestOK ${dataset_url} ${data1}
|
||||||
|
insert_Report_to_file1 dateset ${datasetId}
|
||||||
@@ -30,3 +30,7 @@ insert_policyId_to_file1
|
|||||||
insert_time_to_file1
|
insert_time_to_file1
|
||||||
[Arguments] ${key} ${starttime}
|
[Arguments] ${key} ${starttime}
|
||||||
Alter Dict ${path}/AllFlowCaseVariable1.txt ${key} ${starttime}
|
Alter Dict ${path}/AllFlowCaseVariable1.txt ${key} ${starttime}
|
||||||
|
|
||||||
|
insert_Report_to_file1
|
||||||
|
[Arguments] ${key} ${objectids}
|
||||||
|
Alter Dict ${path}/ReportCaseVariable.txt ${key} ${objectids}
|
||||||
|
|||||||
Reference in New Issue
Block a user