Merge pull request #2457 from alphagov/remove-integration-testing

Remove integration testing
This commit is contained in:
Chris Hill-Scott
2018-11-07 10:26:30 +00:00
committed by GitHub
4 changed files with 23 additions and 148 deletions

View File

@@ -178,7 +178,7 @@ def documentation():
@main.route('/integration-testing')
def integration_testing():
return render_template('views/integration-testing.html')
return render_template('views/integration-testing.html'), 410
@main.route('/callbacks')

View File

@@ -23,7 +23,6 @@
<li><a href="https://docs.notifications.service.gov.uk/{{ key }}.html" target="_blank" rel="noopener">{{ label }}</a></li>
{% endfor %}
</ul>
<p>You can also find out about <a href="{{ url_for('main.integration_testing')}}">integration testing</a> and the different types of API keys that you can use.</p>
</div>
</div>

View File

@@ -11,154 +11,13 @@
<div class="column-two-thirds">
<h1 class="heading-large">Integration testing</h1>
<p>This information has moved.</p>
<p>
There are different types of API keys that let you do functional or performance integration testing.
You dont need different GOV.UK Notify accounts or access to other GOV.UK Notify environments.
Refer to the <a href="{{ url_for('main.documentation') }}">documentation
for the client library you are using.
</p>
<h2 class="heading-medium">Types of API Keys</h2>
<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 %}
{% 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>
<h2 class="heading-medium">Live key</h2>
<p>
Once your service is live you are able to create Live keys. You can then use these keys to send messages to anyone.
</p>
<p>
Messages sent with a live key show up on your dashboard and count against your text message and email allowances.
</p>
<p>
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.
</p>
<div class="panel panel-border-wide">
<p>
You should never send test messages to invalid numbers or addresses using a live key. This will lead to your API key being revoked.
</p>
</div>
<h2 class="heading-medium">Team and whitelist key</h2>
<p>
Use a team and whitelist key for end-to-end functional testing.
</p>
<p>
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.
</p>
<p>
Messages sent with a team and whitelist key show up on your dashboard and count against your text message and email allowances.
</p>
<h2 class="heading-medium">Test key</h2>
<p>
Use a test key to test the performance of your service and its integration with GOV.UK Notify.
</p>
<p>
Test keys dont send real messages but do generate realistic responses.
Theres no restriction on who you can send to.
</p>
<p>
Messages sent using a test key dont show up on your dashboard or count against your text message and email allowances.
</p>
<p>
By default, all messages sent with a test key will result in a delivered status.
</p>
<p>
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 %}
</div>
</p>
<h2 class="heading-medium">Smoke testing your integration</h2>
<p>
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>
</p>
<p>
The smoke test numbers and addresses will immediately return a successful response, but wont send a real message and wont 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.
If your smoke tests need to get the status of a message, then use a test key and dont use these numbers and addresses.
</p>
</div>
</div>

View File

@@ -55,7 +55,7 @@ def test_robots(client):
@pytest.mark.parametrize('view', [
'cookies', 'privacy', 'using_notify', 'pricing', 'terms', 'integration_testing', 'roadmap',
'cookies', 'privacy', 'using_notify', 'pricing', 'terms', 'roadmap',
'features', 'callbacks', 'documentation', 'security'
])
def test_static_pages(
@@ -106,6 +106,23 @@ def test_old_static_pages_redirect(
)
def test_old_integration_testing_page(
client_request,
):
page = client_request.get(
'main.integration_testing',
_expected_status=410,
)
assert normalize_spaces(page.select_one('.grid-row').text) == (
'Integration testing '
'This information has moved. '
'Refer to the documentation for the client library you are using.'
)
assert page.select_one('.grid-row a')['href'] == url_for(
'main.documentation'
)
def test_terms_is_generic_if_user_is_not_logged_in(
client
):