*** 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 Library Selenium2Library Library RequestsLibrary Library Collections Library String *** Variables *** *** Test Cases *** LogApiVerifyCase [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 transaction_record_log live_session_record_log gtpc_record_log ${EndTime} get current date ${EndTime1} Get Substring ${EndTime} \ -4 ${StartTime} add time to date ${EndTime} -01:00:00 ${StartTime1} Get Substring ${StartTime} \ -4 logapiverify ${Logurl} ${token} ${StartTime1} ${EndTime1} ${host} ${port} ${logTypelist} 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 ${EndTime} get current date ${EndTime1} Get Substring ${EndTime} \ -4 ${StartTime} add time to date ${EndTime} -01: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} 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 ${EndTime} get current date ${EndTime1} Get Substring ${EndTime} \ -4 ${StartTime} add time to date ${EndTime} -01: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} exportlog ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter} END LogRetrieveVerifyCase [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 ${EndTime} get current date ${EndTime1} Get Substring ${EndTime} \ -4 ${StartTime} add time to date ${EndTime} -01: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} LogRetrieve ${Schemaurl} ${host} ${port} ${token} ${logType} ${responsebody} END