waynedunican | 36806ac | 2023-02-24 08:44:58 +0000 | [diff] [blame^] | 1 | *** Settings *** |
| 2 | Library Collections |
| 3 | Library RequestsLibrary |
| 4 | Library OperatingSystem |
| 5 | Library json |
| 6 | Resource ${CURDIR}/common-library.robot |
| 7 | |
| 8 | *** Keywords *** |
| 9 | ValidateResponseTimeForApi |
| 10 | [Arguments] ${uri} ${method} |
| 11 | [Documentation] Check if uri response is under the 500ms required time for api metrics |
| 12 | ValidateResponseTime api-metrics ${uri} ${method} 500 |
| 13 | |
| 14 | *** Test Cases *** |
| 15 | WaitForPrometheusServer |
| 16 | [Documentation] Sleep time to wait for Prometheus server to gather all metrics |
| 17 | Sleep 1 minute |
| 18 | |
| 19 | ValidateResponseTimeForHealthcheck |
| 20 | [Documentation] Validate component healthcheck response time |
| 21 | ValidateResponseTimeForApi /healthcheck GET |
| 22 | |
| 23 | ValidateResponseTimeForStatistics |
| 24 | [Documentation] Validate statistics response time |
| 25 | ValidateResponseTimeForApi /statistics GET |
| 26 | |
| 27 | ValidateResponseTimeQueryPolicies |
| 28 | [Documentation] Validate query policies response time |
| 29 | ValidateResponseTimeForApi /policies GET |
| 30 | |
| 31 | ValidateResponseTimeQueryPolicyVersion |
| 32 | [Documentation] Validate query policy by version response time |
| 33 | ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} GET |
| 34 | |
| 35 | ValidateResponseTimeCreatePolicy |
| 36 | [Documentation] Validate response time for creating a policy |
| 37 | ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies POST |
| 38 | |
| 39 | ValidateResponseTimeCreatePolicyType |
| 40 | [Documentation] Validate response time for creating a policyType |
| 41 | ValidateResponseTimeForApi /policytypes POST |
| 42 | |
| 43 | ValidateResponseTimeDeletePolicy |
| 44 | [Documentation] Validate response time for deletion of policies |
| 45 | ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} DELETE |