-
Notifications
You must be signed in to change notification settings - Fork 1
[GPCAPIM-397] Set up INT test provider requests #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6b0f825
a4675a8
0202c90
8d2f8a1
dea2c64
4204308
899ba50
4f47fa9
d80e86e
67ef071
b289500
69a2929
5268215
3cdecdb
ba67227
c54bb04
5b41732
a2866c5
a0a47d3
e6e1c14
78663fa
15528f8
629c53c
405a7af
71cf237
0c29fb2
3dd80ff
c82811f
247881f
d850d0e
c3d633f
2aafbee
928d629
9290a0a
04092fd
0b7e583
bda2bb6
55a234b
bab15e1
cff2eff
5fc19a2
4082b47
f9be003
5ded7c5
03aff72
80bedaf
762b10b
f9f1319
5c99f53
dd2c50b
b5445c5
519efda
057a4c4
548c49d
158f4c0
c22c719
9d39d0e
d043161
7a4fc64
f84e63e
5d2266e
3775cb5
c98e561
8c5c2fe
1212296
b02ac58
71ea523
4032bbc
f04a489
99c4328
1901406
2c563f1
7c5494d
fbfa9e1
d46ae9e
23379f8
1372326
4f8706c
96434d3
2f54b36
ae1e161
2ef3bd1
b5a274a
361c6e2
e905a71
655a1eb
1d249a4
a030982
89a5821
efb7a1b
7f7c693
e2b3eca
7b0a15a
b6ac22b
d060c2f
39d9338
fe92f5e
6003175
128bd58
17f61b9
6878efe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -43,6 +43,7 @@ Use the following commands to create the appropriate `.env.test` file for the ta | |||||||||||||||||||||||||||||||||||||
| * `make env-test-ci` to write a `.env.test` file for testing a locally deployed application, from outside the dev container. | ||||||||||||||||||||||||||||||||||||||
| * `make env-test-pr-<pr number>` to write a `.env.test` file for testing an application deployed behind a PR proxy. | ||||||||||||||||||||||||||||||||||||||
| * `make env-test-alpha-int` to write a `.env.test` file for testing an application deployed to the "alpha integration" environment. | ||||||||||||||||||||||||||||||||||||||
| * `make env-test-int` to write a `.env.test` file for testing an application that sends requests to PDS, SDS and Provider integration environments. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| _Note: Unit tests require the `.env` file, as these tests do not test a deployed application`_ | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
@@ -213,10 +214,9 @@ Consumer tests generate the pact contract files in `tests/contract/pacts/` (e.g. | |||||||||||||||||||||||||||||||||||||
| Shared fixtures in `tests/conftest.py` are available across all test types: | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| * **`base_url`**: The base URL of the deployed Lambda function (from `BASE_URL` environment variable highlighted above) | ||||||||||||||||||||||||||||||||||||||
| * **`host`**: The hostname of the deployed application (from `HOST` environment variable highlighted above) | ||||||||||||||||||||||||||||||||||||||
| * **`client`**: An HTTP client instance for sending requests to the APIs | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ### Load Testing with Locust ('load/') | ||||||||||||||||||||||||||||||||||||||
| ## Load Testing with Locust ('load/') | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Load testing is performed using Locust. You have the option of running via the CLI or UI. | ||||||||||||||||||||||||||||||||||||||
| You will need [Proxygen setup](../../README.md#proxygen) to run the load tests. | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -350,3 +350,27 @@ The GitHub Actions workflow (`.github/workflows/stage-2-test.yaml`) orchestrates | |||||||||||||||||||||||||||||||||||||
| │ 3. Enforce thresholds │ | ||||||||||||||||||||||||||||||||||||||
| └───────────────────────┘ | ||||||||||||||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Testing INT locally | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| To test a locally deployed application against the integration environments of external services, PDS, SDS and Provider systems: | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| * Set up secrets in `.secrets` as per the instructions in `.secrets/README.md` | ||||||||||||||||||||||||||||||||||||||
| * `make env-int` - writes the `.env` file to point the application at the integration environments for each external service. | ||||||||||||||||||||||||||||||||||||||
| * `make deploy` - will deploy the application, feeding the `.env` values in to its container environment. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ### Manual test | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| To manually test the application against the integration environments, run the Bruno collection using the `localInt.yml` environment. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+356
to
+364
|
||||||||||||||||||||||||||||||||||||||
| To test a locally deployed application against the integration environments of external services, PDS, SDS and Provider systems: | |
| * Set up secrets in `.secrets` as per the instructions in `.secrets/README.md` | |
| * `make env-int` - writes the `.env` file to point the application at the integration environments for each external service. | |
| * `make deploy` - will deploy the application, feeding the `.env` values in to its container environment. | |
| ### Manual test | |
| To manually test the application against the integration environments, run the Bruno collection using the `localInt.yml` environment. | |
| To test a locally deployed application with the current INT-style configuration for external services: | |
| * Set up secrets in `.secrets` as per the instructions in `.secrets/README.md` | |
| * `make env-int` - writes the `.env` file to point SDS and Provider at their integration environments; PDS remains configured as `stub`. | |
| * `make deploy` - will deploy the application, feeding those generated `.env` values in to its container environment. | |
| ### Manual test | |
| To manually test the application with this configuration, run the Bruno collection using the `localInt.yml` environment. |
Copilot
AI
Apr 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammar: "To run a subset the automated test suite" is missing "of" ("subset of the automated test suite").
| To run a subset the automated test suite, run the following commands | |
| To run a subset of the automated test suite, run the following commands |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| { | ||
| "resourceType": "Bundle", | ||
| "type": "collection", | ||
| "meta": { | ||
| "profile": [ | ||
| "https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-StructuredRecord-Bundle-1" | ||
| ] | ||
| }, | ||
| "entry": [ | ||
| { | ||
| "resource": { | ||
| "resourceType": "Patient", | ||
| "id": "9999999999", | ||
| "meta": { | ||
| "versionId": "1", | ||
| "lastUpdated": "2020-01-01T00:00:00Z" | ||
| }, | ||
| "identifier": [ | ||
| { | ||
| "system": "https://fhir.nhs.uk/Id/nhs-number", | ||
| "value": "9999999999" | ||
| } | ||
| ], | ||
| "name": [ | ||
| { | ||
| "use": "official", | ||
| "family": "Jones", | ||
| "given": [ | ||
| "Alice" | ||
| ], | ||
| "period": { | ||
| "start": "1900-01-01", | ||
| "end": "9999-12-31" | ||
| } | ||
| } | ||
| ], | ||
| "gender": "female", | ||
| "birthDate": "1980-01-01", | ||
| "generalPractitioner": [ | ||
| { | ||
| "id": "1", | ||
| "type": "Organization", | ||
| "identifier": { | ||
| "system": "https://fhir.nhs.uk/Id/ods-organization-code", | ||
| "value": "A12345", | ||
| "period": { | ||
| "start": "2020-01-01", | ||
| "end": "9999-12-31" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**_kwargs: stris too restrictive for arequests.post-like stub. The production call now passesverify(bool) andtimeout(int|None), so this annotation will fail type-checking under strict mypy. Use**_kwargs: Any(or a typed**kwargs: object) to match the real signature more accurately.