oliverdavies.uk/content/node.9f663595-3a33-4503-a86e-c15b8e3113a0.yml

77 lines
3.5 KiB
YAML

uuid:
- value: 9f663595-3a33-4503-a86e-c15b8e3113a0
langcode:
- value: en
type:
- target_id: daily_email
target_type: node_type
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
revision_timestamp:
- value: '2025-05-11T09:00:30+00:00'
revision_uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
revision_log: { }
status:
- value: true
uid:
- target_type: user
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
title:
- value: |
Do you need to write tests for small or short-lived projects?
created:
- value: '2023-10-14T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:30+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2023/10/14/do-you-need-to-write-tests-for-small-or-short-lived-projects
langcode: en
body:
- value: |
<p>When does it make sense not to write automated tests?</p>
<p>Tests prevent regressions in codebases that are changed and updated over time.</p>
<p>So, if you're working on a short-term project, such as a marketing campaign website that will only be live for a few months, you won't get as much benefit from having tests, especially if you may not even change it once it's live.</p>
<p>Likewise, tests are useful for projects on which you want to avoid downtime and outages, especially if you sell products via your website or it contains important information. For other websites, such as personal blogs, that are less critical, testing may be less beneficial.</p>
<p>Also, one of Drupal's key benefits is that you can build websites within the Drupal UI, without needing to write custom code.</p>
<p>If you're going down this route, there is no custom code to test and a separate tool that checks URLs exist and returns the correct response code would be a better fit.</p>
<p>If you then need to add any custom code and functionality, you may want to add tests.</p>
<p>Whilst there are some situations where not writing tests is reasonable, there are more reasons and situations when you should, compared to not.</p>
format: full_html
processed: |
<p>When does it make sense not to write automated tests?</p>
<p>Tests prevent regressions in codebases that are changed and updated over time.</p>
<p>So, if you're working on a short-term project, such as a marketing campaign website that will only be live for a few months, you won't get as much benefit from having tests, especially if you may not even change it once it's live.</p>
<p>Likewise, tests are useful for projects on which you want to avoid downtime and outages, especially if you sell products via your website or it contains important information. For other websites, such as personal blogs, that are less critical, testing may be less beneficial.</p>
<p>Also, one of Drupal's key benefits is that you can build websites within the Drupal UI, without needing to write custom code.</p>
<p>If you're going down this route, there is no custom code to test and a separate tool that checks URLs exist and returns the correct response code would be a better fit.</p>
<p>If you then need to add any custom code and functionality, you may want to add tests.</p>
<p>Whilst there are some situations where not writing tests is reasonable, there are more reasons and situations when you should, compared to not.</p>
summary: null
field_daily_email_cta: { }