Skip to content

Commit 0822dab

Browse files
committed
Add: test cases collection for TAC interaction for EATL logging
1 parent 541a55b commit 0822dab

8 files changed

Lines changed: 203240 additions & 2 deletions

File tree

testing/__Redouane wip__/TAC_interaction/v2.0.1/README

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Functional Testing of eatl logging
2+
3+
## General
4+
In the MWDI , every service implementation must call the EATL record-service-request API at the end of its execution. This ensures that each service invocation is logged in EATL
5+
EATL logs all service requests and provides functionality to retrieve information such as:
6+
- A list of all service records
7+
- A list of service records belonging to the same flow
8+
- A list of unsuccessful service requests
9+
10+
### Targets
11+
All individual services
12+
13+
14+
### Criteria
15+
- Valid Mount Name : when the mountName is valid (i.e. found in the list of connected devices), the expected response is a 2XX status
16+
- Steps :
17+
- Use a filter to retrieve valid IDs from CC
18+
- Send the request to MWDI using those valid IDs
19+
- Check that a corresponding log entry exists in EATL
20+
- Verify that the following fields are correctly logged
21+
- application-name
22+
- application-release
23+
- operation-name
24+
- response-code = 2XX
25+
- Invalid Mount Name : when the mountName is invalid (i.e. not found in the list of connected devices), the expected response is a 4XX or 5XX status
26+
- Steps:
27+
- Send a request to MWDI with invalid IDs
28+
- Check for the corresponding EATL log
29+
- Verify that the following fields are correctly logged
30+
- application-name
31+
- application-release
32+
- operation-name
33+
- response-code = 4XX or 5XX
34+
35+
36+
### Comments
37+
- If a validMountName is not found in the list of connected devices, skip the valid request folder in the collection
38+
- If an invalidMountName is found in the list of connected devices, skip the invalid request folder in the collection
39+
- xCorrelator:
40+
- The xCorrelator is a unique identifier for each tested request.
41+
- It is composed as follows: xCorrelatorPrefix + "_" + [valid | invalid] + "_" + operationId + "_" + <random string>
42+
- Where:
43+
- xCorrelatorPrefix: input parameter from the dataFile
44+
- valid or invalid: based on the test case
45+
- operationId: the operationId of the resource path (from the OAS specification)
46+
- <random string>: varies depending on whether tests run against a mock EATL or the actual EATL
47+
- The resulting xCorrelator is encoded to match the expected format/pattern
48+
49+
50+
### Scope
51+
- This test case collection only verifies that request information exists and is correctly logged in EATL.
52+
- Requests with missing header parameters or invalid request body with known issues (tracked in GitHub)
53+
54+
55+
## MWDI v2.0.1
56+
- TestCaseCollection is split into the following folders:
57+
- [validRequest]
58+
- [invalidRequest]
59+
- [invalidResourcePathRequest]
60+
- [invalidNoResourcePathRequest]
61+
62+
![Overview](./mwdi+diagram.eatLogging.png)
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
[
2+
{
3+
"mode": "debug",
4+
"serverList": [
5+
{
6+
"serverName": "dummy",
7+
"dummyUri": "ping.openBackhaul.com"
8+
},
9+
{
10+
"serverName": "mwdi",
11+
"server": "http://IP_ADRESS:PORT",
12+
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
13+
"authorizationCode": "YOUR_BASIC_AUTH_CODE",
14+
"operationKey": "Operation key not yet provided.",
15+
"userName": "Thorsten Heinze",
16+
"originator": "InterfaceValidator_TR532v2.0",
17+
"xCorrelator": "00000000-0000-0000-0000-000000000532",
18+
"traceIndicator": "1",
19+
"customerJourney": ""
20+
},
21+
{
22+
"serverName": "eatl",
23+
"server": "http://IP_ADRESS:PORT",
24+
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
25+
"authorizationCode": "YOUR_BASIC_AUTH_CODE",
26+
"operationKey": "Operation key not yet provided.",
27+
"userName": "Thorsten Heinze",
28+
"originator": "InterfaceValidator_TR532v2.0",
29+
"xCorrelator": "00000000-0000-0000-0000-000000000532",
30+
"traceIndicator": "1",
31+
"customerJourney": ""
32+
},
33+
{
34+
"serverName": "mwdi in mwdi+simulator.eatlLogging",
35+
"server": "http://localhost:3002",
36+
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
37+
"authorizationCode": "",
38+
"operationKey": "Operation key not yet provided.",
39+
"userName": "Redouane Chyiy",
40+
"originator": "InterfaceValidator_TR532v2.0",
41+
"xCorrelator": "00000000-0000-0000-0000-000000000532",
42+
"traceIndicator": "1",
43+
"customerJourney": ""
44+
},
45+
{
46+
"serverName": "eatl in eatl+simulator.eatlLogging",
47+
"server": "http://localhost:3001",
48+
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
49+
"authorizationCode": "",
50+
"operationKey": "Operation key not yet provided.",
51+
"userName": "Redouane Chyiy",
52+
"originator": "InterfaceValidator_TR532v2.0",
53+
"xCorrelator": "00000000-0000-0000-0000-000000000532",
54+
"traceIndicator": "1",
55+
"customerJourney": ""
56+
}
57+
],
58+
"collectionInputList": [
59+
{
60+
"collectionName": "eatl.subsequentRecords_test",
61+
"serverToBeApplied": "mwdi",
62+
"eatlServerToBeApplied": "eatl",
63+
"validMountName": "513250007",
64+
"invalidMountName":"dummyMountName",
65+
"linkId": "101550001",
66+
"linkPort":"1",
67+
"applicationName" :"MicroWaveDeviceInventory",
68+
"releaseNumber":"1.2.1",
69+
"uuid":"dummyUuid",
70+
"uuid1":"dummyUuid1",
71+
"localId":"dummyLocalId",
72+
"waitForEatl":3000,
73+
"xCorrelatorPrefix":"Eatldummy",
74+
"kindOfReference": "dynamic"
75+
},
76+
{
77+
"collectionName": "eatl.subsequentRecords",
78+
"serverToBeApplied": "mwdi in mwdi+simulator.eatlLogging",
79+
"eatlServerToBeApplied": "eatl in eatl+simulator.eatlLogging",
80+
"validMountName": "513250007",
81+
"invalidMountName":"dummyMountName",
82+
"linkId": "101550001",
83+
"linkPort":"1",
84+
"applicationName" :"MicroWaveDeviceInventory",
85+
"releaseNumber":"1.2.1",
86+
"uuid":"dummyUuid",
87+
"uuid1":"dummyUuid1",
88+
"localId":"dummyLocalId",
89+
"kindOfReference": "static",
90+
"xCorrelatorPrefix":"Eatldummy",
91+
"waitForEatl":10,
92+
"suffixUrlEncodingIsRequired": true
93+
}
94+
95+
]
96+
}
97+
]
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
@startuml mwdi+diagram.eatlLogging
2+
skinparam responseMessageBelowArrow true
3+
4+
title
5+
mwdi+testcase.eatlLogging
6+
end title
7+
8+
participant "Postman" as Postman
9+
participant "Data" as Data
10+
participant "Collection" as Collection
11+
12+
' Preparation
13+
participant "MWDI://v1/provide-list-of-connected-devices\n(mount name list)" as MWDIDeviceList
14+
15+
' Valid request
16+
participant "MWDI://control-construct=mountName?fields=<each applicable ids for the service>>\n(extract ids from CC)" as MWDIFieldsFilter
17+
participant "MWDI://<each individual service>\n(valid request)" as MWDIValid
18+
19+
' Invalid request
20+
participant "MWDI://<each applicable individual service>\n(invalid request)" as MWDIInvalid
21+
22+
' EATL follow-up
23+
participant "EATL://v1/list-records-of-flow" as EATL
24+
25+
group Preparation
26+
Data --\\o Postman : {servers,x-correlator}
27+
activate Postman
28+
Postman --\\o Collection : {servers,x-correlator}
29+
Postman -> MWDIDeviceList : {servers,x-correlator}
30+
Postman <-- MWDIDeviceList : 200
31+
note right Postman #Orange
32+
check mount Name :
33+
- If valid mount name exists, run the Valid Request folder; otherwise, skip it.
34+
- If invalid mount name exists, skip the Invalid Request folder; otherwise, run it.
35+
end note
36+
end
37+
38+
note right Postman
39+
For each service, two test cases are executed:
40+
- Send a valid request and check eatl logs
41+
- Send an invalid request and check eatl logs
42+
end note
43+
44+
' ------------------------
45+
' Valid request
46+
group MWDI://<each individual service>\n(valid request)
47+
note right Postman
48+
X-Correlator format:
49+
<prefix>_valid_<operationId>_<randomString>
50+
end note
51+
Collection --\\o Postman : {servers,x-correlator}
52+
Postman -> MWDIFieldsFilter : {servers,validMountName}
53+
note right Postman
54+
<u>GetIds</>
55+
get uuid,localId...
56+
end note
57+
Postman <-- MWDIFieldsFilter : 200
58+
Postman -> MWDIValid : //validRequest//
59+
60+
Postman <-- MWDIValid : 2XX
61+
62+
note right Postman #Grey
63+
check for 2XX response
64+
end note
65+
66+
Postman -> EATL : X-Correlator
67+
68+
Postman <-- EATL : 200
69+
70+
note right Postman #Orange
71+
check if expected record exists:
72+
- application-name, application-release and operation-name match
73+
- response-code =2XX ?
74+
end note
75+
76+
77+
end
78+
79+
' ------------------------
80+
' Invalid request test case
81+
group MWDI://<each applicable individual service>\n(invalid request)
82+
Collection --\\o Postman : {servers,x-correlator}
83+
note right Postman
84+
X-Correlator format:
85+
<prefix>_invalid_<operationId>_<randomString>
86+
end note
87+
Postman -> MWDIInvalid : //invalidRequest//
88+
89+
Postman <-- MWDIInvalid : 4XX / 5XX
90+
91+
note right Postman #Grey
92+
check for 4XX or 5XX response
93+
end note
94+
95+
Postman -> EATL : X-Correlator
96+
97+
Postman <-- EATL : 200
98+
99+
note right Postman #Orange
100+
check if expected record exists:
101+
- application-name, application-release and operation-name match
102+
- response-code = 4XX or 5XX ?
103+
end note
104+
105+
106+
end
107+
108+
deactivate Postman
109+
@enduml
135 KB
Loading

0 commit comments

Comments
 (0)