2020-05-26 19:54:19 +08:00
|
|
|
|
*** Settings ***
|
|
|
|
|
|
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
2020-06-18 13:46:16 +08:00
|
|
|
|
Resource ../../../03-Variable/BifangApiVariable.txt
|
2020-05-27 16:19:37 +08:00
|
|
|
|
Library DateTime
|
2020-05-26 19:54:19 +08:00
|
|
|
|
|
|
|
|
|
|
*** Test Cases ***
|
|
|
|
|
|
LogStatistics-injectionstatistics-00001
|
|
|
|
|
|
#120未更新
|
|
|
|
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|
|
|
|
|
${apiName} set variable injectionstatistics
|
2020-06-18 13:46:16 +08:00
|
|
|
|
#请求地址 例如:/${version}/report/domain/recommend
|
|
|
|
|
|
${url} set variable /${version}/report/traffic/injectionstatistics
|
2020-05-26 19:54:19 +08:00
|
|
|
|
#开始时间格式Y-M-D h:i:s
|
|
|
|
|
|
${startTime} set variable 2020-04-26 16:40:01
|
|
|
|
|
|
#结束时间格式Y-M-D h:i:s
|
|
|
|
|
|
${endTime} set variable 2020-05-26 10:57:47
|
|
|
|
|
|
#返回结果记录数
|
|
|
|
|
|
${limit} set variable 50
|
|
|
|
|
|
#设备id,多个id逗号分隔 \ 支持设备列表查询 ,后台查询条件如:device_id in ($device_ids)
|
|
|
|
|
|
${device_ids} set variable CBT2201925000001
|
|
|
|
|
|
#统计时间粒度,单位秒,最小统计粒度为30秒
|
|
|
|
|
|
${timeGranularity} set variable 30
|
2020-05-27 16:19:37 +08:00
|
|
|
|
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity} limit=${limit} device_ids=${device_ids}
|
|
|
|
|
|
|
|
|
|
|
|
LogStatistics-injectionstatistics-00002
|
|
|
|
|
|
#120未更新
|
|
|
|
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|
|
|
|
|
${apiName} set variable injectionstatistics
|
2020-06-18 13:46:16 +08:00
|
|
|
|
#请求地址 例如:/${version}/report/domain/recommend
|
|
|
|
|
|
${url} set variable /${version}/report/traffic/injectionstatistics
|
2020-05-27 16:19:37 +08:00
|
|
|
|
#结束时间格式Y-M-D h:i:s
|
|
|
|
|
|
${Time} get current date
|
|
|
|
|
|
${endTime}= add time to date ${Time} -00:05:00
|
|
|
|
|
|
${endTime} Get Substring ${endTime} \ -4
|
|
|
|
|
|
#开始时间格式Y-M-D h:i:s
|
|
|
|
|
|
${startTime}= add time to date ${endTime}= -01:00:00
|
|
|
|
|
|
${startTime} Get Substring ${startTime} \ -4
|
|
|
|
|
|
#统计时间粒度,单位秒,最小统计粒度为30秒
|
|
|
|
|
|
${timeGranularity} set variable 30
|
|
|
|
|
|
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|
|
|
|
|
|
|
|
|
|
|
|
LogStatistics-injectionstatistics-00003
|
|
|
|
|
|
#120未更新
|
|
|
|
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|
|
|
|
|
${apiName} set variable injectionstatistics
|
2020-06-18 13:46:16 +08:00
|
|
|
|
#请求地址 例如:/${version}/report/domain/recommend
|
|
|
|
|
|
${url} set variable /${version}/report/traffic/injectionstatistics
|
2020-05-27 16:19:37 +08:00
|
|
|
|
#结束时间格式Y-M-D h:i:s
|
|
|
|
|
|
${Time} get current date
|
|
|
|
|
|
${endTime}= add time to date ${Time} -00:05:00
|
|
|
|
|
|
${endTime} Get Substring ${endTime} \ -4
|
|
|
|
|
|
#开始时间格式Y-M-D h:i:s
|
|
|
|
|
|
${startTime}= add time to date ${endTime}= -1 days
|
|
|
|
|
|
${startTime} Get Substring ${startTime} \ -4
|
|
|
|
|
|
${device_ids} set variable CBT2201925000001
|
|
|
|
|
|
#统计时间粒度,单位秒,最小统计粒度为30秒
|
|
|
|
|
|
${timeGranularity} set variable 30
|
|
|
|
|
|
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|
|
|
|
|
|
|
|
|
|
|
|
LogStatistics-injectionstatistics-00004
|
|
|
|
|
|
#120未更新
|
|
|
|
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|
|
|
|
|
${apiName} set variable injectionstatistics
|
2020-06-18 13:46:16 +08:00
|
|
|
|
#请求地址 例如:/${version}/report/domain/recommend
|
|
|
|
|
|
${url} set variable /${version}/report/traffic/injectionstatistics
|
2020-05-27 16:19:37 +08:00
|
|
|
|
#结束时间格式Y-M-D h:i:s
|
|
|
|
|
|
${Time} get current date
|
|
|
|
|
|
${endTime}= add time to date ${Time} -00:05:00
|
|
|
|
|
|
${endTime} Get Substring ${endTime} \ -4
|
|
|
|
|
|
#开始时间格式Y-M-D h:i:s
|
|
|
|
|
|
${startTime}= add time to date ${endTime}= -7 days
|
|
|
|
|
|
${startTime} Get Substring ${startTime} \ -4
|
|
|
|
|
|
${device_ids} set variable CBT2201925000001
|
|
|
|
|
|
#统计时间粒度,单位秒,最小统计粒度为30秒
|
|
|
|
|
|
${timeGranularity} set variable 30
|
|
|
|
|
|
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|
|
|
|
|
|
|
|
|
|
|
|
LogStatistics-injectionstatistics-00005
|
|
|
|
|
|
#120未更新
|
|
|
|
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|
|
|
|
|
${apiName} set variable injectionstatistics
|
2020-06-18 13:46:16 +08:00
|
|
|
|
#请求地址 例如:/${version}/report/domain/recommend
|
|
|
|
|
|
${url} set variable /${version}/report/traffic/injectionstatistics
|
2020-05-27 16:19:37 +08:00
|
|
|
|
#结束时间格式Y-M-D h:i:s
|
|
|
|
|
|
${Time} get current date
|
|
|
|
|
|
${endTime}= add time to date ${Time} -00:05:00
|
|
|
|
|
|
${endTime} Get Substring ${endTime} \ -4
|
|
|
|
|
|
#开始时间格式Y-M-D h:i:s
|
|
|
|
|
|
${startTime}= add time to date ${endTime}= -30 days
|
|
|
|
|
|
${startTime} Get Substring ${startTime} \ -4
|
|
|
|
|
|
${device_ids} set variable CBT2201925000001
|
|
|
|
|
|
#统计时间粒度,单位秒,最小统计粒度为30秒
|
|
|
|
|
|
${timeGranularity} set variable 30
|
|
|
|
|
|
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|
|
|
|
|
|
|
|
|
|
|
|
LogStatistics-injectionstatistics-00006
|
|
|
|
|
|
#120未更新
|
|
|
|
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|
|
|
|
|
${apiName} set variable injectionstatistics
|
2020-06-18 13:46:16 +08:00
|
|
|
|
#请求地址 例如:/${version}/report/domain/recommend
|
|
|
|
|
|
${url} set variable /${version}/report/traffic/injectionstatistics
|
2020-05-27 16:19:37 +08:00
|
|
|
|
#结束时间格式Y-M-D h:i:s
|
|
|
|
|
|
${Time} get current date
|
|
|
|
|
|
${endTime}= add time to date ${Time} -00:05:00
|
|
|
|
|
|
${endTime} Get Substring ${endTime} \ -4
|
|
|
|
|
|
#开始时间格式Y-M-D h:i:s
|
|
|
|
|
|
${startTime}= add time to date ${endTime}= -365 days
|
|
|
|
|
|
${startTime} Get Substring ${startTime} \ -4
|
|
|
|
|
|
${device_ids} set variable CBT2201925000001
|
|
|
|
|
|
#统计时间粒度,单位秒,最小统计粒度为30秒
|
|
|
|
|
|
${timeGranularity} set variable 30
|
|
|
|
|
|
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity}
|