2017-02-03 10:35:35 +00:00
{% from "components/table.html" import mapping_table, row, text_field, edit_field, field %}
2017-01-27 17:32:20 +00:00
{% extends "withoutnav_template.html" %}
2017-02-13 10:45:15 +00:00
{% block per_page_title %}
Integration testing
2017-01-27 17:32:20 +00:00
{% endblock %}
{% block maincolumn_content %}
< div class = "grid-row" >
< div class = "column-two-thirds" >
< h1 class = "heading-large" > Integration testing< / h1 >
< p >
2017-02-03 10:35:35 +00:00
There are different types of API keys that let you do functional or performance integration testing.
You don’ t need different GOV.UK Notify accounts or access to other GOV.UK Notify environments.
2017-01-27 17:32:20 +00:00
< / p >
2017-02-01 10:27:02 +00:00
< h2 class = "heading-medium" > Types of API Keys< / h2 >
2017-02-03 10:35:35 +00:00
< div class = "bottom-gutter-3-2" >
{% call mapping_table(
caption='Test numbers/address that generate error responses',
field_headings=['Label', 'Value'],
field_headings_visible=False,
caption_visible=False
) %}
{% call row() %}
{{ text_field('Live') }}
{{ text_field('sends to anyone') }}
{% endcall %}
2017-01-27 17:32:20 +00:00
2017-02-03 10:35:35 +00:00
{% call row() %}
{{ text_field('Team and whitelist') }}
{{ text_field('limits who you can send to') }}
{% endcall %}
{% call row() %}
{{ text_field('Test') }}
{{ text_field('pretends to send messages') }}
{% endcall %}
{%endcall%}
< / div >
2017-01-27 17:32:20 +00:00
< h2 class = "heading-medium" > Live key< / h2 >
< p >
2017-02-02 16:14:56 +00:00
Once your service is live you are able to create Live keys. You can then use these keys to send messages to anyone.
2017-01-27 17:32:20 +00:00
< / p >
< p >
Messages sent with a live key show up on your dashboard and count against your text message and email allowances.
< / p >
< p >
2017-02-03 10:35:35 +00:00
You should revoke and re-create these keys on a regular basis. You can have more than one active key at a time. To revoke a key click the revoke button on the API Key page.
2017-01-27 17:32:20 +00:00
< / p >
2017-02-03 10:35:35 +00:00
< h2 class = "heading-medium" > Team and whitelist key< / h2 >
2017-01-27 17:32:20 +00:00
< p >
2017-02-03 10:35:35 +00:00
Use a team and whitelist key for end-to-end functional testing.
2017-01-27 17:32:20 +00:00
< / p >
< p >
2017-02-03 10:35:35 +00:00
A team and whitelist key lets you send real messages to members of your team and addresses/numbers that you have added to your whitelist. You will get an error if you use these keys to send messages to anyone else.
2017-01-27 17:32:20 +00:00
< / p >
< p >
2017-02-03 10:35:35 +00:00
Messages sent with a team and whitelist key show up on your dashboard and count against your text message and email allowances.
2017-01-27 17:32:20 +00:00
< / p >
< h2 class = "heading-medium" > Test key< / h2 >
< p >
2017-02-03 10:35:35 +00:00
Use a test key to test the performance of your service and its integration with GOV.UK Notify.
2017-01-27 17:32:20 +00:00
< / p >
< p >
2017-02-03 10:35:35 +00:00
Test keys don’ t send real messages but do generates realistic responses.
There’ s no restriction on who you can send to.
2017-01-27 17:32:20 +00:00
< / p >
< p >
2017-02-02 16:14:56 +00:00
Messages sent using a test key don’ t show up on your dashboard or count against your text message and email allowances.
2017-01-27 17:32:20 +00:00
< / p >
< p >
By default, all messages sent with a test key will result in a delivered status.
< / p >
< p >
2017-02-03 10:35:35 +00:00
If you want to test failure responses with a test key, use the following numbers and addresses:
< div class = "bottom-gutter-3-2" >
{% call mapping_table(
caption='Test numbers/address that generate error responses',
field_headings=['Label', 'Value', 'Action'],
field_headings_visible=False,
caption_visible=False
) %}
{% call row() %}
{{ text_field('07700900003') }}
{{ text_field('temporary failure') }}
{% endcall %}
{% call row() %}
{{ text_field('07700900002') }}
{{ text_field('permanent failure') }}
{% endcall %}
{% call row() %}
{{ text_field('temp-fail@simulator.notify') }}
{{ text_field('temporary failure') }}
{% endcall %}
{% call row() %}
{{ text_field('perm-fail@simulator.notify') }}
{{ text_field('permanent failure') }}
{% endcall %}
{% call row() %}
{{ text_field('any other valid number or address') }}
{{ text_field('delivered') }}
{% endcall %}
{% endcall %}
2017-01-27 17:32:20 +00:00
2017-02-03 10:35:35 +00:00
< / div >
2017-01-27 17:32:20 +00:00
< / p >
2017-02-01 10:27:02 +00:00
< h2 class = "heading-medium" > Smoke testing your integration< / h2 >
< p >
2017-02-03 10:35:35 +00:00
If you need to smoke test your integration with GOV.UK Notify on a regular basis, you should use the smoke test numbers and addresses below.
< div class = "bottom-gutter-3-2" >
{% call mapping_table(
caption='Test numbers/address that generate error responses',
field_headings=['Label'],
field_headings_visible=False,
caption_visible=False
) %}
{% call row() %}
{{ text_field('07700900111') }}
{% endcall %}
{% call row() %}
{{ text_field('07700900222') }}
{% endcall %}
{% call row() %}
{{ text_field('07700900333') }}
{% endcall %}
{% call row() %}
{{ text_field('simulate-delivered@notifications.service.gov.uk') }}
{% endcall %}
{% call row() %}
{{ text_field('simulate-delivered-2@notifications.service.gov.uk') }}
{% endcall %}
{% call row() %}
{{ text_field('simulate-delivered-3@notifications.service.gov.uk') }}
{% endcall %}
{% endcall %}
< / div >
2017-02-01 10:27:02 +00:00
< / p >
2017-02-02 16:14:56 +00:00
< p >
The smoke test numbers and addresses will immediately return a successful response, but won’ t send a real message and won’ t produce a delivery receipt.
The notification ID is not a real ID, you will not be able to fetch the notification by ID.
< / p >
< p >
You can use the smoke test numbers and addresses with any type of key.
2017-02-03 10:35:35 +00:00
If your smoke tests need to get the status of a message, then use a test key and don’ t use these numbers and addresses.
2017-02-02 16:14:56 +00:00
< / p >
2017-02-01 10:27:02 +00:00
2017-01-27 17:32:20 +00:00
< / div >
< / div >
{% endblock %}