loading...

I'm finally taking testing seriously

jamesscaur profile image James Scaur ・1 min read

I had heard the hype about unit testing for a while, and had even practised Test-Driven-Development* on my work before, but I never dove seriously into it.

Well that was going to change at some point, and I'm glad it did now.

I worked with a well-made Go repository the other weekend, and I was very impressed at how much peace of mind unit testing brought. My typical way of building robust code is actually doing a form of manual unit testing, where I test individual blocks of code with the likes of console.log or fmt.printLn, and observe the feedback in errors/lack thereof.

In retrospect this is a very silly decision because I'm a human not a computer and I shouldn't do a computer's job.

Long story short, I'm diving in today.

I've talked to a number of very qualified developers and identified that one of the best testing tools is Cypress.io. A quick journey through their 'Writing Your First Test' page definitely has me sold. This is a powerful tool.

See you on the other side... when https://app.txbatch.com has a bunch of tests keeping watch for me as I mess around with other things.

*Test-Driven-Development: where you develop something not by writing code first, but a test first. Helps you not write bugs.

Discussion

pic
Editor guide
Collapse
bigj1m profile image
Jim Plourde

I was hired for an intership some weeks ago. All the projects use TDD as a way of building softwares. I really understand the necessities for such a way of doing things despite taking a lot of time. The thing I find really hard for now is knowing what to test what goes into unit tests vs functionnal tests.

I learned Python, then went on with Obey the testing goat then getting started with Django

Collapse
ben profile image
Ben Halpern

It’s a process, you’re taking the right steps

Collapse
keptoman profile image
mlaj

At work, we discovered cypress recently and it seems to be the test suite we always needed for front end dev.

Unit tests have saved me a ton of problems with clients and bosses for missed bugs and errors.

Good luck!

Collapse
ulmas profile image
ulmas

"hype about unit testing" lol