1.上传Report纯接口测试反向方法 2.上传report反向用例
This commit is contained in:
@@ -16,6 +16,7 @@ ${chart_url} /${version}/report/chart
|
||||
${result_url} /${version}/report/offlinejob/result
|
||||
${resultId} ${EMPTY}
|
||||
*** Test Cases ***
|
||||
# Report 目的性测试
|
||||
|
||||
#############################################################Security Event########################################################################
|
||||
ReportDatasetsSecurityEventMaximumCombination
|
||||
@@ -110,7 +111,7 @@ ReportSecurityEventNotMonitorClientIP
|
||||
insert_Report_to_file1 Report_ID2 ${reportId}
|
||||
|
||||
ReportSecurityEventActionBytesSentMax
|
||||
[Tags] Positive API Report 安全日志各动作的流量
|
||||
[Tags] Positive API Report 安全日志各动作的流量
|
||||
Comment 创建Datasets
|
||||
BasePostRequestOK ${dataset_url} {"list":{"name":"${TEST NAME}","logType":"security_event_log","groupColumnList":[{"name":"common_action"}],"queryColumnList":[{"name":"common_action","expression":"","label":"Action"},{"name":"common_c2s_byte_num","expression":"max","label":"Bytes Sent","expressionList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}]}],"filterCondition":{"andConditions":[{"orConditions":[{"name":"common_direction","expression":"=","expressionList":[{"label":"=","value":"="},{"label":"!=","value":"!="}],"value":[69],"type":"int"}]}]},"havingCondition":{"andConditions":[{"orConditions":[{"name":"common_con_duration_ms","funList":[{"label":"sum","value":"sum"},{"label":"min","value":"min"},{"label":"max","value":"max"},{"label":"avg","value":"avg"},{"label":"count","value":"count"}],"expressionList":["=","!=",">","<",">=","<="],"function":"sum","expression":">","value":1}]}]},"isInitialize":0}}
|
||||
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
@@ -334,4 +335,4 @@ ReportVoip
|
||||
Comment 验证报告是否产生
|
||||
ResultGetRequestOK ${result_url} jobId=${reportId}&opStartTime=&opEndTime=&pageSize=-1
|
||||
insert_Report_to_file1 Report_ID13 ${reportId}
|
||||
|
||||
|
||||
@@ -5,312 +5,26 @@ Library OperatingSystem
|
||||
Library Selenium2Library
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Library ../../../04-CustomLibrary/Custometest/ReportSchema.py
|
||||
Library ../../../04-CustomLibrary/Custometest/ReportSchema_Negtive.py
|
||||
|
||||
*** Variables ***
|
||||
# ${dataset_url} /${version}/report/dataset
|
||||
# ${datasetId} ${EMPTY}
|
||||
# ${reportId} ${EMPTY}
|
||||
# ${report_url} /${version}/report/offlinejob
|
||||
# ${chartId} ${EMPTY}
|
||||
# ${chart_url} /${version}/report/chart
|
||||
# ${result_url} /${version}/report/offlinejob/result
|
||||
# ${resultId} ${EMPTY}
|
||||
# ${logtype} Set Variable security_event_log
|
||||
# ${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
# ${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
# ${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
# ${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
# ${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
# ${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
|
||||
|
||||
*** Test Cases ***
|
||||
ReportSecurityEventLogGroupBy
|
||||
[Tags] Positive API Report Security Event GroupBy
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable GroupBy
|
||||
${logtype} Set Variable security_event_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
#Report dataset 纯接口测试,所有GroupBY、dataBingdings、Filter、Having,根据schemca定义测试所有这些数据、数据对应函数何操作符号。
|
||||
Reportest_Positive
|
||||
log Report纯接口测试全条件覆盖
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
${logtypelist} create list security_event_log proxy_event_log connection_record_log radius_record_log voip_record_log
|
||||
ReportPositiveTest ${host} ${port} ${token} ${dataset_url} ${char_url} ${report_url} ${logtypelist}
|
||||
|
||||
ReportSecurityEventLogDataBindings
|
||||
[Tags] Positive API Report Security Event DataBindings
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable DataBindings
|
||||
${logtype} Set Variable security_event_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
Reportest_Negtive
|
||||
log Report纯接口测试反向
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportSecurityEventLogFilter
|
||||
[Tags] Positive API Report Security Event Filter
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Filter
|
||||
${logtype} Set Variable security_event_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportSecurityEventLogHaving
|
||||
[Tags] Positive API Report Security Event Having
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Having
|
||||
${logtype} Set Variable security_event_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportProxyEventLogGroupBy
|
||||
[Tags] Positive API Report Proxy Event GroupBy
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable GroupBy
|
||||
${logtype} Set Variable proxy_event_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportProxyEventLogDataBindings
|
||||
[Tags] Positive API Report Proxy Event DataBindings
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable DataBindings
|
||||
${logtype} Set Variable proxy_event_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportProxyEventLogFilter
|
||||
[Tags] Positive API Report Proxy Event Filter
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Filter
|
||||
${logtype} Set Variable proxy_event_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportProxyEventLogHaving
|
||||
[Tags] Positive API Report Proxy Event Having
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Having
|
||||
${logtype} Set Variable proxy_event_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportSessionRecordsGroupBy
|
||||
[Tags] Positive API Report Session Records GroupBy
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable GroupBy
|
||||
${logtype} Set Variable connection_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportSessionRecordsDataBindings
|
||||
[Tags] Positive API Report Session Records DataBindings
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable DataBindings
|
||||
${logtype} Set Variable connection_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportSessionRecordsFilter
|
||||
[Tags] Positive API Report Session Records Filter
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Filter
|
||||
${logtype} Set Variable connection_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportSessionRecordsHaving
|
||||
[Tags] Positive API Report Session Records Having
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Having
|
||||
${logtype} Set Variable connection_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportRadiusGroupBy
|
||||
[Tags] Positive API Report Radius GroupBy
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable GroupBy
|
||||
${logtype} Set Variable radius_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportRadiusDataBindings
|
||||
[Tags] Positive API Report Radius DataBindings
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable DataBindings
|
||||
${logtype} Set Variable radius_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportRadiusFilter
|
||||
[Tags] Positive API Report Radius Filter
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Filter
|
||||
${logtype} Set Variable radius_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportRadiusHaving
|
||||
[Tags] Positive API Report Radius Having
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Having
|
||||
${logtype} Set Variable radius_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportVoipRecordsGroupBy
|
||||
[Tags] Positive API Report Voip Records GroupBy
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable GroupBy
|
||||
${logtype} Set Variable voip_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportVoipRecordsDataBindings
|
||||
[Tags] Positive API Report Voip Records DataBindings
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable DataBindings
|
||||
${logtype} Set Variable voip_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportVoipRecordsFilter
|
||||
[Tags] Positive API Report Voip Records Filter
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Filter
|
||||
${logtype} Set Variable voip_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
ReportVoipRecordsHaving
|
||||
[Tags] Positive API Report Voip Records Having
|
||||
log ${TEST NAME}
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Having
|
||||
${logtype} Set Variable voip_record_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
|
||||
#纯接口测试调用新方法循环执行
|
||||
# ReportInterfaceTest
|
||||
# log 11111111111111111111
|
||||
# ${testpointlist} create list GroupBy DataBindings Filter Having
|
||||
# ${logtypelist} create list security_event_log proxy_event_log connection_record_log radius_record_log voip_record_log
|
||||
# ${dataseturl} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
# ${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
# ${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
# ReportTest ${host} ${token} ${dataseturl} ${char_url} ${report_url} ${logtypelist} ${testpointlist}
|
||||
${logtypelist} create list security_event_log proxy_event_log connection_record_log radius_record_log voip_record_log
|
||||
ReportPositiveTest_Negtive ${host} ${port} ${token} ${dataset_url} ${char_url} ${report_url} ${logtypelist}
|
||||
|
||||
@@ -4,29 +4,9 @@ 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/ReportSchema.py
|
||||
Library ../../../04-CustomLibrary/Custometest/JsonDiff.py
|
||||
Library DateTime
|
||||
Library json
|
||||
Library Selenium2Library
|
||||
Library RequestsLibrary
|
||||
Library Collections
|
||||
Library String
|
||||
Library GetTimeLibrary
|
||||
Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
Resource ../../../02-Keyword/tsg_bfapi/Common.robot
|
||||
Resource ../../../02-Keyword/tsg_bfapi/offline_stat_report/ApiRequest1.robot
|
||||
Resource ../../../02-Keyword/tsg_adc/FileOperation.robot
|
||||
|
||||
*** Variables ***
|
||||
${dataset_url} /${version}/report/dataset
|
||||
${datasetId} ${EMPTY}
|
||||
${reportId} ${EMPTY}
|
||||
${report_url} /${version}/report/offlinejob
|
||||
${chartId} ${EMPTY}
|
||||
${chart_url} /${version}/report/chart
|
||||
${result_url} /${version}/report/offlinejob/result
|
||||
${resultId} ${EMPTY}
|
||||
|
||||
*** Test Cases ***
|
||||
CreateAndEdit
|
||||
@@ -42,48 +22,5 @@ NoName
|
||||
ResponsrPageCreateAndEdit ${ResponsrPageInfo}
|
||||
|
||||
|
||||
ReportInterfaceTest
|
||||
log report
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Having
|
||||
${logtype} Set Variable security_event_log
|
||||
${schemaurl} Set Variable http://${host}:${port}/${version}/log/schema?logType=${logtype}
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${dataset_geturl} Set Variable ${dataset_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${char_geturl} Set Variable ${char_url}?pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
ReportInterfaceTest ${schemaurl} ${token} ${dataset_url} ${char_url} ${report_url} ${dataset_geturl} ${char_geturl} ${TEST NAME} ${logtype} ${testpoint}
|
||||
# log ${aaaa}
|
||||
# BasePostRequestOK ${chart_url} {"list":{"id":null,"name":"${TEST NAME}","description":"","datasetId":"${id}","chartType":"line","dataTop":0,"orderBy":"","orderDesc":0,"drilldownTop":0,"includeOther":false,"timeline":{"dataBinding":"Receive Time","label":"","format":"Time"},"line":[{"dataBinding":"Client IP","type":"Line Up","format":"Default","legend":"Client IP"}],"groupBy":null},"refuseCode":true}
|
||||
# ${response1} BaseGetRequestOK ${chart_url} pageSize=20&pageNo=1&id=&name=${TEST NAME}&opUser=
|
||||
# ${chartId} Set Variable ${response1}[data][list][0][id]
|
||||
|
||||
# Comment 创建Report
|
||||
# BasePostRequestOK ${report_url} {"reportJobList":{"rangeType":"yesterday","rangeInterval":"","rangeUnit":"","jobName":"${TEST NAME}","scheduleId":"","chartList":[{"chartId":${chartId},"timeGranulartiy":30,"timeUnit":"minute","disabled":false}],"isNotice":0,"noticeMethod":"","receivers":[""],"receiver":"","startTime":"","endTime":"","filterCondition":null,"isDisplayTrafficTrend":0}}
|
||||
|
||||
|
||||
Reportest
|
||||
log Reportest开始
|
||||
#${testdian} 传入测试点,测试点全覆盖 GroupBy 、DataBindings 、Filter 、Having
|
||||
${testpoint} Set Variable Having
|
||||
${dataset_url} Set Variable http://${host}:${port}/${version}/report/dataset
|
||||
${char_url} Set Variable http://${host}:${port}/${version}/report/chart
|
||||
${report_url} Set Variable http://${host}:${port}/${version}/report/offlinejob
|
||||
${logtypelist} create list security_event_log proxy_event_log connection_record_log radius_record_log voip_record_log
|
||||
ReportPositiveTest ${host} ${port} ${token} ${dataset_url} ${char_url} ${report_url} ${logtypelist}
|
||||
|
||||
|
||||
datesettest
|
||||
BasePostRequestOK ${dataset_url} {"list":{"name":"${TEST NAME}","logType":"security_event_log","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_recv_time","expression":"","label":"Receive Time"},{"name":"common_server_ip","expression":"count"},{"name":"common_server_ip","expression":"count_distinct"}],"filterCondition":null,"havingCondition":null,"isInitialize":0}}
|
||||
${response} BaseGetRequestOK ${dataset_url} pageSize=20&pageNo=1&id=&name=${TEST NAME}&logType=&opStartTime=&opEndTime=&opUser=
|
||||
${datasetId} Set Variable ${response}[data][list][0][id]
|
||||
|
||||
|
||||
jsondifftest
|
||||
${a} Set Variable {"list":{"name":"${TEST NAME}","logType":"securitent_log","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_recv_time","expression":"","label":"Receive Time"},{"name":"common_server_ip","expression":"count"},{"name":"common_server_ip","expression":"count_distinct"}],"filterCondition":null,"havingCondition":null,"isInitialize":0}}
|
||||
${b} Set Variable {"list":{"name":"${TEST NAME}","logType":"securitevent_log","groupColumnList":[{"name":"common_recv_time"}],"queryColumnList":[{"name":"common_recv_time","expression":"","label":"Receive Time"},{"name":"common_server_ip","expression":"count"},{"name":"common_server_ip","expression":"count_distinct"}],"filterCondition":null,"havingCondition":null,"isInitialize":0}}
|
||||
${c} json_diff ${a} ${b}
|
||||
Should Be Equal As Strings ${c} True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user