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

Unit Testing in Go

Unit Testing in Go

Unit Testing 101 and how to implement unit testing in Go

More Decks by Harits Fahreza Christyonotoputra

Other Decks in Programming

Transcript

  1. Unit Testing? “One of the methods that used to make

    sure your code is not broke” “...unit tests are not an effective way to find bugs or detect regressions. They examine each unit of your code separately”
  2. Do • Make Them Short • Make Them Fast •

    100% Pass • Give a good name • Design your test • Try it by yourself
  3. Conclusion • Unit Test just to make sure your code

    is not broke • It is not an effective way to find bugs or detect regressions • It examine each unit of your code separately • Go has default `testing` package • There are tools and libs that can help us to make a good unit test