blob: 7fd8ff980a43648c849481f48c4cde834626a101 [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
23ValidateResponseTimeForStatistics
24 [Documentation] Validate statistics response time
25 ValidateResponseTimeForApi /statistics GET
26
27ValidateResponseTimeQueryPolicies
28 [Documentation] Validate query policies response time
29 ValidateResponseTimeForApi /policies GET
30
waynedunicanf636d7f2023-03-02 09:12:44 +000031ValidateResponseTimeQueryPolicyTypeListVersions
32 [Documentation] Validate query policyType versions response time
rameshiyer2765fc3752023-04-05 13:47:15 +010033 ValidateResponseTime api-metrics /policytypes/{policyTypeId} GET 1500
waynedunicanf636d7f2023-03-02 09:12:44 +000034
rameshiyer2765fc3752023-04-05 13:47:15 +010035#Time increased from 200 to 1500 due to slow ONAP machines
waynedunican36806ac2023-02-24 08:44:58 +000036ValidateResponseTimeQueryPolicyVersion
37 [Documentation] Validate query policy by version response time
rameshiyer2765fc3752023-04-05 13:47:15 +010038 ValidateResponseTime api-metrics /policies/{policyId}/versions/{policyVersion} GET 1500
waynedunican36806ac2023-02-24 08:44:58 +000039
40ValidateResponseTimeCreatePolicy
41 [Documentation] Validate response time for creating a policy
42 ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies POST
43
44ValidateResponseTimeCreatePolicyType
45 [Documentation] Validate response time for creating a policyType
46 ValidateResponseTimeForApi /policytypes POST
47
48ValidateResponseTimeDeletePolicy
49 [Documentation] Validate response time for deletion of policies
waynedunicanf636d7f2023-03-02 09:12:44 +000050 ValidateResponseTimeForApi /policies/{policyId}/versions/{policyVersion} DELETE
51
52ValidateResponseTimeDeletePolicyType
53 [Documentation] Validate response time for deletion of policyTypes
54 ValidateResponseTimeForApi /policytypes/{policyTypeId}/versions/{versionId} DELETE