Skip to content

Commit 1647c7a

Browse files
feat(test): FTRS-1883 Tidying up tests
1 parent 549fb2a commit 1647c7a

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

tests/service_automation/tests/features/is_api_features/dos_search_apim.feature

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Feature: API DoS Service Search APIM
99

1010

1111

12-
Scenario Outline:I send a request to the dos-search Organization Endpoint by ODS Code via APIM with valid headers and query parameters
12+
Scenario Outline:I send a request to the dos-search organization endpoint by ODS Code via APIM with valid headers and query parameters
1313
When I request data from the APIM endpoint "Organization" with header "<params>" and query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046"
1414
Then I receive a status code "200" in response
1515
And the response body contains a bundle
@@ -22,7 +22,7 @@ Feature: API DoS Service Search APIM
2222

2323

2424
@manual
25-
Scenario Outline:I send a request to the dos-search Organization Endpoint by ODS Code via APIM with invalid header and valid query parameters
25+
Scenario Outline:I send a request to the dos-search organization endpoint by ODS Code via APIM with invalid header and valid query parameters
2626
When I request data from the APIM endpoint "Organization" with header "<params>" and query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046"
2727
Then I receive a status code "400" in response
2828
And the response body contains an "OperationOutcome" resource
@@ -37,15 +37,15 @@ Feature: API DoS Service Search APIM
3737

3838

3939

40-
Scenario:I send a request to the dos-search Organization Endpoint by ODS Code via APIM with valid query parameters
40+
Scenario:I send a request to the dos-search organization endpoint by ODS Code via APIM with valid query parameters
4141
When I request data from the APIM endpoint "Organization" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046"
4242
Then I receive a status code "200" in response
4343
And the response body contains a bundle
4444
And the bundle contains "1" "Organization" resources
4545
And the bundle contains "4" "Endpoint" resources
4646

4747

48-
Scenario Outline:I send a request to the dos-search Organization Endpoint via APIM with invalid ODS code
48+
Scenario Outline:I send a request to the dos-search organization endpoint via APIM with invalid ODS code
4949
When I request data from the APIM endpoint "Organization" with query params "<params>"
5050
Then I receive a status code "400" in response
5151
And the response body contains an "OperationOutcome" resource
@@ -62,7 +62,7 @@ Feature: API DoS Service Search APIM
6262
| identifier=odsOrganisationCode\|123@@@&_revinclude=Endpoint:organization | 123@@@ |
6363

6464

65-
Scenario Outline:I send a request to the dos-search Organization Endpoint with via APIM invalid _revinclude value
65+
Scenario Outline:I send a request to the dos-search organization endpoint with via APIM invalid _revinclude value
6666
When I request data from the APIM endpoint "Organization" with query params "<params>"
6767
Then I receive a status code "400" in response
6868
And the response body contains an "OperationOutcome" resource
@@ -78,7 +78,7 @@ Feature: API DoS Service Search APIM
7878
| identifier=odsOrganisationCode\|M00081046&_revinclude=ENDPOINT:ORGANIZATION |
7979

8080

81-
Scenario Outline:I send a request to the dos-search Organization Endpoint with via APIM invalid identifier system
81+
Scenario Outline:I send a request to the dos-search organization endpoint with via APIM invalid identifier system
8282
When I request data from the APIM endpoint "Organization" with query params "<params>"
8383
Then I receive a status code "400" in response
8484
And the response body contains an "OperationOutcome" resource
@@ -94,7 +94,7 @@ Feature: API DoS Service Search APIM
9494
| identifier=odsOrganisationCodeInvalid\|M00081046&_revinclude=Endpoint:organization | odsOrganisationCodeInvalid |
9595

9696

97-
Scenario Outline:I send a request to the dos-search Organization Endpoint via APIM with 1 missing parameter
97+
Scenario Outline:I send a request to the dos-search organization endpoint via APIM with 1 missing parameter
9898
When I request data from the APIM endpoint "Organization" with query params "<params>"
9999
Then I receive a status code "400" in response
100100
And the response body contains an "OperationOutcome" resource
@@ -109,7 +109,7 @@ Feature: API DoS Service Search APIM
109109
| _revinclude=Endpoint:organization | identifier |
110110

111111

112-
Scenario:I send a request to the dos-search Organization Endpoint via APIM with 2 missing parameters
112+
Scenario:I send a request to the dos-search organization endpoint via APIM with 2 missing parameters
113113
When I request data from the APIM endpoint "Organization" with query params ""
114114
Then I receive a status code "400" in response
115115
And the response body contains an "OperationOutcome" resource

tests/service_automation/tests/features/is_api_features/dos_search_apim_security.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ Feature: API DoS Service Search Is Secured
88
And I create a model in the repo from json file "Organisation/organisation-with-4-endpoints.json"
99

1010

