83 lines
3.7 KiB
Plaintext
83 lines
3.7 KiB
Plaintext
|
|
*** Settings ***
|
|||
|
|
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
|
|||
|
|
|
|||
|
|
*** Test Cases ***
|
|||
|
|
Statistics-Country-00001
|
|||
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|||
|
|
${apiName} set variable Country
|
|||
|
|
#请求地址 例如:/report/domain/recommend
|
|||
|
|
${url} set variable /report/country/sourceipnum
|
|||
|
|
#开始时间格式Y-M-D h:i:s
|
|||
|
|
${startTime} set variable 2020-4-20 13:36:35
|
|||
|
|
#结束时间格式Y-M-D h:i:s
|
|||
|
|
${endTime} set variable 2020-4-23 13:36:35
|
|||
|
|
#limit int型
|
|||
|
|
${limit} set variable 50
|
|||
|
|
GetApi ${url} startTime=${startTime} endTime=${endTime} limit=${limit}
|
|||
|
|
|
|||
|
|
Statistics-domain-00001
|
|||
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|||
|
|
${apiName} set variable domain
|
|||
|
|
#请求地址 例如:/report/domain/recommend
|
|||
|
|
${url} set variable /report/domain/recommend
|
|||
|
|
#查询时间时间格式Y-M-D h:i:s
|
|||
|
|
${statisticTime} set variable 2020-04-22 14:00:00
|
|||
|
|
GetApi ${url} statisticTime=${statisticTime}
|
|||
|
|
|
|||
|
|
Statistics-url-00001
|
|||
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|||
|
|
${apiName} set variable url
|
|||
|
|
#请求地址 例如:/report/domain/recommend
|
|||
|
|
${url} set variable /report/url/recommend
|
|||
|
|
#查询时间时间格式Y-M-D h:i:s
|
|||
|
|
${statisticTime} set variable 2020-04-22 14:00:00
|
|||
|
|
GetApi ${url} statisticTime=${statisticTime}
|
|||
|
|
|
|||
|
|
Statistics-traffic-00001
|
|||
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|||
|
|
${apiName} set variable traffic
|
|||
|
|
#请求地址 例如:/report/domain/recommend
|
|||
|
|
${url} set variable /report/traffic/statisticsbyunit
|
|||
|
|
#统计类型: bytes:字节数 packets:包数 sessions:连接数 如不指定,则统计全部
|
|||
|
|
${statisticUnit} set variable bytes
|
|||
|
|
#开始时间格式Y-M-D h:i:s
|
|||
|
|
${startTime} set variable 2020-4-20 13:36:35
|
|||
|
|
#结束时间格式Y-M-D h:i:s
|
|||
|
|
${endTime} set variable 2020-4-26 16:04:56
|
|||
|
|
#统计粒度,单位秒,仅用于趋势查询sql 缺省为30秒
|
|||
|
|
${timeGranularity} set variable 50
|
|||
|
|
${limit} set variable 50
|
|||
|
|
GetApi ${url} statisticsUnit=${statisticUnit} startTime=${startTime} endTime=${endTime} timeGranularity=${timeGranularity} limit=${limit}
|
|||
|
|
|
|||
|
|
Statistics-traffic-00002
|
|||
|
|
#apiName,请求大数据时,用于区分每个接口的sql
|
|||
|
|
${apiName} set variable traffic
|
|||
|
|
#请求地址 例如:/report/domain/recommend
|
|||
|
|
${url} set variable /report/traffic/statisticsbyunit
|
|||
|
|
#开始时间格式Y-M-D h:i:s
|
|||
|
|
${startTime} set variable 2020-4-20 13:36:35
|
|||
|
|
${endTime} set variable 2020-4-26 16:04:56
|
|||
|
|
GetApi ${url} startTime=${startTime} endTime=${endTime}
|
|||
|
|
|
|||
|
|
Statistics-ip_correlation_domain-00001
|
|||
|
|
#请求地址 例如:/report/domain/recommend
|
|||
|
|
${url} set variable /report/ip_correlation_domain
|
|||
|
|
#开始时间格式Y-M-D h:i:s
|
|||
|
|
${startTime} set variable 2020-4-20 13:36:35
|
|||
|
|
#结束时间格式Y-M-D h:i:s
|
|||
|
|
${endTime} set variable 2020-4-26 16:04:56
|
|||
|
|
#IP
|
|||
|
|
${ip} set variable 157.225.77.82
|
|||
|
|
GetApi ${url} startTime=${startTime} endTime=${endTime} ip=${ip}
|
|||
|
|
|
|||
|
|
Statistics-hijack_srcip_location-00001
|
|||
|
|
#请求地址 例如:/report/domain/recommend
|
|||
|
|
${url} set variable /report/ip_correlation_domain
|
|||
|
|
#开始时间格式Y-M-D h:i:s
|
|||
|
|
${startTime} set variable 2020-4-20 13:36:35
|
|||
|
|
#结束时间格式Y-M-D h:i:s
|
|||
|
|
${endTime} set variable 2020-4-26 16:04:56
|
|||
|
|
#策略ID
|
|||
|
|
${policy_id} set variable 0
|
|||
|
|
GetApi ${url} startTime=${startTime} endTime=${endTime} policy_id=${policy_id}
|