Skip to content

Commit fb9a4b1

Browse files
[Testing] Update invalidOrMissingRequestBody/receiver testcases (#1342)
Fixes #1330
1 parent a91c15b commit fb9a4b1

9 files changed

+4700
-2339
lines changed
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Functional Testing of Invalid or Missing RequestBody Handling of the Receivers of Notifications
22

3+
For the receiver services the OAS contains a requestBody. The tests therefore are executed with both an invalid requestBody and with a missing requestBody. In all cases a 400 response is expected.
4+
5+
Note:
6+
- The *regard*-services for device and alarm notifications have been deprecated with MWDI v2.0.0.
7+
- The *regard*-service for controller notifications however remains in use.
8+
- The testcase collections therefore have been splitted.
9+
310
![Overview](./mwdi+diagram.invalidOrMissingRequestBody.receiver.png)
411

5-
For the receiver services the OAS contains a requestBody. The tests therefore are executed with both an invalid requestBody and with a missing requestBody. In all cases a 400 response is expected.
12+
13+
**Deprecated services**
14+
![OverviewDeprecated](./_deprecated-services/mwdi+diagram.invalidOrMissingRequestBody.receiver.deprecated.png)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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": "mwdi in mwdi+simulator.invalidOrMissingRequestBody.receiver.deprecated",
23+
"server": "http://localhost:3010",
24+
"pathToControlConstruct": "/core-model-1-4:network-control-domain=cache/control-construct={mountName}",
25+
"authorizationCode": "",
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+
"collectionInputList": [
35+
{
36+
"collectionName": "invalidOrMissingRequestBody.receiver.deprecated",
37+
"serverToBeApplied": "mwdi",
38+
"mountName": "513250004",
39+
"linkId": "101550001",
40+
"kindOfReference": "dynamic"
41+
},
42+
{
43+
"collectionName": "invalidOrMissingRequestBody.receiver.deprecated_simulator",
44+
"serverToBeApplied": "mwdi in mwdi+simulator.invalidOrMissingRequestBody.receiver.deprecated",
45+
"mountName": "305250001",
46+
"linkId": "101550001",
47+
"kindOfReference": "static",
48+
"suffixUrlEncodingIsRequired": true
49+
}
50+
]
51+
}
52+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
@startuml mwdi+diagram.invalidOrMissingRequestBody.receiver.deprecated
2+
skinparam responseMessageBelowArrow true
3+
4+
title
5+
mwdi+testcase.invalidOrMissingRequestBody.receiver.deprecated
6+
end title
7+
8+
participant "Postman" as Postman
9+
participant "Data" as Data
10+
participant "Collection" as Collection
11+
12+
participant "/v1/regard-controller-attribute-value-change" as RCAVC
13+
participant "/v1/regard-device-alarm" as RDA
14+
participant "/v1/regard-device-attribute-value-change" as RDAVC
15+
participant "/v1/regard-device-object-deletion" as RDOD
16+
participant "/v1/regard-device-object-creation" as RDOC
17+
18+
group Preparation
19+
Data --\\o Postman : {servers}
20+
activate Postman
21+
Postman --\\o Collection : {servers}
22+
end
23+
24+
note over Postman, RCAVC
25+
For each service there are two testcases to be executed.
26+
Both tests differ in the provided requestBody:
27+
- an invalid requestBody according to OAS
28+
- no requestBody provided at all
29+
end note
30+
31+
group /v1/regard-device-alarm
32+
Collection --\\o Postman : {servers}
33+
Postman -> RDA : (a) {invalidRequestBody} \n(b) no requestBody
34+
Postman <-- RDA : 400
35+
note right Postman #Orange
36+
check for 400
37+
end note
38+
end
39+
40+
group /v1/regard-device-attribute-value-change
41+
Collection --\\o Postman : {servers}
42+
Postman -> RDAVC : (a) {invalidRequestBody} \n(b) no requestBody
43+
Postman <-- RDAVC : 400
44+
note right Postman #Orange
45+
check for 400
46+
end note
47+
end
48+
49+
group /v1/regard-device-object-deletion
50+
Collection --\\o Postman : {servers}
51+
Postman -> RDOD : (a) {invalidRequestBody} \n(b) no requestBody
52+
Postman <-- RDOD : 400
53+
note right Postman #Orange
54+
check for 400
55+
end note
56+
end
57+
58+
group /v1/regard-device-object-creation
59+
Collection --\\o Postman : {servers}
60+
Postman -> RDOC : (a) {invalidRequestBody} \n(b) no requestBody
61+
Postman <-- RDOC : 400
62+
note right Postman #Orange
63+
check for 400
64+
end note
65+
end
66+
67+
deactivate Postman
68+
69+
@enduml
Loading

0 commit comments

Comments
 (0)