DEV Community

loading...
Our Time For Tech

My first Unit Testing experience

saradotlog profile image Sara LoG ・2 min read

These past two weeks has been "testing weeks" at our Time for Tech codeCollab and we all have been writing test for the different parts of our Shiftwork App.

Despite having worked as a developer for a few years in the past, this has been the first time I had properly written a test by myself. Back then I used to hear about their importance in meet-ups and in conferences but the reality was that we never had enough time / interest to put them in place as part of our processes.

Even if they are far more common now than 4 years ago I think that is still a problem in some companies and I have both types of former colleagues and acquaintances: the ones that think that they are not so necessary and the ones who think you can't be a good dev if you cannot write tests.

As I have survived all this time without them I used to consider them as a "nice to have". But this experience has given me a more deeper understanding of their importance and how they actually can make you a better dev.

Not only I found flaws that might have gone unnoticed (that's what are they for, aren't they!) but they also require you to have a very good knowledge of the app, what should do and what shouldn't and above all understand that the important thing is not making the test to pass. The final goal is to make sure the test is actually testing what you are meant to test.

In this case we did the testing after building the app so we had to test the methods we already had in place. Although writing the test before would have been a very good experience too, I'm glad we took this direction as I have much more understanding of the app, its parts and behaviour now than when we started 10 weeks ago, and as a first testing experience for most of us a TDD approach would have been very intimidating. Now I'm ready for it tho!!!

And after this, I'm currently thinking of the next challenge: presenting The Shiftwork App to the public in our demo day. So if you want to support us at our virtual event, please Grab a free ticket here!

Hope to see you there!

Discussion (0)

Forem Open with the Forem app