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

@@ -0,0 +1,54 @@
*** Settings ***
Force Tags tsg_adc_wp
Resource ../../../03-Variable/BifangApiVariable.txt
Library ../../../04-CustomLibrary/Custometest/LogSchema.py
Resource ../../../05-Other/AllFlowCaseVariable1.txt
Library OperatingSystem
Library Selenium2Library
Library RequestsLibrary
Library Collections
Library String
*** Variables ***
*** Test Cases ***
LogAllConditionsVerifyCase
[Documentation] 全流程日志各字段查询
${Logurl} Set Variable http://${host}:${port}/v1/log/list
${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
${EndTime1} Set Variable ${endtime}
${StartTime1} Set Variable ${starttime}
${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}
log ${responsebody}
logAllFieldsListInterface ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${responsebody} ${lognumber} ${logcycles}
END
LogFieldVerifyCase
[Documentation] 全流程日志详情字段
${Logurl} Set Variable http://${host}:${port}/v1/log/list
${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
${EndTime1} Set Variable ${endtime}
${StartTime1} Set Variable ${starttime}
${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}
log ${responsebody}
LogFieldValidation ${Schemaurl} ${token} ${responsebody}
END
LogExportVerifyCase
[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
${EndTime1} Set Variable ${endtime}
${StartTime1} Set Variable ${starttime}
${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