提交优化日志接口关键字和日志接口用例示例

This commit is contained in:
lyf
2021-03-31 18:25:18 +08:00
parent f21b4beb0c
commit df0c0224a6
2 changed files with 199 additions and 82 deletions

View File

@@ -15,11 +15,11 @@ ${url} /${version}/report/url/recommend
*** Test Cases ***
LogApiVerifyCase-001
[Documentation] 验证api接口
${logurl} Set Variable http://${host}:${port}/v1/log/list
${Logurl} Set Variable http://${host}:${port}/v1/log/list
${logtype} Set Variable security_event_log
${logType} Set Variable security_event_log
${schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logtype}
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
${EndTime} get current date
@@ -29,16 +29,16 @@ LogApiVerifyCase-001
${StartTime1} Get Substring ${StartTime} \ -4
logapiverify ${logurl} ${schemaurl} ${token} ${StartTime1} ${EndTime1} ${logtype}
logapiverify ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType}
LogApiVerifyCase-002
[Documentation] 验证api接口
${Logurl} Set Variable http://${host}:${port}/v1/log/list
${Logtype} Set Variable security_event_log
${logType} Set Variable security_event_log
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logtype}
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
${EndTime} get current date
@@ -50,7 +50,97 @@ LogApiVerifyCase-002
${filter} Set Variable common_recv_time = 45535
${responsebody} loglistverify ${logurl} ${schemaurl} ${token} ${StartTime1} ${EndTime1} ${logtype} ${filter}
${responsebody} loglistverify ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
log ${responsebody}
LogApiVerifyCase-003
[Documentation] 验证api接口:事件日志和通联日志时间分布查询
${StartTime} Set Variable 2021-03-26 12:27:03
${EndTime} Set Variable 2021-03-29 12:27:03
${granularity} Set Variable PT5M
${logType} Set Variable security_event_hits_log
${urlpath} Set Variable ?logType=${logType}&startTime=${StartTime}&endTime=${EndTime}&granularity=${granularity}
${Logurl} Set Variable http://${host}:${port}/v1/interface/gateway/sql/galaxy/${logType}/timedistribution${urlpath}
${responsebody} distributed_query ${Logurl} ${token}
log ${responsebody}
LogApiVerifyCase-004
[Documentation] 验证api接口:事件日志和通联日志时间分布查询
${StartTime} Set Variable 2021-03-26 12:27:03
${EndTime} Set Variable 2021-03-29 12:27:03
${granularity} Set Variable PT5M
${logType} Set Variable proxy_event_hits_log
${urlpath} Set Variable ?logType=${logType}&startTime=${StartTime}&endTime=${EndTime}&granularity=${granularity}
${Logurl} Set Variable http://${host}:${port}/v1/interface/gateway/sql/galaxy/${logType}/timedistribution${urlpath}
${responsebody} distributed_query ${Logurl} ${token}
log ${responsebody}
LogApiVerifyCase-005
[Documentation] 验证api接口:事件日志和通联日志时间分布查询
${StartTime} Set Variable 2021-03-26 12:27:03
${EndTime} Set Variable 2021-03-29 12:27:03
${granularity} Set Variable PT5M
${logType} Set Variable traffic_summary_log
${urlpath} Set Variable ?logType=${logType}&startTime=${StartTime}&endTime=${EndTime}&granularity=${granularity}
${Logurl} Set Variable http://${host}:${port}/v1/interface/gateway/sql/galaxy/${logType}/timedistribution${urlpath}
${responsebody} distributed_query ${Logurl} ${token}
log ${responsebody}
LogApiVerifyCase-006
[Documentation] 验证api接口:日志检索条件校验filter内容验证
${logType} Set Variable security_event_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}
LogApiVerifyCase-007
[Documentation] 验证api接口:原始日志根据条件过滤计算时间分布查询
${Logurl} Set Variable http://${host}:${port}/v1/log/timedistribution
${logType} Set Variable security_event_log
${StartTime} Set Variable 2021-03-26 12:27:03
${EndTime} Set Variable 2021-03-29 12:27:03
${granularity} Set Variable PT5M
${filter} Set Variable common_recv_time = 45535
${responsebody} timedistribution ${logurl} ${token} ${StartTime} ${EndTime} ${logType} ${granularity} ${filter}
log ${responsebody}