Module 4 : Unit Testing & TTD (Test Driven Development)

Rachel Gultom — GBE01116

RachelGultom
3 min readJul 30, 2021
Slider

1. How do you feel?

I think if it’s like nature, I’ll see it like rainy weather and thunderstorms. Why ? because the journey for 4 weeks is very hard and really drains the mind and energy because everyone wants to progress but not everyone has the opportunity because time is limited. But I’m sure, after the rain there must be a rainbow, now that’s a gift for those of us who want to try and work hard. Like a rainstorm is a very big challenge that we have to go through, and a rainbow is like a gift from God because we want to work hard through the storm :) .Oh yes, to form a rainbow, we need the sun, so assume the sun is God, then it rains + sun = rainbow ,Perfect ! :D
I admit, this is an interesting journey but we want to have an amazing experience, whatever it is we will do. Remember, nothing is in vain as long as it’s a positive thing that builds character in us :)

Rainbow

2. From a scale of 1–10% how much have you put in the effort to participate in the learning process at #GenerasiGIGIH?

I think the score is 90, because every schedule of this program, I feel very enthusiastic to accept it, especially since this is a very good program to shape our soft-skill character. I feel even though I feel tired and bored for the past 4 weeks, but that’s normal, the name is also a learning process. I once saw a tweet that said “don’t give up just because you are tired or bored, that’s normal, everyone must experience it”. Emphasize to yourself that the only person who can improve a person’s character is the person himself. The point is, if we are used to challenges, anything will be easy because we have been shaped from those challenges :)

3. If you could ask 1 question to your comrades in #GenerasiGIGIH, what would you like to ask?

I want to ask, what is the strategy that you apply regarding time management to be able to join this program as a whole? And what was the toughest challenge you’ve ever experienced? :D I feel the challenges must be heavy and heavy :D

Material Summary

1. Unit Testing aims to ensure whether the function or feature that we will implement is in accordance with the predetermined design. There are 3 important aspects of the cycle, namely red, green and refactor. Red is testing that produces errors, Green is testing that produces code that can run without errors, Refactor is testing of functional changes to the code whether it can be used properly

2. TTD (Test Driven Development), the main goal is to make the code clearer, simpler, and free of bugs. Just like unit testing, there are red, green and refactor and this is part of the unit test. There is also code coverage, such as git commit after refactor and others as well as mocks and stubs which are important components in testing the behavior of written code.

Example

--

--