I know one person who likes writing tests, and it is not me! I like adding code-coverage to my code and you’ll see why.
My name is Maciej, I’m a software engineer, and you can find how to pronounce my name here: sayoname.com/me/maciej
Omitting tests is OK only if the project is your small to-do app.
Not having tests will become a problem sooner or later. Now you might deploy features quickly. But the day when you cannot release for weeks because of cropping bugs here and there will come and this will happen…
If the project grows it WILL become a problem! Imagine - you start getting users, making money, hiring devs, there are so many feature going on that you will not be able to keep all those dependencies in your head.
I worked in a place once which had a pretty big code project with no tests at all. The repo was massive, thousands of customers used it every day and they paid millions. But customers were paying and they wanted new features. Some were simple, like changing text and adding a button here and there. Some were more complex like providing integration with external software.
One day we got our Product Owner (PO) who specified this new requirement. We needed a few new reports for customers, which were basically a couple of new tables. What started as a small task which we scoped around 4-weeks until production. Turned out to be a 4-month struggle with tens if not hundreds of bugs raised by QA.
Why was that? It wasn’t the technology used, it wasn’t the developers ;) and it wasn’t the complexity of the project. It was the lack of tests!
There were three of us working on those features, and due to no tests, we didn’t know if our changes break someone else’s code!
Another problem was that those bugs were usually found after a couple of days of full manual regression testing. After a bug was raised we had to pick bug fixes as a priority and switch context. And then investigate, trying to remember why I wrote this rubbish code, fix it, create a PR, get it approved, and then release (obviously manually, because what did you expect from a no tests codebase).
This massive gig made the business realize we cannot do it anymore and a decision has been made to rewrite the whole app! It took almost 18 months and obviously, no new features were added in the meantime.
You get now why tests are important. You don’t? Close the page, you’ll never get it! Get back to adding functionality and stop wasting your precious time even reading about tests!
#react #react-testing-library #reactjs #testing
I know one person who likes writing tests, and it is not me! I like adding code-coverage to my code and you'll see why.