上传接口自动化用例

This commit is contained in:
byb11
2021-05-06 10:35:13 +08:00
parent 6125e47947
commit 37771b14ec
3 changed files with 60 additions and 2 deletions

View File

@@ -254,6 +254,8 @@ TransactionRecordLogRetrievalConditionApiVerify
${Logurl} Set Variable http://${host}:${port}/v1/interface/gateway/sql/galaxy/log/filter/validation${urlpath}
${responsebody} distributed_query ${Logurl} ${token}
log ${responsebody}

View File

@@ -0,0 +1,56 @@
*** Settings ***
Force Tags tsg_adc_wp
Resource ../../../03-Variable/BifangApiVariable.txt
Library ../../../04-CustomLibrary/Custometest/Schema.py
Library ../../../04-CustomLibrary/Custometest/LogResponseVAL.py
Resource ../../../05-Other/AllFlowCaseVariable1.txt
Library json
Library OperatingSystem
Library Selenium2Library
Library RequestsLibrary
Library Collections
Library String
*** Variables ***
*** Test Cases ***
VoipRecordLogApiVerifyCase
[Documentation] voip_record_log纯接口测试用例
${Logurl} Set Variable http://${host}:${port}/v1/log/list
${logType} Set Variable voip_record_log
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
${EndTime1} Set Variable ${endtime}
${StartTime1} Set Variable ${starttime}
logapiverify ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType}
VoipRecordLogCount
[Documentation] voip_record_log统计日志总数
${Logurl} Set Variable http://${host}:${port}/v1/log/count
${logType} Set Variable voip_record_log
${EndTime1} Set Variable ${endtime}
${StartTime1} Set Variable ${starttime}
${count} countlog_query ${Logurl} ${token} ${StartTime1} ${EndTime1} ${logType}
log ${count}
VoipRecordLogExportLog
[Documentation] voip_record_log导出日志
${Logurl} Set Variable http://${host}:${port}/v1/log/batch
${logType} Set Variable voip_record_log
${Schemaurl} Set Variable http://${host}:${port}/v1/log/schema?logType=${logType}
${EndTime1} Set Variable ${endtime}
${StartTime1} Set Variable ${starttime}
${filter} Set Variable common_client_ip = ${testClentIP}
exportlog ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
VoipRecordLogRetrievalConditionApiVerify
[Documentation] voip_record_log:日志检索条件校验filter内容验证
${logType} Set Variable voip_record_log
${filter} Set Variable common_client_ip = ${testClentIP}
${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}

View File

@@ -35,9 +35,9 @@ logtest
${EndTime1} Get Substring ${EndTime} \ -4
${StartTime} add time to date ${EndTime} -03:00:00
${StartTime1} Get Substring ${StartTime} \ -4
${filter} Set Variable common_log_id=239883677236457472
${filter} Set Variable common_log_id=241686735461177344
${responsebody} loglistverify ${Logurl} ${Schemaurl} ${token} ${StartTime1} ${EndTime1} ${logType} ${filter}
${targetdict} create list common_log_i
${targetdict} create list common_log_id
log ${responsebody}
${strlist} FieldValidation ${responsebody} ${targetdict}
log ${strlist}