blob: 1c549aa9cdf29d00d30bf0e96273f99decccbef7 [file] [log] [blame]
waynedunican36806ac2023-02-24 08:44:58 +00001*** Settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6Resource ${CURDIR}/common-library.robot
7
8*** Keywords ***
9ValidateResponseTimeForApi
10 [Arguments] ${uri} ${method}
rameshiyer2765fc3752023-04-05 13:47:15 +010011 [Documentation] Check if uri response is under the 1500ms required time for api metrics
12 ValidateResponseTime api-metrics ${uri} ${method} 1500
waynedunican36806ac2023-02-24 08:44:58 +000013
14*** Test Cases ***
15WaitForPrometheusServer
16 [Documentation] Sleep time to wait for Prometheus server to gather all metrics
17 Sleep 1 minute
18
19ValidateResponseTimeForHealthcheck
20 [Documentation] Validate component healthcheck response time
21 ValidateResponseTimeForApi /healthcheck GET
22
waynedunican36806ac2023-02-24 08:44:58 +000023ValidateResponseTimeQueryPolicies
24 [Documentation] Validate query policies response time
25 ValidateResponseTimeForApi /policies GET
26
waynedunicanf636d7f2023-03-02 09:12:44 +000027ValidateResponseTimeQueryPolicyTypeListVersions
28 [Documentation] Validate query policyType versions response time
rameshiyer2765fc3752023-04-05 13:47:15 +010029 ValidateResponseTime api-metrics /policytypes/{policyTypeId} GET 1500
waynedunicanf636d7f2023-03-02 09:12:44 +000030
rameshiyer2765fc3752023-04-05 13:47:15 +010031#Time increased from 200 to 1500 due to slow ONAP machines
waynedunican36806ac2023-02-24 08:44:58 +000032ValidateResponseTimeQueryPolicyVersion
33 [Documentation] Validate query policy by version response time
rameshiyer2765fc3752023-04-05 13:47:15 +010034 ValidateResponseTime api-metrics /policies/{policyId}/versions/{policyVersion} GET 1500
waynedunican36806ac2023-02-24 08:44:58 +000035
36ValidateResponseTimeCreatePolicy
37 [Documentation] Validate response time for creating a policy
38 ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies POST
39
40ValidateResponseTimeCreatePolicyType
41 [Documentation] Validate response time for creating a policyType
42 ValidateResponseTimeForApi /policytypes POST
43
44ValidateResponseTimeDeletePolicy
45 [Documentation] Validate response time for deletion of policies
waynedunicanf636d7f2023-03-02 09:12:44 +000046 ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} DELETE
47
48ValidateResponseTimeDeletePolicyType
49 [Documentation] Validate response time for deletion of policyTypes
50 ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{versionId} DELETE