Find out what NHS Digital is doing to support the response on our Coronavirus update page.
If you are a patient needing advice visit the coronavirus page on NHS.UK
Overview
We provide environments to test your software with our APIs. There are different environments depending on which APIs you are using.
For some of our APIs, you must give evidence of your testing before you go live as part of our onboarding process.
This page includes some general information, but to find out about testing a particular API, read its documentation in our API catalogue.
Sandbox testing
Some of our APIs have a sandbox environment you can use for early testing.
Sandbox APIs don't usually require authorisation and are usually stateless - they return hard-coded responses.
To find out about sandbox testing for a particular API, read its documentation in our API catalogue.
Integration testing
Some of our APIs have an integration test environment you can use for more realistic testing.
To find out about integration testing for a particular API, read its documentation in our API catalogue.
Integration testing with our RESTful APIs
For some of our RESTful APIs, you can access our integration test environments as follows:
1. Create an application and activate APIs
- If you don't already have one, create a developer account.
- Navigate to my developer account and sign in.
- Select 'My applications'.
- Select '+ NEW APP'.
- Enter details for your application.
- In the 'APIs' section, find the testing APIs you want to test with and activate them by clicking the slider.
- Select 'CREATE' to create the application.
- Make a note of the API key and secret.
2. Configure your software for testing
To get your software working with our integration test environment, configure the following:
- OAuth client ID and client secret: use the API key and secret from the previous step
- base URL for our test environment:
https://int.api.service.nhs.uk
3. Set up smartcard access, if required
If your software is using smartcards for user authentication, do the following:
- get access to the Health and Social Care Network
- get physical smartcards for testing
- download client software, including the Identity Agent (IA) and the NHS Identity Hub
For more details, contact us.
4. Set up test data, if required
Some of our APIs include standard test data packs that you can use without needing to set up any test data yourself.
In some cases you might need to set up your own test data, for example:
- to test specific cases that the standard test pack doesn't cover
- to test data updates, for example patient data in PDS
To set up your own test data, you can either:
- use our test data tool - but you need an HSCN connection - or
- contact us to set up test data for you
To request access to the test data tool, contact testdata@nhs.net.
For more details, contact us.
Start testing
Whilst testing, you will need to sign in as an end user.
If your test environment is set up for smartcard access, use the smartcard you set up in step 3 above.
If your test environment is set up for username / password testing, use the following details:
- Username: 910000000001
- Password: Password1
Integration testing with our HL7 V3 APIs
Our HL7 V3 APIs have a number of Path to Live environments for integration testing, including:
- Development - early sandbox testing
- Integration - end-to-end and regression tests
- Deployment - test in situ and user acceptance tests
- Proof of concept
- Non-functional tests
For more details see Path to Live environments.