Skip to content

Commit 3703c3c

Browse files
committed
feat: add post about automated tests
1 parent fe0e69a commit 3703c3c

File tree

10 files changed

+17
-0
lines changed

10 files changed

+17
-0
lines changed
85.2 KB
Loading
94.8 KB
Loading
81.2 KB
Loading
81.2 KB
Loading
127 KB
Loading
127 KB
Loading
114 KB
Loading
102 KB
Loading
54.8 KB
Loading
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: 'Automated tests'
3+
pubDate: 'May 23 2025'
4+
carouselImages: ['/blog/posts/automated-tests/01.jpg', '/blog/posts/automated-tests/02.jpg', '/blog/posts/automated-tests/03.jpg', '/blog/posts/automated-tests/04.jpg', '/blog/posts/automated-tests/05.jpg', '/blog/posts/automated-tests/06.jpg', '/blog/posts/automated-tests/07.jpg', '/blog/posts/automated-tests/08.jpg', '/blog/posts/automated-tests/09.jpg']
5+
tags: ['clean code', 'automated tests']
6+
---
7+
“I've finished, I just need to test it”
8+
9+
If you've ever said that phrase, welcome to the club! That's what we devs say when we think that whatever we've coded is functional and ready to move on.
10+
11+
But let's face it, that's not always true. It's not uncommon to find errors just when we're writing our automated tests. Leaving tests last may seem natural, but when we think about it more deeply, we realize that it's actually counterproductive to follow this line of reasoning.
12+
13+
If in chess the first moves (those we call openings or defenses) can guarantee you a safer mid-game and even lead to victory, in programming, making use of a methodology such as TDD (Test-Drive Development) will guarantee you short- and long-term success in a software project.
14+
15+
When we invert the logic to start with tests, we can see how much the quality of the code evolves. We are able to have greater clarity about what we need to do for our test to pass and, consequently, for the business requirements to be met. And from this, we'll have more confidence in later changing those methods or classes we've created, since they're duly covered by tests. And not being afraid to make changes puts us on another level of productivity.
16+
17+
Of course, we're not always working in an ideal scenario, creating software from scratch, where adding tests first would be easily applicable. The reality is that most of us are dealing with legacy systems, with few or no tests. In these scenarios, we need to be able to adapt to refactor small parts whenever possible, and ensure that these parts are tested independently and consistently. Following this type of practice will bring much more security to you and the people who work alongside you on a daily basis!

0 commit comments

Comments
 (0)