DEV Community

Justin Ho
Justin Ho

Posted on • Updated on

How do You do testing?

I'm currently working through adding livewire (a server side framework) to my laravel app - HypeTracker, but I decided to stop and think about how some of you DEV members approach testing for small or personal projects because a lot of testing posts have been popping up lately.

It was easy for my backend parts as I was fairly comfortable writing unit tests for API and functions. But do you guys do any browser testing as well before writing the visual portions? Mostly talking about pet projects.

Top comments (4)

Collapse
 
equimper profile image
Emanuel Quimper

For browser I use cypress lately. If not I use dusk :)

Collapse
 
jcsh profile image
Justin Ho

Nice! I've used cypress a little before. How stringent would you say you test on your personal projects? Do you test every element?

Collapse
 
equimper profile image
Emanuel Quimper

I tdd the backend but for the front end, I test only the big features. I dont gonna test like html element etc. But example I use react a lot, I will test some features etc. But if I receive complain for a bug etc, for sure I will add test for this feature after that.

I will say test the one you know can bug, test the fact then you show a h1 with the title I dont think this is the best one to do. Don't chase the 100% coverage

Thread Thread
 
jcsh profile image
Justin Ho

That's great advice! Thanks Emanuel!