11-
Scenario: I can access APIM for the 'ping' Endpoint and no access is required
11+
Scenario: I can access APIM for the dos-search'ping' Endpoint and no access is required
1212
When I request data from the APIM endpoint "_ping" with query params "" without authentication
1313
Then I receive a status code "200" in response
1414

1515

16-
Scenario: I can access APIM for the 'status' Endpoint and access is required
16+
Scenario: I can access APIM for the dos-search 'status' Endpoint and access is required
1717
When I request data from the APIM endpoint "_status" with query params "" with status token
1818
Then I receive a status code "200" in response
1919

2020

21-
Scenario: I search APIM for GP Endpoint by ODS Code with valid query parameters and a valid access token
21+
Scenario: I search APIM for the dos-search organization endpoint by ODS Code with valid query parameters and a valid access token
2222
When I request data from the APIM endpoint "Organization" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046"
2323
Then I receive a status code "200" in response
2424
And the response body contains a bundle
2525
And the bundle contains "1" "Organization" resources
2626
And the bundle contains "4" "Endpoint" resources
2727

2828

29-
Scenario: I cannot search APIM for GP Endpoint with invalid access token
29+
Scenario: I cannot search APIM for the dos-search organization endpoint with invalid access token
3030
When I request data from the APIM endpoint "Organization" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046" with invalid token
3131
Then I receive a status code "401" in response
3232
And the response body contains an "OperationOutcome" resource
@@ -36,7 +36,7 @@ Feature: API DoS Service Search Is Secured
3636
And the OperationOutcome contains an issue with diagnostics "Invalid or missing authentication token"
3737
And the OperationOutcome contains an issue with details for INVALID_AUTH_CODING coding
3838

39-
Scenario: I cannot search APIM for GP Endpoint without authentication
39+
Scenario: I cannot search APIM for the dos-search organization endpoint without authentication
4040
When I request data from the APIM endpoint "Organization" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046" without authentication
4141
Then I receive a status code "401" in response
4242
And the response body contains an "OperationOutcome" resource

tests/service_automation/tests/features/is_api_features/dos_search_backend_gateway_errors.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Feature: API DoS Service Search Backend Gateway Errors
88
And I create a model in the repo from json file "Organisation/organisation-with-4-endpoints.json"
99

1010

11-
Scenario:I send a request to the dos-search Organization Endpoint by ODS Code with valid query parameters but missing mtls credentials and receive a connection reset error
11+
Scenario:I send a request to the dos-search organization endpoint by ODS Code with valid query parameters but missing mtls credentials and receive a connection reset error
1212
When I attempt to request data from the "dos-search" endpoint "Organization" without authentication but with valid query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M000081046"
1313
Then I receive a connection reset error
1414

1515

1616

17-
Scenario:I send a request to the dos-search Organization Endpoint for a endpoint that does not exist and the api-gateway returns a 404 error
17+
Scenario:I send a request to the dos-search organization endpoint for a endpoint that does not exist and the api-gateway returns a 404 error
1818
When I request data from the "dos-search" endpoint "DoesNotExist" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M000081046"
1919
Then I receive a status code "404" in response
2020
And the response body contains an "OperationOutcome" resource

tests/service_automation/tests/features/is_api_features/dos_search_backend_headers.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Feature: API DoS Service Search Backend Gateway Headers
88
And I create a model in the repo from json file "Organisation/organisation-with-4-endpoints.json"
99

1010

11-
Scenario Outline:I send a request to the dos-search Organization Endpoint by ODS Code with valid query parameters and valid headers
11+
Scenario Outline:I send a request to the dos-search organization endpoint by ODS Code with valid query parameters and valid headers
1212
When I request data from the "dos-search" endpoint "Organization" with header "<params>" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046"
1313
Then I receive a status code "200" in response
1414
And the response body contains a bundle
@@ -40,15 +40,15 @@ Feature: API DoS Service Search Backend Gateway Headers
4040
|NHSD-Request-ID=req-987654321, NHSD-Api-Version=1.0 |
4141

4242

43-
Scenario:I send a request to the dos-search Organization Endpoint by ODS Code with valid query parameters and no headers
43+
Scenario:I send a request to the dos-search organization endpoint by ODS Code with valid query parameters and no headers
4444
When I request data from the "dos-search" endpoint "Organization" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046"
4545
Then I receive a status code "200" in response
4646
And the response body contains a bundle
4747
And the bundle contains "1" "Organization" resources
4848
And the bundle contains "4" "Endpoint" resources
4949

5050

51-
Scenario Outline:I send a request to the dos-search Organization Endpoint by ODS Code with valid query parameters and invalid headers
51+
Scenario Outline:I send a request to the dos-search organization endpoint by ODS Code with valid query parameters and invalid headers
5252
When I request data from the "dos-search" endpoint "Organization" with header "<params>" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046"
5353
Then I receive a status code "400" in response
5454
And the response body contains an "OperationOutcome" resource

