Unit testing for Go developers
4.3 (5 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
38 students enrolled

Unit testing for Go developers

Learn how to test your Go code with real world examples
4.3 (5 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
38 students enrolled
Last updated 4/2020
English
English
Current price: $13.99 Original price: $19.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2 hours on-demand video
  • 1 article
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Learn the concepts of unit testing
  • Learn the Go testing package
  • Learn Testify, the most used teste library in Go
  • Learn using real world examples
Course content
Expand all 18 lectures 01:44:49
+ Golang Testing Essentials
8 lectures 41:24
Course resources
00:14
The go test command and test caching
03:49
Improving your Test Failure Messages
04:05
Table Driven Tests, avoid repeated test code
09:06
Improving our tests with Sub Tests
03:23
Avoiding inconsistent tests with Fatal method
06:04
Mocking dependencies
08:45
Unit and Integration Tests, difference explained
05:58
Integration and Unit test difference exercices
2 questions
Mocking exercices
2 questions
+ Testify, taking our tests to the next level
2 lectures 13:09
Idiomatic Assertions
04:32
Mocking made easy with mock.Mock
08:37
+ Mastering the most used Mocking types (Test Doubles)
3 lectures 37:45
Stubs: User registration example
13:47
Mocks: Asserting method calls
04:07
Mock and Dummy Object: Credit card fraud prevention example
19:51
Requirements
  • Programming Logic
  • Basic knowledge in Go
Description

In this course, you will learn how Go developers are testing their Go code in the companies. We will use only real world problems and we will show all the examples using code.

You will learn the concepts of unit testing, the Go testing package and Testify, the most used library for tests in Go.

If you came from another languages. I'm sure you are trying to figure out how to apply the same concepts using Golang, in this course we will answer all your questions.

And if Go is your first language or you don't know much about unit testing, don't worry, we will cover everything, from the basic to advanced.

Who this course is for:
  • Developers and students that want test their Go code