Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Art of Unit Testing

The Art of Unit Testing

Dicoding Indonesia

March 18, 2023

More Decks by Dicoding Indonesia

Other Decks in Programming


  1. The benefits • Helps to detect potential bug in code

    • Reflects current code quality • Made sure the code still works properly after refactor / major changes • Documents the features and user flows of our code • Trains our mindset to be a better software developer ◦ How user interacts with our code ◦ How edge cases and error might arise from our logic ◦ Improves attention to detail
  2. But the downsides… • Too focused on testing and making

    it passed • Time consuming • Harder for big codebase • Even harder if it’s legacy code • Might write a wrong test or miss the edge cases instead
  3. Unit Testing will not just affect your code quality, but

    also your collaboration with stakeholders