Hello guys! This is me, Zahra, one of your beloved hipster wanna share something new again!
Well for the intro, FINALLY I could say, week of mid-term has been passed. That week was really gloomy yet wonderful for me. Gloomy? Because of what? Because of, I still had to do so so so many tasks from all of my subjects in this term. Could you imagine week full of tasks meanwhile you have to learn for the mid-term test too? Yeah, like I said, it has been passed by the way. Don’t need to discuss it again tho. You just have to know that I’m all right now (I hope so and I wish you too!) :)
Ok, then, wonderful? Why that gloomy week was wonderfull too for me? That was so funny by the way, because I realized something valuable from PPL that relate to my life experience. So here’s the story. Like you know on my last post, before I implement something, I have to make the unit test first. Honestly, when I knew that flow, I was thinking like “Why do we have to make the unit test first besides we can directly implement something that we want to implement?” Moreover, unit testing that I did before was front-end-things, of course, it was new and really hard for me. And now I know why. I know why we have to do the test first.
When I got a task to make unit test for the sidebar, I had to think what kind of sidebar that I want to implement right away. Without conscious, unit test make us (or even the word “force” more describe it) think about it earlier, make us prepare first for the next step that we want to take. The unit test also lets me do the research at the beginning of the development phase about what kind of sidebar that I want to choose to be implemented next. Other than that, After I made my first front-end unit test for the sidebar, it was really really bad, messy, and not well prepared. But again, new thing to learn, you can change your unit test file during the development phase. You don’t have to be afraid, you still have a chance to change it. That means, after you made your unit test, you could still explore anything about something that you want to implement.
A unit test also could notify you if later you forget about something important that you have to make. It also applied to my experience of making a back-end unit test. I got a chance once to make unit testing for the back-end. It was hard that time but fortunately, I have good friends that helped me through that. I made a unit test for test API workloads. The behavior is the same. You have to know at first what all the things that you have to cover later for the API workloads. It was also awesome by the way. The big difference between front-end and back-end unit test for me is:
- Unit Testing for Back-End
- I have to test the output that expected to occur. Like I test the error code might occur
- Unit Testing for Front-End
- I have to test all the components that should be rendered.
Nah, this is the part that I called wonderful. When I studied for my mid-term, I realized that I have to make list first about anything that should I learn. With that list, at the end or at least the day before the test, I could quantify my ability compare with that points on my list. It reminded me of unit test. The list that I mentioned before is like the unit test. It could help to make you prepare earlier and it also could remind you later in case you miss something to learn. Cool. really. It was pretty cool for me.
So, if you guys still wondering “is it really important to make the unit test first?” trust me, the answer is yes, because either it could help you to prepare earlier, it also could help you if you miss something later. That’s all that I want to share with you guys, Thanks PPL for introducing me to the importance of testing :) See you guys in the next post! :)
0 komentar:
Post a Comment