BRIEFS logo BRIEFS

Cypress Driven Development for recording audio

05/14/2021 , 2m, 40s

Friends I'm out and about today so we might hear some like music in the background and stuff but yeah today I wanted to talk about cypress driven development. I was working on something that I'm working on for the new website where you can submit a recording of a question and then I'll be able to answer it's gonna be really cool but it's all like in browser recording stuff and lots of what I was testing was like required me to have to record something and then to continue on through the the work.

Or the flow and that was super annoying to have to you know, make a change and then go through that whole flow again and so I was like, well, this is the perfect situation for cypress different driven development so I made like a I don't know ten lines cypress function or or test that went through that I did have to do a couple fancy things to make it so that cypress would accept a fake wave file as input which I made a maniacal laugh and I found online but uh, yeah, once I had that I'll set up it was really.

Cool every time I made a change to anything I would just have cypress rerun it would rerun automatically and and then I could look at the terminal output or the console output and get a good idea of what what was going on so yeah I was really it was like nail on the head for cypress driven development.

I don't think that it's always necessary but especially when you're working on workflows and stuff and like this is the sort of thing that hot module replacement like yeah, maybe that work okay, but just is not going to do it for you.For this sort of thing like I never really trusted how much of a replacement and so the and this is the one situation where people say, oh yeah how much replacements really nice if you're like what you're working on is pretty far into some workflow or something that you don't want to have to do over and over again, well, sometimes you do need to refresh for one reason or another and having cypress just get me back into that state and like a half a second yeah that's awesome and it's like a real actual experience so if you've not tried cypress driven development.

I suggest that you give it.A shot because it's really helped me be really productive and at the end of it. I'm I may actually be able to use this as a test as an actual test to keep me confident so there's that I hope that's interesting and helpful and useful to you and hope you have a spectacular day you take care and all talk to you later.