1.新增上传Log日志纯接口及针对全流程log日志字段的目的性验证关键字及测试用例
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
54
01-TestCase/tsg_bfapi/api_log/LogPurposeInterfaceCase.robot
Normal file
54
01-TestCase/tsg_bfapi/api_log/LogPurposeInterfaceCase.robot
Normal 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
|
||||
@@ -145,136 +145,6 @@ LogApiVerifyCase-007
|
||||
|
||||
log ${responsebody}
|
||||
|
||||
|
||||
###################################################白云波 20.15版本接口测试####################################################################
|
||||
|
||||
LogGTPFieldVerifyCase
|
||||
[Documentation] 验证api接口:验证Session Records 日志GTP字段丰富验证
|
||||
${Logurl} Set Variable http://${host}:${port}/v1/log/list
|
||||
${logType} Set Variable connection_record_log
|
||||
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
|
||||
${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 ${条件待定}
|
||||
${responsebody} loglistverify ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
|
||||
${targetdict} create list tunnel_schema_type gtp_SGW_ip gtp_PGW_ip gtp_SGW_port gtp_PGW_port gtp_uplink_TEID gtp_downlink_TEID mpls_c2s_direction_label mpls_s2c_direction_label
|
||||
... vlan_c2s_direction_id vlan_s2c_direction_id source_mac destination_mac c2s_source_mac c2s_destination_mac s2c_source_mac s2c_destination_mac
|
||||
log ${responsebody}
|
||||
${strlist} FieldValidation ${responsebody} ${targetdict}
|
||||
log ${strlist}
|
||||
|
||||
|
||||
LiveSessionRecordLogApiVerifyCase
|
||||
[Documentation] live_session_record_log纯接口测试用例
|
||||
${Logurl} Set Variable http://${host}:${port}/v1/log/list
|
||||
${logType} Set Variable live_session_record_log
|
||||
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
|
||||
${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} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType}
|
||||
|
||||
LiveSessionRecordLogCount
|
||||
[Documentation] live_session_record_log统计日志总数
|
||||
${Logurl} Set Variable http://${host}:${port}/v1/log/count
|
||||
${logType} Set Variable live_session_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
|
||||
${count} countlog_query ${Logurl} ${token} ${StartTime1} ${EndTime1} ${logType}
|
||||
log ${count}
|
||||
|
||||
LiveSessionRecordLogExportLog
|
||||
[Documentation] live_session_record_log导出日志
|
||||
${Logurl} Set Variable http://${host}:${port}/v1/log/batch
|
||||
${logType} Set Variable live_session_record_log
|
||||
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
|
||||
${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
|
||||
exportlog ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
|
||||
|
||||
|
||||
LiveSessionRecordLogRetrievalConditionApiVerify
|
||||
[Documentation] 验证api接口:日志检索条件校验(filter内容验证)
|
||||
${logType} Set Variable live_session_record_log
|
||||
${filter} Set Variable common_recv_time = 45535
|
||||
${urlpath} Set Variable ?logType=${logType}&filter=${filter}
|
||||
${Logurl} Set Variable http://${host}:${port}/v1/interface/gateway/sql/galaxy/log/filter/validation${urlpath}
|
||||
${responsebody} distributed_query ${Logurl} ${token}
|
||||
log ${responsebody}
|
||||
|
||||
|
||||
TransactionRecordLogApiVerifyCase
|
||||
[Documentation] transaction_record_log纯接口测试用例
|
||||
${Logurl} Set Variable http://${host}:${port}/v1/log/list
|
||||
${logType} Set Variable transaction_record_log
|
||||
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
|
||||
${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} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType}
|
||||
|
||||
TransactionRecordLogCount
|
||||
[Documentation] transaction_record_log统计日志总数
|
||||
${Logurl} Set Variable http://${host}:${port}/v1/log/count
|
||||
${logType} Set Variable transaction_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
|
||||
${count} countlog_query ${Logurl} ${token} ${StartTime1} ${EndTime1} ${logType}
|
||||
log ${count}
|
||||
|
||||
TransactionRecordLogExportLog
|
||||
[Documentation] transaction_record_log导出日志
|
||||
${Logurl} Set Variable http://${host}:${port}/v1/log/batch
|
||||
${logType} Set Variable transaction_record_log
|
||||
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
|
||||
${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
|
||||
exportlog ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
|
||||
|
||||
|
||||
TransactionRecordLogRetrievalConditionApiVerify
|
||||
[Documentation] transaction_record_log:日志检索条件校验(filter内容验证)
|
||||
${logType} Set Variable transaction_record_log
|
||||
${filter} Set Variable common_recv_time = 45535
|
||||
${urlpath} Set Variable ?logType=${logType}&filter=${filter}
|
||||
${Logurl} Set Variable http://${host}:${port}/v1/interface/gateway/sql/galaxy/log/filter/validation${urlpath}
|
||||
${responsebody} distributed_query ${Logurl} ${token}
|
||||
log ${responsebody}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user