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
6 changes: 2 additions & 4 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ jobs:
env:
S3_ENV: ${{ github.event_name == 'workflow_dispatch' && (inputs.environment || 'internal-qa') }}


steps:

- name: Connect to AWS
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down Expand Up @@ -95,6 +93,8 @@ jobs:
TPP_client_Secret: ${{ secrets.TPP_client_Secret }}
SONAR_client_Id: ${{ secrets.SONAR_client_Id }}
SONAR_client_Secret: ${{ secrets.SONAR_client_Secret }}
MEDICUS_client_Id: ${{ secrets.MEDICUS_client_Id }}
MEDICUS_client_Secret: ${{ secrets.MEDICUS_client_Secret }}
aws_token_refresh: 'False'
PYTHONPATH: ${{ github.workspace }}
run: |
Expand All @@ -120,8 +120,6 @@ jobs:
echo "Pytest-BDD tests passed"
fi



- name: Publish test results to GitHub UI
if: always()
uses: dorny/test-reporter@v1
Expand Down
23 changes: 15 additions & 8 deletions features/APITests/create.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,52 @@ Scenario Outline: Verify that the POST Create API for different vaccine types
|Random | FLU | MAVIS |
|Random | MMR | Postman_Auth |
|Random | MENACWY | TPP |
|Random | 3in1 | TPP |
|Random | 3IN1 | TPP |
|Random | MMRV | EMIS |
|Random | PERTUSSIS | EMIS |
|Random | SHINGLES | EMIS |
|Random | PNEUMOCOCCAL| EMIS |

@Delete_cleanUp @vaccine_type_RSV @patient_id_Random @supplier_name_RAVS
|Random | 4IN1 | TPP |
|Random | 6IN1 | EMIS |
|Random | HIB | TPP |
|Random | MENB | TPP |
|Random | ROTAVIRUS | MEDICUS |
|Random | HEPB | EMIS |
|Random | BCG | MEDICUS |

@Delete_cleanUp @vaccine_type_6IN1 @patient_id_Random @supplier_name_EMIS
Scenario: Verify that VACCINATION_PROCEDURE_TERM, VACCINE_PRODUCT_TERM, SITE_OF_VACCINATION_TERM, ROUTE_OF_VACCINATION_TERM fields are mapped to respective text fields in imms delta table
Given Valid json payload is created where vaccination terms has text field populated
When Trigger the post create request
Then The request will be successful with the status code '201'
And The location key and Etag in header will contain the Immunization Id and version
And The terms are mapped to the respective text fields in imms delta table

@Delete_cleanUp @vaccine_type_RSV @patient_id_Random @supplier_name_RAVS
@Delete_cleanUp @vaccine_type_BCG @patient_id_Random @supplier_name_EMIS
Scenario: Verify that VACCINATION_PROCEDURE_TERM, VACCINE_PRODUCT_TERM fields are mapped to first instance of coding.display fields in imms delta table
Given Valid json payload is created where vaccination terms has multiple instances of coding
When Trigger the post create request
Then The request will be successful with the status code '201'
And The location key and Etag in header will contain the Immunization Id and version
And The terms are mapped to first instance of coding.display fields in imms delta table

@Delete_cleanUp @vaccine_type_RSV @patient_id_Random @supplier_name_RAVS
@Delete_cleanUp @vaccine_type_HEPB @patient_id_Random @supplier_name_MEDICUS
Scenario: Verify that VACCINATION_PROCEDURE_TERM, VACCINE_PRODUCT_TERM, SITE_OF_VACCINATION_TERM, ROUTE_OF_VACCINATION_TERM fields are mapped to correct instance of coding.display fields in imms delta table
Given Valid json payload is created where vaccination terms has multiple instance of coding with different coding system
When Trigger the post create request
Then The request will be successful with the status code '201'
And The location key and Etag in header will contain the Immunization Id and version
And The terms are mapped to correct instance of coding.display fields in imms delta table

@Delete_cleanUp @vaccine_type_RSV @patient_id_Random @supplier_name_RAVS
@Delete_cleanUp @vaccine_type_PERTUSSIS @patient_id_Random @supplier_name_EMIS
Scenario: Verify that VACCINATION_PROCEDURE_TERM, VACCINE_PRODUCT_TERM, SITE_OF_VACCINATION_TERM, ROUTE_OF_VACCINATION_TERM fields are mapped to coding.display in imms delta table in case of only one instance of coding
Given Valid json payload is created where vaccination terms has one instance of coding with no text or value string field
When Trigger the post create request
Then The request will be successful with the status code '201'
And The location key and Etag in header will contain the Immunization Id and version
And The terms are mapped to correct coding.display fields in imms delta table

