Testing with golang and testify - tutorial part 1

Sdílet
Vložit
  • čas přidán 2. 06. 2024
  • This is part one of my three part testify tutorial series. In this video I am going to explain how to use the assert and require package of testify using a real world example. I am also showing some best practices and teach you to become a fully-fledged testing master.
    github repo:
    github.com/thomaslanghorst/te...
    Testify on github:
    github.com/stretchr/testify
    Playlist:
    • Advanced go tutorials
    ❤️ SUPPORT MY CHANNEL ❤️
    --------------------------------------------------
    A little support goes a long way!
    Buy me a coffee: www.buymeacoffee.com/thomasla...
    Become a patreon: / thomaslanghorst
    📖 5 Books to skyrocket your career 📖
    ----------------------------------------------------
    THE EXPLANATION VIDEO - • 5 MUST READ Programmin...
    amzn.to/3IahMMh - Automate the boring stuff with python
    amzn.to/3lI4RcM - Head First Design Patterns
    amzn.to/3Ea1KjZ - Extreme Programming Explained
    amzn.to/3k7xhwn - Soft Skills
    amzn.to/3KdEC8n - Clean Code
    🎒 THE GEAR I USE 🎒
    --------------------------------------------------
    💻 Technical Gear
    amzn.to/3Edp4h5 - Apple MacBook Pro M1
    amzn.to/3KmaWFQ - Laptop Bag
    amzn.to/412MNdt - Apple Magic Keyboard
    amzn.to/3jXJ2pb - Mouse (Mac Version)
    amzn.to/3I3umwJ - Mouse (Windows Version)
    amzn.to/3YHVCYD - Mousepad
    amzn.to/3YAoAtj - SSD External Hard Drive
    amzn.to/3Sdj0e7 - SSD Protection Case
    amzn.to/3XDdfr9 - Headphones
    amzn.to/3lJqrgN - USB Hub
    amzn.to/3KamAUo - HDMI to USB
    🎒 Digital Nomad Essential Gear
    amzn.to/3Sdjn8v - Bag
    amzn.to/40ZLyf9 - Bullet Journal
    amzn.to/41130zS - Fineliner Pens
    amzn.to/3YNwUps - French Press / Plunger
    amzn.to/3lI44sk - Mug
    📷 CZcams Gear
    amzn.to/3k7bTra - Apple Iphone 13 mini (My "camera")
    amzn.to/40ZbdEF - Tripod
    amzn.to/3ZeMlY7 - Lightning to USB adapter for Microphones
    amzn.to/3EdpSCD - Microphone
    amzn.to/3Ee926A - Microphone Pop Protection
    amzn.to/3S2AR7z - Selfie Ring Light
    👋 SOCIAL MEDIA 👋
    ----------------------------------------------------
    @the_langhorst - INSTAGRAM
    @the_langhorst - TWITTER
    @the_langhorst - TIKTOK
    🎶 MUSIC I USED 🎶
    ----------------------------------------------------
    Karl Casey @ White Bat Audio
    • 80s Retrowave / Synthw...
    Song: Erlando - Questions (Vlog No Copyright Music)
    Music provided by Vlog No Copyright Music.
    Video Link: • Erlando - Questions (V...
    ‼️ Disclaimers
    The links mentioned in this description may contain affiliate links. I may receive a commission for any purchases made through these links, but there won't be any extra cost for you. I am grateful for your support, as it enables me to keep providing you with valuable content for free.
    #programming #coding #golang
  • Věda a technologie

Komentáře • 22

  • @MaximRovinsky
    @MaximRovinsky Před 2 lety +4

    Thomas, thanks for the test tutorial. Great job👍

    • @ThomasLanghorst
      @ThomasLanghorst  Před 2 lety

      Hey Maxim, thank you so much! Glad you liked the video!

  • @vaibhavverma7395
    @vaibhavverma7395 Před 9 měsíci

    thanks for the tutorial!

  • @flexairz
    @flexairz Před 2 lety +2

    Great explanation!
    Thanks!

  • @petarnikov7459
    @petarnikov7459 Před 2 lety +2

    Thank you for the video.

    • @ThomasLanghorst
      @ThomasLanghorst  Před 2 lety +1

      Hey Petar, glad you liked it! Thanks for the comment, much appreciated!

  • @basilgafoor4736
    @basilgafoor4736 Před rokem +2

    go testify go!!!

  • @yingda-rv1gh
    @yingda-rv1gh Před rokem +1

    so helpful!

  • @jostegare
    @jostegare Před rokem

    thanks thanks thanks!

  • @josephmartin6219
    @josephmartin6219 Před 2 lety +2

    Thank you Thomas! Please can we access the github repo for the tutorial, thanks!

    • @ThomasLanghorst
      @ThomasLanghorst  Před 2 lety +2

      Hey man, thanks for the comment. Sure, I will add it to the description of all videos. Thanks for the advice!
      Here is the link btw:
      github.com/thomaslanghorst/testify-tutorial

    • @josephmartin6219
      @josephmartin6219 Před 2 lety

      @@ThomasLanghorst thank you so much!!

  • @harikeshverma8917
    @harikeshverma8917 Před rokem +1

    go testify go

  • @_Holy_Lance_
    @_Holy_Lance_ Před 2 lety +1

    Thanks

    • @ThomasLanghorst
      @ThomasLanghorst  Před 2 lety

      Hey Diego. Thanks for the comment. Glad you liked it.

  • @tagon35
    @tagon35 Před 3 měsíci

    6:25 this is inaccurate. The testing package provides various functions:
    t.Log() / t.LogF() prints a message without failing.
    t.Fail() fails the test without printing a message.
    t.Error() and t.ErrorF() can be used to fail a test and print a message. Note that doing so will fail the test but not immediately, the test will still complete.
    t.Fatal() fails the test and immediately exits execution.

  • @TravisKeenan
    @TravisKeenan Před rokem +1

    "GO TESTIFY GO"

  • @virabadrasana
    @virabadrasana Před 5 měsíci

    go testify go

  • @ezequielcorbacho2321
    @ezequielcorbacho2321 Před rokem +1

    go testify go