oliverdavies.uk/content/node.ca4340a2-6371-457a-8e95-885adbcdc256.yml

89 lines
3.5 KiB
YAML

uuid:
- value: ca4340a2-6371-457a-8e95-885adbcdc256
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:34+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: |
Writing tests in your own time
created:
- value: '2023-08-16T00:00:00+00:00'
changed:
- value: '2025-05-11T09:00:34+00:00'
promote:
- value: false
sticky:
- value: false
default_langcode:
- value: true
revision_translation_affected:
- value: true
path:
- alias: /daily/2023/08/16/writing-tests-in-your-own-time
langcode: en
body:
- value: |
<p>This is how I first started writing automated tests.</p>
<p>I was working at a well-known digital agency, so I didn't want it to affect my output and cause me to deliver work late.</p>
<p>I wanted to give myself a less pressured opportunity to learn and experiment with different options and approaches.</p>
<p>So, when creating custom modules, I wrote the implementation code during billable work hours and the tests during the evening on my own time.</p>
<p>I was investing time in learning a new skill and one that I knew would pay dividends.</p>
<h2 id="how-did-it-go%3F">How did it go?</h2>
<p>As I'd already written the implementation code, I wasn't doing test-driven development, so most of the tests were confirming what I'd written was correct with a passing test and being able to make it fail in expected ways.</p>
<p>One time, though, I found a bug I'd written that day. I think it was an incorrect permission name I'd typed.</p>
<p>I was able to fix it before it was submitted for quality assurance checks and client testing.</p>
<p>This saved the time and effort of creating another issue and branch, fixing it, going through the development cycle again and having it re-tested.</p>
<p>After that, for me, there was no going back.</p>
format: full_html
processed: |
<p>This is how I first started writing automated tests.</p>
<p>I was working at a well-known digital agency, so I didn't want it to affect my output and cause me to deliver work late.</p>
<p>I wanted to give myself a less pressured opportunity to learn and experiment with different options and approaches.</p>
<p>So, when creating custom modules, I wrote the implementation code during billable work hours and the tests during the evening on my own time.</p>
<p>I was investing time in learning a new skill and one that I knew would pay dividends.</p>
<h2 id="how-did-it-go%3F">How did it go?</h2>
<p>As I'd already written the implementation code, I wasn't doing test-driven development, so most of the tests were confirming what I'd written was correct with a passing test and being able to make it fail in expected ways.</p>
<p>One time, though, I found a bug I'd written that day. I think it was an incorrect permission name I'd typed.</p>
<p>I was able to fix it before it was submitted for quality assurance checks and client testing.</p>
<p>This saved the time and effort of creating another issue and branch, fixing it, going through the development cycle again and having it re-tested.</p>
<p>After that, for me, there was no going back.</p>
summary: null
field_daily_email_cta: { }