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} |
rameshiyer27 | 65fc375 | 2023-04-05 13:47:15 +0100 | [diff] [blame^] | 11 | [Documentation] Check if uri response is under the 1500ms required time for api metrics |
| 12 | ValidateResponseTime api-metrics ${uri} ${method} 1500 |
waynedunican | 36806ac | 2023-02-24 08:44:58 +0000 | [diff] [blame] | 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 | |
waynedunican | f636d7f | 2023-03-02 09:12:44 +0000 | [diff] [blame] | 31 | ValidateResponseTimeQueryPolicyTypeListVersions |
| 32 | [Documentation] Validate query policyType versions response time |
rameshiyer27 | 65fc375 | 2023-04-05 13:47:15 +0100 | [diff] [blame^] | 33 | ValidateResponseTime api-metrics /policytypes/{policyTypeId} GET 1500 |
waynedunican | f636d7f | 2023-03-02 09:12:44 +0000 | [diff] [blame] | 34 | |
rameshiyer27 | 65fc375 | 2023-04-05 13:47:15 +0100 | [diff] [blame^] | 35 | #Time increased from 200 to 1500 due to slow ONAP machines |
waynedunican | 36806ac | 2023-02-24 08:44:58 +0000 | [diff] [blame] | 36 | ValidateResponseTimeQueryPolicyVersion |
| 37 | [Documentation] Validate query policy by version response time |
rameshiyer27 | 65fc375 | 2023-04-05 13:47:15 +0100 | [diff] [blame^] | 38 | ValidateResponseTime api-metrics /policies/{policyId}/versions/{policyVersion} GET 1500 |
waynedunican | 36806ac | 2023-02-24 08:44:58 +0000 | [diff] [blame] | 39 | |
| 40 | ValidateResponseTimeCreatePolicy |
| 41 | [Documentation] Validate response time for creating a policy |
| 42 | ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies POST |
| 43 | |
| 44 | ValidateResponseTimeCreatePolicyType |
| 45 | [Documentation] Validate response time for creating a policyType |
| 46 | ValidateResponseTimeForApi /policytypes POST |
| 47 | |
| 48 | ValidateResponseTimeDeletePolicy |
| 49 | [Documentation] Validate response time for deletion of policies |
waynedunican | f636d7f | 2023-03-02 09:12:44 +0000 | [diff] [blame] | 50 | ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} DELETE |
| 51 | |
| 52 | ValidateResponseTimeDeletePolicyType |
| 53 | [Documentation] Validate response time for deletion of policyTypes |
| 54 | ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{versionId} DELETE |