Unit Testing RESTful APIs with TDD and Golang with Docker

preview_player
Показать описание
A golang tutorial on test driven development for RESTful API.

Unit Tests at the API level are often overlooked, however it's essential to have those tests in place to catch bugs early on and facilitate confident refactoring.

00:00 - Intro
00:42 - GoFiber Examples
02:22 - Refactor Code to make it Unit Test friendly
03:53 - Refactoring Walk-through
05:13 - Add an API Unit Test
08:46 - Unit Test walk-through
11:40 - Create a Service / Business Logic layer
13:21 - Unit Test for Service / Business Logic layer
15:55 - Add a Mock implementation
17:37 - Unit Test walk-through
20:49 - Closing thoughts

-----------------
Support
-----------------
-----------------
Blogs
-----------------
----------------------
Mentoring
----------------------
Find me on Code Mentor and book a 1:1 Mentoring Session
-----------------
Social
-----------------

#golang #docker #microservices #restfulapi #programming #tdd
Рекомендации по теме
Комментарии
Автор

I realised my interface signature for the Quotter service was not the best, hence I went and refactored it. The attached source code has the update.

codeuncomplicated
Автор

Good video, thanks! What about testing the context c *fiber.Ctx used in handlers? Sometime you have to add data in session or in c.Locals. I find it very difficult to TDDer that part

jackkorovev
Автор

Hey, what plugin you use to run :GoTest in your buffer? is that just a command you created yourself?

josecarlosribeiro
Автор

Could you provide a url for the vi plug-in that you use for writing go in vi with autocompletes etc.

bendurmishllari
Автор

great! can you share your vim config :) or maybe can create video how you setup vim for development in Golang.

abdulraufhm
welcome to shbcf.ru