1.新增上传Log日志纯接口及针对全流程log日志字段的目的性验证关键字及测试用例

This commit is contained in:
byb11
2021-05-12 15:16:59 +08:00
parent 7732256b20
commit 33ccfc3466
5 changed files with 222 additions and 145 deletions

View File

@@ -1,9 +1,7 @@
*** Settings ***
Force Tags tsg_adc_wp
Resource ../../../03-Variable/BifangApiVariable.txt
Library ../../../04-CustomLibrary/Custometest/LogSchema.py
Library ../../../04-CustomLibrary/Custometest/LogResponseVAL.py
Resource ../../../05-Other/AllFlowCaseVariable1.txt
Library DateTime
Library json
Library OperatingSystem
@@ -59,6 +57,18 @@ LogExportVerifyCase
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
exportlog ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
END
LogExportCeilingVerifyCase
[Documentation] 验证日志导出接口上限测试,当前导出上限为十万
${Logurl} Set Variable http://${host}:${port}/v1/log/batch
${logTypelist} create list security_event_log proxy_event_log connection_record_log radius_record_log voip_record_log live_session_record_log transaction_record_log gtpc_record_log
${StartTime1} Set Variable 2020-05-01 00:00:00
${EndTime1} Set Variable 2021-05-01 00:00:00
${filter} Set Variable
FOR ${logType} in @{logTypelist}
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
exportlog ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
END
LogRetrieveVerifyCase
[Documentation] 验证日志检索条件接口
@@ -74,6 +84,22 @@ LogRetrieveVerifyCase
${responsebody} loglistverify ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
LogRetrieve ${Schemaurl} ${host} ${port} ${token} ${logType} ${responsebody}
END
LogRetrieveComplexSqlVerifyCase
[Documentation] 日志检索条件接口复杂SQL验证
${Logurl} Set Variable http://${host}:${port}/v1/log/list
${logTypelist} create list security_event_log connection_record_log security_event_log proxy_event_log connection_record_log radius_record_log voip_record_log live_session_record_log transaction_record_log gtpc_record_log
${EndTime} get current date
${EndTime1} Get Substring ${EndTime} \ -4
${StartTime} add time to date ${EndTime} -03:00:00
${StartTime1} Get Substring ${StartTime} \ -4
${filter} Set Variable
FOR ${logType} in @{logTypelist}
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
${responsebody} loglistverify ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
LogRetrieveSql ${Schemaurl} ${host} ${port} ${token} ${logType} ${responsebody}
END