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-domain_resource.robot

21 lines
960 B
Plaintext
Raw Normal View History

2020-05-26 19:54:19 +08:00
*** Settings ***
Library DateTime
Resource ../../../02-Keyword/tsg_bfapi/LogStatistics.robot
Resource ../../../03-Variable/BifangApiVariable.txt
2020-05-26 19:54:19 +08:00
*** Test Cases ***
LogStatistics-domain_resource-00001
#apiName请求大数据时用于区分每个接口的sql
${apiName} set variable domain_resource
#请求地址 例如:/report/domain/recommend
${url} set variable /${version}/report/domain/resource/analyze
2020-05-26 19:54:19 +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
${policyId} set variable 0
GetApi ${apiName} ${url} startTime=${startTime} endTime=${endTime} policy_id=${policyId}