[Backend #13] Mock DB for testing HTTP API in Go and achieve 100% coverage

TECH SCHOOL November 11, 2020
Video Thumbnail
TECH SCHOOL Logo

TECH SCHOOL

View Channel

About

At Tech School, we believe that everyone deserves a good and free education. The purpose of Tech School is to give everyone a chance to learn IT by giving free, high-quality tutorials and coding courses on Youtube. New videos are uploaded every week. The video topics are wide-ranging, and suitable for many different levels of tech knowledge: from noob to pro. The most important thing is: all content created by Tech School is free and will always be free. If you like the videos and want to support us with this vision, please share, subscribe, or buy us a coffee: https://www.buymeacoffee.com/techschool That would give us a lot of motivation to make more useful stuffs for the community. Thank you! Join our Discord group for direct discussion: https://bit.ly/techschooldc

Video Description

When testing HTTP APIs, some people might choose to connect to the real database, while others might prefer to just mocking it. In this video, we will learn how to use Gomock to generate stubs for the DB interface, which helps us write API unit tests faster, cleaner, and achieve 100% coverage. - Join us on Discord: https://bit.ly/techschooldc - Get the course on Udemy: https://bit.ly/backendudemy - Buy us a coffee: https://www.buymeacoffee.com/techschool - Full series playlist: https://bit.ly/backendmaster - Github repository: https://github.com/techschool/simplebank - Read it on DEV: https://dev.to/techschoolguru/load-config-from-file-environment-variables-in-golang-with-viper-2j2d --- In this backend master class, we’re going to learn everything about how to design, develop, and deploy a complete backend system from scratch using PostgreSQL, Golang, and Docker. TECH SCHOOL - From noob to pro http://youtube.com/c/TECHSCHOOLGURU At Tech School, we believe that everyone deserves a good and free education. We create high-quality courses and tutorials in Information Technology. If you like the videos, please feel free to share and subscribe to support the channel or buy us a coffee: https://www.buymeacoffee.com/techschool

You May Also Like