Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions testing/__Redouane wip__/TAC_interaction/v2.0.1/README

This file was deleted.

62 changes: 62 additions & 0 deletions testing/__Redouane wip__/TAC_interaction/v2.0.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Functional Testing of eatl logging

## General
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
EATL logs all service requests and provides functionality to retrieve information such as:
- A list of all service records
- A list of service records belonging to the same flow
- A list of unsuccessful service requests

### Targets
All individual services


### Criteria
- Valid Mount Name : when the mountName is valid (i.e. found in the list of connected devices), the expected response is a 2XX status
- Steps :
- Use a filter to retrieve valid IDs from CC
- Send the request to MWDI using those valid IDs
- Check that a corresponding log entry exists in EATL
- Verify that the following fields are correctly logged
- application-name
- application-release
- operation-name
- response-code = 2XX
- 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
- Steps:
- Send a request to MWDI with invalid IDs
- Check for the corresponding EATL log
- Verify that the following fields are correctly logged
- application-name
- application-release
- operation-name
- response-code = 4XX or 5XX


### Comments
- If a validMountName is not found in the list of connected devices, skip the valid request folder in the collection
- If an invalidMountName is found in the list of connected devices, skip the invalid request folder in the collection
- xCorrelator:
- The xCorrelator is a unique identifier for each tested request.
- It is composed as follows: xCorrelatorPrefix + "_" + [valid | invalid] + "_" + operationId + "_" + <random string>
- Where:
- xCorrelatorPrefix: input parameter from the dataFile
- valid or invalid: based on the test case
- operationId: the operationId of the resource path (from the OAS specification)
- <random string>: varies depending on whether tests run against a mock EATL or the actual EATL
- The resulting xCorrelator is encoded to match the expected format/pattern


### Scope
- This test case collection only verifies that request information exists and is correctly logged in EATL.
- Requests with missing header parameters or invalid request body with known issues (tracked in GitHub)


## MWDI v2.0.1
- TestCaseCollection is split into the following folders:
- [validRequest]
- [invalidRequest]
- [invalidResourcePathRequest]
- [invalidNoResourcePathRequest]

