Skip to content

Commit e768234

Browse files
NPA-4423: Corrected issues with postman tests
1 parent 6a8d813 commit e768234

File tree

3 files changed

+42
-35
lines changed

3 files changed

+42
-35
lines changed

.github/workflows/run-postman-collection.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
- name: Install Newman
1515
run: npm install -g newman
1616
- name: Run Postman Collection
17-
run: newman run ./postman/Validate_Relationship_Service_Sandbox.postman_collection.json
17+
run: newman run ./postman/Validate\ Relationship\ Service\ Sandbox.postman_collection.json

postman/Validate Relationship Service Sandbox.postman_collection.json

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"info": {
3-
"_postman_id": "d04a9e84-1e0e-4bc0-a172-9f860e79cc30",
4-
"name": "Validate Relationship Service Sandbox 06/03/25",
3+
"_postman_id": "9dfa49f0-cd05-4c28-ab69-c098e2121954",
4+
"name": "Validate Relationship Service Sandbox 07/03/25",
55
"description": "Example usage of the Validate Relationship Service (VRS) sandbox.\n\nFull specification is available at [https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service](https://digital.nhs.uk/developer/api-catalogue/validated-relationship-service)",
66
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
7-
"_exporter_id": "34042403",
8-
"_collection_link": "https://www.postman.com/jackplowman2/validated-relationship-service-06-03-2025/collection/fwk4h2j/validate-relationship-service-sandbox-06-03-25?action=share&source=collection_link&creator=34042403"
7+
"_exporter_id": "21394218",
8+
"_collection_link": "https://www.postman.com/kamran-bjss/workspace/nhs-validate-relationship-service/collection/21394218-9dfa49f0-cd05-4c28-ab69-c098e2121954?action=share&source=collection_link&creator=21394218"
99
},
1010
"item": [
1111
{
@@ -306,7 +306,7 @@
306306
" {",
307307
" \"code\": \"MTH\",",
308308
" \"display\": \"mother\",",
309-
" \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"",
309+
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"",
310310
" }",
311311
" ]",
312312
" }",
@@ -340,7 +340,7 @@
340340
" {",
341341
" \"code\": \"MTH\",",
342342
" \"display\": \"mother\",",
343-
" \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"",
343+
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"",
344344
" }",
345345
" ]",
346346
" }",
@@ -373,7 +373,8 @@
373373
" pm.expect(responseJson).to.eql(expectedResponseBody);",
374374
"});"
375375
],
376-
"type": "text/javascript"
376+
"type": "text/javascript",
377+
"packages": {}
377378
}
378379
}
379380
],
@@ -475,7 +476,7 @@
475476
" {",
476477
" \"code\": \"MTH\",",
477478
" \"display\": \"mother\",",
478-
" \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"",
479+
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"",
479480
" }",
480481
" ]",
481482
" }",
@@ -542,7 +543,7 @@
542543
" {",
543544
" \"code\": \"MTH\",",
544545
" \"display\": \"mother\",",
545-
" \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"",
546+
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"",
546547
" }",
547548
" ]",
548549
" }",
@@ -575,7 +576,8 @@
575576
" pm.expect(responseJson).to.eql(expectedResponseBody);",
576577
"});"
577578
],
578-
"type": "text/javascript"
579+
"type": "text/javascript",
580+
"packages": {}
579581
}
580582
}
581583
],
@@ -714,7 +716,7 @@
714716
" {",
715717
" \"code\": \"MTH\",",
716718
" \"display\": \"mother\",",
717-
" \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"",
719+
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"",
718720
" }",
719721
" ]",
720722
" }",
@@ -747,7 +749,8 @@
747749
" pm.expect(responseJson).to.eql(expectedResponseBody);",
748750
"});"
749751
],
750-
"type": "text/javascript"
752+
"type": "text/javascript",
753+
"packages": {}
751754
}
752755
}
753756
],
@@ -853,7 +856,7 @@
853856
" {",
854857
" \"code\": \"MTH\",",
855858
" \"display\": \"mother\",",
856-
" \"system\": \"http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype\"",
859+
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\"",
857860
" }",
858861
" ]",
859862
" }",
@@ -886,7 +889,8 @@
886889
" pm.expect(responseJson).to.eql(expectedResponseBody);",
887890
"});"
888891
],
889-
"type": "text/javascript"
892+
"type": "text/javascript",
893+
"packages": {}
890894
}
891895
}
892896
],
@@ -1027,6 +1031,7 @@
10271031
" ]",
10281032
" },",
10291033
" \"diagnostics\": \"Not a valid NHS Number provided for the 'identifier' parameter\",",
1034+
" \"expression\": \"RelatedPerson.identifier\",",
10301035
" \"severity\": \"error\"",
10311036
" }",
10321037
" ],",
@@ -1047,7 +1052,8 @@
10471052
" pm.expect(responseJson).to.eql(expectedResponseBody);",
10481053
"});"
10491054
],
1050-
"type": "text/javascript"
1055+
"type": "text/javascript",
1056+
"packages": {}
10511057
}
10521058
}
10531059
],
@@ -2765,7 +2771,7 @@
27652771
" {",
27662772
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",",
27672773
" \"code\": \"PRN\",",
2768-
" \"display\": \"Parent\"",
2774+
" \"display\": \"parent\"",
27692775
" },",
27702776
" {",
27712777
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",",
@@ -3036,7 +3042,8 @@
30363042
" pm.expect(responseJson).to.eql(expectedResponseBody);",
30373043
"});"
30383044
],
3039-
"type": "text/javascript"
3045+
"type": "text/javascript",
3046+
"packages": {}
30403047
}
30413048
}
30423049
],
@@ -3106,7 +3113,7 @@
31063113
" {",
31073114
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",",
31083115
" \"code\": \"PRN\",",
3109-
" \"display\": \"Parent\"",
3116+
" \"display\": \"parent\"",
31103117
" },",
31113118
" {",
31123119
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",",
@@ -3522,7 +3529,8 @@
35223529
" pm.expect(responseJson).to.eql(expectedResponseBody);",
35233530
"});"
35243531
],
3525-
"type": "text/javascript"
3532+
"type": "text/javascript",
3533+
"packages": {}
35263534
}
35273535
}
35283536
],
@@ -4056,7 +4064,7 @@
40564064
" {",
40574065
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",",
40584066
" \"code\": \"PRN\",",
4059-
" \"display\": \"Parent\"",
4067+
" \"display\": \"parent\"",
40604068
" },",
40614069
" {",
40624070
" \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",",
@@ -4182,7 +4190,8 @@
41824190
" pm.expect(responseJson).to.eql(expectedResponseBody);",
41834191
"});"
41844192
],
4185-
"type": "text/javascript"
4193+
"type": "text/javascript",
4194+
"packages": {}
41864195
}
41874196
}
41884197
],
@@ -4234,7 +4243,7 @@
42344243
" {",
42354244
" \"system\": \"https://fhir.nhs.uk/R4/CodeSystem/ValidatedRelationships-ErrorOrWarningCode\",",
42364245
" \"version\": \"1\",",
4237-
" \"code\": \"INVALID_VALUE\",",
4246+
" \"code\": \"INVALID_PARAMETER\",",
42384247
" \"display\": \"Required parameter(s) are invalid.\"",
42394248
" }",
42404249
" ]",
@@ -4245,19 +4254,16 @@
42454254
"",
42464255
"const responseJson = pm.response.json();",
42474256
"",
4248-
"pm.test(\"Status code is 400\", function () {",
4249-
" pm.response.to.have.status(400);",
4250-
"});",
4251-
"",
4252-
"pm.test(\"Should have correct error response\", () => {",
4253-
" pm.expect(responseJson.issue[0].details.coding[0].code).to.eql(\"INVALID_VALUE\");",
4257+
"pm.test(\"Status code is 422\", function () {",
4258+
" pm.response.to.have.status(422);",
42544259
"});",
42554260
"",
42564261
"pm.test(\"Should have correct response body\", () => {",
42574262
" pm.expect(responseJson).to.eql(expectedResponseBody);",
42584263
"});"
42594264
],
4260-
"type": "text/javascript"
4265+
"type": "text/javascript",
4266+
"packages": {}
42614267
}
42624268
}
42634269
],
@@ -4316,8 +4322,8 @@
43164322
"",
43174323
"const responseJson = pm.response.json();",
43184324
"",
4319-
"pm.test(\"Status code is 400\", function () {",
4320-
" pm.response.to.have.status(400);",
4325+
"pm.test(\"Status code is 422\", function () {",
4326+
" pm.response.to.have.status(422);",
43214327
"});",
43224328
"",
43234329
"pm.test(\"Should have correct error response\", () => {",
@@ -4328,7 +4334,8 @@
43284334
" pm.expect(responseJson).to.eql(expectedResponseBody);",
43294335
"});"
43304336
],
4331-
"type": "text/javascript"
4337+
"type": "text/javascript",
4338+
"packages": {}
43324339
}
43334340
}
43344341
],
@@ -5181,4 +5188,4 @@
51815188
"type": "string"
51825189
}
51835190
]
5184-
}
5191+
}

specification/validated-relationships-service-api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ info:
124124
* is open access, so does not allow you to test authorisation
125125
126126
127-
[<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://god.gw.postman.com/run-collection/34042403-d04a9e84-1e0e-4bc0-a172-9f860e79cc30?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D34042403-d04a9e84-1e0e-4bc0-a172-9f860e79cc30%26entityType%3Dcollection%26workspaceId%3Daf3ed9d7-876b-4756-a1c6-5d9ace4264d6)
127+
[<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://app.getpostman.com/run-collection/21394218-9dfa49f0-cd05-4c28-ab69-c098e2121954?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D21394218-9dfa49f0-cd05-4c28-ab69-c098e2121954%26entityType%3Dcollection%26workspaceId%3Df5aab0ea-7c0d-44a0-879b-7af70161bfee)
128128
129129
### Integration testing
130130

0 commit comments

Comments
 (0)