Add daily email for 2024-05-16
The first test is the hardest
This commit is contained in:
parent
4def00b81c
commit
1e0675d3bb
36
source/_daily_emails/2024-05-16.md
Normal file
36
source/_daily_emails/2024-05-16.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
title: The first test is the hardest
|
||||
date: 2024-05-16
|
||||
permalink: archive/2024/05/16/the-first-test-is-the-hardest
|
||||
tags:
|
||||
- software-development
|
||||
- drupal
|
||||
- php
|
||||
- automated-testing
|
||||
- test-driven-development
|
||||
cta: ~
|
||||
snippet: |
|
||||
Getting the first automated test working is the hardest part.
|
||||
---
|
||||
|
||||
Whether you're writing tests before the implementation code or not, the first test is always the hardest to write.
|
||||
|
||||
What will the arrange and act phases look like?
|
||||
|
||||
What dependencies will you need?
|
||||
|
||||
What do you need to mock or create fakes of?
|
||||
|
||||
In a Drupal test, what other modules and configuration do you need to install?
|
||||
|
||||
What installation profile and default theme do you need to use?
|
||||
|
||||
What other unknown or complicated setup steps are there?
|
||||
|
||||
Do you need to configure your environment to run the tests and get the expected output?
|
||||
|
||||
## Here's the thing
|
||||
|
||||
The hardest part is getting the arrange/setup phase working and getting to when the test is running your business logic.
|
||||
|
||||
Once you've got the first test running, adding more for similar use cases will be much easier.
|
Loading…
Reference in a new issue