@Delete_cleanUp @vaccine_type_RSV @patient_id_Random @supplier_name_RAVS
@Delete_cleanUp @vaccine_type_HIB @patient_id_Random @supplier_name_TPP
Scenario: Verify that VACCINATION_PROCEDURE_TERM, VACCINE_PRODUCT_TERM, SITE_OF_VACCINATION_TERM, ROUTE_OF_VACCINATION_TERM fields are blank in imms delta table if no text or value string or display field is present
Given Valid json payload is created where vaccination terms has no text or value string or display field
When Trigger the post create request
Expand All @@ -73,7 +80,7 @@ Scenario Outline: Verify that the POST Create API for different supplier fails
And The Response JSONs should contain correct error message for 'unauthorized_access' access
Examples:
| Patient | vaccine_type| Supplier |
|Random | COVID | MAVIS |
|Random | COVID | MAVIS |
|Random | RSV | MAVIS |
|Random | RSV | SONAR |

Expand Down
6 changes: 3 additions & 3 deletions features/APITests/read.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Read_Feature @functional
Feature: Read the immunization of a patient

@Delete_cleanUp @supplier_name_Postman_Auth
@Delete_cleanUp @supplier_name_MEDICUS
Scenario Outline: Verify that the Read method of API will be successful and fetch valid imms event detail
Given Valid vaccination record is created with Patient '<Patient>' and vaccine_type '<Vaccine_type>'
When Send a read request for Immunization event created
Expand All @@ -12,9 +12,9 @@ Scenario Outline: Verify that the Read method of API will be successful and fetc

Examples:
|Patient | Vaccine_type|
|Random | RSV |
|Random | 4IN1 |
|Random | FLU |
|Random | COVID |
|Random | COVID |


@Delete_cleanUp @vaccine_type_FLU @patient_id_Random @supplier_name_Postman_Auth
Expand Down
16 changes: 8 additions & 8 deletions features/APITests/search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Feature: Search the immunization of a patient

@smoke
@Delete_cleanUp @supplier_name_Postman_Auth
@Delete_cleanUp @supplier_name_TPP
Scenario Outline: Verify that the GET method of Search API will be successful with all the valid parameters
Given Valid vaccination record is created with Patient '<Patient>' and vaccine_type '<Vaccine_type>'
When Send a search request with GET method for Immunization event created
Expand All @@ -26,7 +26,7 @@ Scenario Outline: Verify that the GET method of Search API will be successful wi
|Random | PNEUMOCOCCAL |

@smoke
@Delete_cleanUp @supplier_name_Postman_Auth
@Delete_cleanUp @supplier_name_EMIS
Scenario Outline: Verify that the POST method of Search API will be successful with all the valid parameters
Given Valid vaccination record is created with Patient '<Patient>' and vaccine_type '<Vaccine_type>'
When Send a search request with POST method for Immunization event created
Expand All @@ -37,14 +37,14 @@ Scenario Outline: Verify that the POST method of Search API will be successful w
Examples:
|Patient | Vaccine_type|
|Random | RSV |
|SFlag | RSV |
|SupersedeNhsNo| RSV |
|SFlag | SHINGLES |
|SupersedeNhsNo| PERTUSSIS |
|Random | FLU |
|SFlag | FLU |
|SupersedeNhsNo| FLU |
|SFlag | 3IN1 |
|SupersedeNhsNo| 4IN1 |
|Random | COVID |
|SFlag | COVID |
|SupersedeNhsNo| COVID |
|SFlag | BCG |
|SupersedeNhsNo| HEPB |

@supplier_name_Postman_Auth
Scenario Outline: Verify that the immunisation events retrieved in the response of Search API should be within Date From and Date To range
Expand Down
2 changes: 1 addition & 1 deletion features/APITests/steps/test_delete_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def send_delete_for_immunization_event_by_supplier(context, Supplier):
send_delete_for_immunization_event_created(context)

@then('The delta table will be populated with the correct data for deleted event')
def validate_imms_delta_table_by_ImmsID(context):
def validate_imms_delta_table_by_deleted_ImmsID(context):
create_obj = context.create_object
items = fetch_immunization_int_delta_detail_by_immsID(context.aws_profile_name, context.ImmsID, context.S3_env, 2)
assert items, f"Items not found in response for ImmsID: {context.ImmsID}"
Expand Down
4 changes: 2 additions & 2 deletions features/APITests/update.feature
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ Scenario Outline: Verify that the Update API will be fails if patient's date of
| nonexistent | invalid_DateOfBirth |
| empty | invalid_DateOfBirth |

@vaccine_type_3in1 @patient_id_Random @supplier_name_Postman_Auth
@vaccine_type_3IN1 @patient_id_Random @supplier_name_Postman_Auth
Scenario: Verify that the update request will fail for invalid immunization id
When Send an update request for invalid immunization id
Then The request will be unsuccessful with the status code '404'
And The Response JSONs should contain correct error message for 'not_found'

@vaccine_type_3in1 @patient_id_Random @supplier_name_Postman_Auth
@vaccine_type_3IN1 @patient_id_Random @supplier_name_Postman_Auth
Scenario Outline: Verify that the update request will fail for invalid Etag value
When Send an update request for invalid Etag <Etag>
Then The request will be unsuccessful with the status code '400'
Expand Down
Loading
Loading