上传log查询返回数据验证方法及样例

This commit is contained in:
byb11
2021-04-27 10:35:15 +08:00
parent 8f6060f877
commit ff26c17784
2 changed files with 165 additions and 0 deletions

View File

@@ -4,6 +4,10 @@ Resource ../../../03-Variable/bifangapivariable.txt
Library OperatingSystem
Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot
Library ../../../04-CustomLibrary/Custometest/UIAssert.py
Library ../../../04-CustomLibrary/Custometest/Schema.py
Library ../../../04-CustomLibrary/Custometest/LogResponseVAL.py
Library DateTime
Library String
Library Selenium2Library
*** Variables ***
@@ -22,5 +26,25 @@ NoName
ResponsrPageCreateAndEdit ${ResponsrPageInfo}
logtest
log logtest11111111111111111
${Logurl} Set Variable http://${host}:${port}/v1/log/list
${logType} Set Variable security_event_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 common_log_id=238347398589845504 OR common_log_id=238347398522859520
${responsebody} loglistverify ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
${targetdict} create list common_log_id = 237434463277422592
log ${responsebody}
${strlist} FieldValidation ${responsebody} ${targetdict}
log ${strlist}
Assertresults ${strlist}