DEV Community

loading...

Discussion: When do automated tests make sense?

schmelto profile image Tom Schmelzer ・1 min read

I wonder when it makes sense to incorporate automated tests into your program. But also when unit tests make sense.

Discussion

pic
Editor guide
Collapse
joelbonetr profile image
JoelBonetR

It's a waste of time and money... At least at the beginning, then your app grows and manual testing and issues are much more significant than the cost of code tests into your App and there's a rush to code them on an impossible environment.

If you ask me, code the tests while coding the app is the best approach. Unit tests, end to end tests and integration tests are meant to provide quality assurance on the code, specially into production and reduces cardiovascular risk among developers 😆

Collapse
schmelto profile image
Tom Schmelzer Author

OK you say for critical productive Programms implement tests otherwise not?

Collapse
joelbonetr profile image
JoelBonetR

No, I say you always will need them unless it's a very thin app without too much interaction and logic.

Collapse
jamesdengel profile image
James dengel

my cutting point is as soon as I make a function really.

If what I'm running is 100 lines of script then no tests as I am the tester.

If I factor something to make it re-useable in the same script it gets tested.

Collapse
mefaba profile image
AW A RE

Well for example, in my current job, we have a react native app, something like a travel app, there is online users, payments, travels added by users, etc. When we upgrade one part of the app, we are testing it manually in our phones. Which make this manual testing questinable. And many times there are bugs, 404s and inconsistencies along the new upgrades. So ıt would probably makes sense for us to go for automated testing.

Collapse
schmelto profile image
Tom Schmelzer Author

And why you do not have since today automatic tests?

Collapse
mefaba profile image
AW A RE

Because we are a small in developing side. And it is hard to implement automated test. Because every button you make you need to write a automated test working for it.

And actually, we are only 2 including me. 8 others are doing business and marketing. It is weird to me to have 2 develoepr only but it is not my company anyway.

Collapse
patarapolw profile image
Pacharapol Withayasakpunt

For me, it is as important as Git branching, but more fine-tuned.