This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dongxiaoyan-tsg-autotest/01-TestCase/tsg_bfapi/api_log/LogStatistics-injectionstatistics.robot
dongxiaoyan fc79ac3782 1、添加时间工具关键字
2、调整部分错误
2020-06-18 13:46:16 +08:00

113 lines
5.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

*** Settings ***
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
Resource ../../../03-Variable/BifangApiVariable.txt
Library DateTime
*** Test Cases ***
LogStatistics-injectionstatistics-00001
#120未更新
#apiName请求大数据时用于区分每个接口的sql
${apiName} set variable injectionstatistics
#请求地址 例如:/${version}/report/domain/recommend
${url} set variable /${version}/report/traffic/injectionstatistics
#开始时间格式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
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
#请求地址 例如:/${version}/report/domain/recommend
${url} set variable /${version}/report/traffic/injectionstatistics
#结束时间格式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
#请求地址 例如:/${version}/report/domain/recommend
${url} set variable /${version}/report/traffic/injectionstatistics
#结束时间格式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
#请求地址 例如:/${version}/report/domain/recommend
${url} set variable /${version}/report/traffic/injectionstatistics
#结束时间格式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
#请求地址 例如:/${version}/report/domain/recommend
${url} set variable /${version}/report/traffic/injectionstatistics
#结束时间格式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
#请求地址 例如:/${version}/report/domain/recommend
${url} set variable /${version}/report/traffic/injectionstatistics
#结束时间格式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}