31 lines
1.1 KiB
Markdown
31 lines
1.1 KiB
Markdown
|
---
|
||
|
title: Is testing a chore?
|
||
|
date: 2024-09-29
|
||
|
permalink: daily/2024/09/29/is-testing-a-chore
|
||
|
tags:
|
||
|
- software-development
|
||
|
- automated-testing
|
||
|
- test-driven-development
|
||
|
cta: testing_course
|
||
|
snippet: |
|
||
|
Is it a chore to write automated tests?
|
||
|
---
|
||
|
|
||
|
[Do some Developers skip writing tests for their personal projects][0] because they think it's a chore?
|
||
|
|
||
|
If they've written the code, so they then think it's too much work to write tests or need to move on to the next task?
|
||
|
|
||
|
Is it boring to write tests for code that's already written and will pass straight away?
|
||
|
|
||
|
This is why I do test-driven development and start with a failing test and then write code to make it pass.
|
||
|
|
||
|
Then, I add more to the test until it fails and then get that to pass.
|
||
|
|
||
|
When that test is finished, I'll move to a new test for a different piece of functionality.
|
||
|
|
||
|
I like this approach of working in small feedback cycles and alternating between failing and passing tests.
|
||
|
|
||
|
Testing this way isn't boring or a chore and much more interesting for me compared to writing all the code first and maybe writing the tests later.
|
||
|
|
||
|
[0]: {{site.url}}/daily/2024/09/28/testing-personal-projects
|