tests/service_automation/tests/features/is_api_features/dos_search_backend_parameters.feature

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ Feature: API DoS Service Search Backend Request Parameters
77
And I have a organisation repo
88
And I create a model in the repo from json file "Organisation/organisation-with-4-endpoints.json"
99

10-
Scenario:I send a request to the dos-search Organization Endpoint by ODS Code with for an ODS code that does not exist
10+
Scenario:I send a request to the dos-search organization endpoint by ODS Code with for an ODS code that does not exist
1111
When I request data from the "dos-search" endpoint "Organization" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|X000081046"
1212
Then I receive a status code "200" in response
1313
And the response body contains a bundle
1414
And the bundle contains "0" "Organization" resources
1515
And the bundle contains "0" "Endpoint" resources
1616

1717

18-
Scenario Outline:I send a request to the dos-search Organization Endpoint with invalid ODS code
18+
Scenario Outline:I send a request to the dos-search organization endpoint with invalid ODS code
1919
When I request data from the "dos-search" endpoint "Organization" with query params "<params>"
2020
Then I receive a status code "400" in response
2121
And the response body contains an "OperationOutcome" resource
@@ -32,7 +32,7 @@ Feature: API DoS Service Search Backend Request Parameters
3232
| identifier=odsOrganisationCode\|123@@@&_revinclude=Endpoint:organization | 123@@@ |
3333

3434

35-
Scenario Outline:I send a request to the dos-search Organization Endpoint with invalid _revinclude value
35+
Scenario Outline:I send a request to the dos-search organization endpoint with invalid _revinclude value
3636
When I request data from the "dos-search" endpoint "Organization" with query params "<params>"
3737
Then I receive a status code "400" in response
3838
And the response body contains an "OperationOutcome" resource
@@ -48,7 +48,7 @@ Feature: API DoS Service Search Backend Request Parameters
4848
| identifier=odsOrganisationCode\|M00081046&_revinclude=ENDPOINT:ORGANIZATION |
4949

5050

51-
Scenario Outline:I send a request to the dos-search Organization Endpoint with invalid identifier system
51+
Scenario Outline:I send a request to the dos-search organization endpoint with invalid identifier system
5252
When I request data from the "dos-search" endpoint "Organization" with query params "<params>"
5353
Then I receive a status code "400" in response
5454
And the response body contains an "OperationOutcome" resource
@@ -64,7 +64,7 @@ Feature: API DoS Service Search Backend Request Parameters
6464
| identifier=odsOrganisationCodeInvalid\|M00081046&_revinclude=Endpoint:organization | odsOrganisationCodeInvalid |
6565

6666

67-
Scenario Outline:I send a request to the dos-search Organization Endpoint with 1 missing parameter
67+
Scenario Outline:I send a request to the dos-search organization endpoint with 1 missing parameter
6868
When I request data from the "dos-search" endpoint "Organization" with query params "<params>"
6969
Then I receive a status code "400" in response
7070
And the response body contains an "OperationOutcome" resource
@@ -80,7 +80,7 @@ Feature: API DoS Service Search Backend Request Parameters
8080

8181

8282

83-
Scenario:I send a request to the dos-search Organization Endpoint with 2 missing parameters
83+
Scenario:I send a request to the dos-search organization endpoint with 2 missing parameters
8484
When I request data from the "dos-search" endpoint "Organization" with query params ""
8585
Then I receive a status code "400" in response
8686
And the response body contains an "OperationOutcome" resource
@@ -92,7 +92,7 @@ Feature: API DoS Service Search Backend Request Parameters
9292
And the OperationOutcome contains an issue with details for INVALID_SEARCH_DATA coding
9393

9494

95-
Scenario Outline:I send a request to the dos-search Organization Endpoint by ODS Code with unexpected query parameter
95+
Scenario Outline:I send a request to the dos-search organization endpoint by ODS Code with unexpected query parameter
9696
When I request data from the "dos-search" endpoint "Organization" with query params "_revinclude=Endpoint:organization&identifier=odsOrganisationCode|M00081046&<unexpected_param>=<unexpected_value>"
9797
Then I receive a status code "400" in response
9898
And the response body contains an "OperationOutcome" resource
@@ -109,6 +109,6 @@ Feature: API DoS Service Search Backend Request Parameters
109109

110110
@test
111111
# New health check scenario for GET /_status
112-
Scenario: I request a healthcheck of the GP Endpoint and receive a 200 response
112+
Scenario: I request a healthcheck of the organization endpoint and receive a 200 response
113113
When I request data from the "dos-search" endpoint "_status" with query params ""
114114
Then I receive a status code "200" in response

0 commit comments

Comments
 (0)