![Overview](./mwdi+diagram.eatLogging.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
[
{
"mode": "debug",
"serverList": [
{
"serverName": "dummy",
"dummyUri": "ping.openBackhaul.com"
},
{
"serverName": "mwdi",
"server": "http://IP_ADRESS:PORT",
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
"authorizationCode": "YOUR_BASIC_AUTH_CODE",
"operationKey": "Operation key not yet provided.",
"userName": "Thorsten Heinze",
"originator": "InterfaceValidator_TR532v2.0",
"xCorrelator": "00000000-0000-0000-0000-000000000532",
"traceIndicator": "1",
"customerJourney": ""
},
{
"serverName": "eatl",
"server": "http://IP_ADRESS:PORT",
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
"authorizationCode": "YOUR_BASIC_AUTH_CODE",
"operationKey": "Operation key not yet provided.",
"userName": "Thorsten Heinze",
"originator": "InterfaceValidator_TR532v2.0",
"xCorrelator": "00000000-0000-0000-0000-000000000532",
"traceIndicator": "1",
"customerJourney": ""
},
{
"serverName": "mwdi in mwdi+simulator.eatlLogging",
"server": "http://localhost:3002",
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
"authorizationCode": "",
"operationKey": "Operation key not yet provided.",
"userName": "Redouane Chyiy",
"originator": "InterfaceValidator_TR532v2.0",
"xCorrelator": "00000000-0000-0000-0000-000000000532",
"traceIndicator": "1",
"customerJourney": ""
},
{
"serverName": "eatl in eatl+simulator.eatlLogging",
"server": "http://localhost:3001",
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
"authorizationCode": "",
"operationKey": "Operation key not yet provided.",
"userName": "Redouane Chyiy",
"originator": "InterfaceValidator_TR532v2.0",
"xCorrelator": "00000000-0000-0000-0000-000000000532",
"traceIndicator": "1",
"customerJourney": ""
}
],
"collectionInputList": [
{
"collectionName": "eatl.subsequentRecords_test",
"serverToBeApplied": "mwdi",
"eatlServerToBeApplied": "eatl",
"validMountName": "513250007",
"invalidMountName":"dummyMountName",
"linkId": "101550001",
"linkPort":"1",
"applicationName" :"MicroWaveDeviceInventory",
"releaseNumber":"1.2.1",
"uuid":"dummyUuid",
"uuid1":"dummyUuid1",
"localId":"dummyLocalId",
"waitForEatl":3000,
"xCorrelatorPrefix":"Eatldummy",
"kindOfReference": "dynamic"
},
{
"collectionName": "eatl.subsequentRecords",
"serverToBeApplied": "mwdi in mwdi+simulator.eatlLogging",
"eatlServerToBeApplied": "eatl in eatl+simulator.eatlLogging",
"validMountName": "513250007",
"invalidMountName":"dummyMountName",
"linkId": "101550001",
"linkPort":"1",
"applicationName" :"MicroWaveDeviceInventory",
"releaseNumber":"1.2.1",
"uuid":"dummyUuid",
"uuid1":"dummyUuid1",
"localId":"dummyLocalId",
"kindOfReference": "static",
"xCorrelatorPrefix":"Eatldummy",
"waitForEatl":10,
"suffixUrlEncodingIsRequired": true
}

]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
@startuml mwdi+diagram.eatlLogging
skinparam responseMessageBelowArrow true

title
mwdi+testcase.eatlLogging
end title

participant "Postman" as Postman
participant "Data" as Data
participant "Collection" as Collection

' Preparation
participant "MWDI://v1/provide-list-of-connected-devices\n(mount name list)" as MWDIDeviceList

' Valid request
participant "MWDI://control-construct=mountName?fields=<each applicable ids for the service>>\n(extract ids from CC)" as MWDIFieldsFilter
participant "MWDI://<each individual service>\n(valid request)" as MWDIValid

' Invalid request
participant "MWDI://<each applicable individual service>\n(invalid request)" as MWDIInvalid

' EATL follow-up
participant "EATL://v1/list-records-of-flow" as EATL

group Preparation
Data --\\o Postman : {servers,x-correlator}
activate Postman
Postman --\\o Collection : {servers,x-correlator}
Postman -> MWDIDeviceList : {servers,x-correlator}
Postman <-- MWDIDeviceList : 200
note right Postman #Orange
check mount Name :
- If valid mount name exists, run the Valid Request folder; otherwise, skip it.
- If invalid mount name exists, skip the Invalid Request folder; otherwise, run it.
end note
end

note right Postman
For each service, two test cases are executed:
- Send a valid request and check eatl logs
- Send an invalid request and check eatl logs
end note

' ------------------------
' Valid request
group MWDI://<each individual service>\n(valid request)
note right Postman
X-Correlator format:
<prefix>_valid_<operationId>_<randomString>
end note
Collection --\\o Postman : {servers,x-correlator}
Postman -> MWDIFieldsFilter : {servers,validMountName}
note right Postman
<u>GetIds</>
get uuid,localId...
end note
Postman <-- MWDIFieldsFilter : 200
Postman -> MWDIValid : //validRequest//

Postman <-- MWDIValid : 2XX

note right Postman #Grey
check for 2XX response
end note

Postman -> EATL : X-Correlator

Postman <-- EATL : 200

note right Postman #Orange
check if expected record exists:
- application-name, application-release and operation-name match
- response-code =2XX ?
end note


end

' ------------------------
' Invalid request test case
group MWDI://<each applicable individual service>\n(invalid request)
Collection --\\o Postman : {servers,x-correlator}
note right Postman
X-Correlator format:
<prefix>_invalid_<operationId>_<randomString>
end note
Postman -> MWDIInvalid : //invalidRequest//

Postman <-- MWDIInvalid : 4XX / 5XX

note right Postman #Grey
check for 4XX or 5XX response
end note

Postman -> EATL : X-Correlator

Postman <-- EATL : 200

note right Postman #Orange
check if expected record exists:
- application-name, application-release and operation-name match
- response-code = 4XX or 5XX ?
end note


end

deactivate Postman
@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading