Unit, integration and functional Testing in Golang (Go)

Everything you'll need to completely test your Go applications

4.00 (478 reviews)
Udemy
platform
English
language
Programming Languages
category
instructor
3,879
students
7.5 hours
content
Apr 2020
last update
$59.99
regular price

What you will learn

Unit test basic functions and methods.

Unit test external REST API calls.

Unit and integration test external REST API calls.

Mock and test MySQL databases.

Integration test every layer of your application.

Benchmark functions for performance tests.

Debugging and Profiling Go applications.

Code Coverage: that diabolic metric.

Description

In this course we're covering every aspect of the testing features in Go:

  • Basic unit tests.

  • Test Driven Development.

  • Unit test a single layer of your application.

  • How to use Go modules.

  • How the TestMain function works and how to use it.

  • Mock and unit test external REST API calls.

  • Mock and integration test REST API calls form inner layers of your application.

  • How to perform functional tests.

  • How to define and write benchmarks to compare the quality of two versions of the same solution.

  • Mock and unit test MySQL database connection and query.

  • Mock frameworks available out there.

  • Asserts in Go: Why don't we have them? How to implement them in a safe way.

Content

Introducción

Welcome!
Introduction to testing

Basic testing

Basic unit tests
Code Coverage - The diabolic metric
Basic integration tests
Basic benchmarks

Testing REST API integrations

Asserts: Missing by design
Testing REST API calls
Mock and unit test external REST API calls

Testing the whole app

Mocking entire layers of the application
Functional testing

Screenshots

Unit, integration and functional Testing in Golang (Go) - Screenshot_01Unit, integration and functional Testing in Golang (Go) - Screenshot_02Unit, integration and functional Testing in Golang (Go) - Screenshot_03Unit, integration and functional Testing in Golang (Go) - Screenshot_04

Reviews

Wagner
July 24, 2023
I missed the sql-client source code link. I saw many questions asking for the code, some asked over 2 years ago, and the source code link isn't available yet
Dmytro
February 24, 2023
The author has shared a lot of interesting approaches on how to do ApiError struct and how to handle different test cases. At the begging it was a lot of little things that it was not clear and mistakes. But I have decided to stay to the end of this course and found it was extermely useful. I would recommend this couse.
Monika
August 19, 2022
Content is more into developing things and less into testing the things. I feel, the course could have been more structured.
Adrielle
August 5, 2022
Could explain the concepts using native go packages (http client and httptest), and could be more objective. Ignoring these points it's a good course! :)
Oleg
May 7, 2022
First of all, most of the content in this course is not about the testing. For example, section 2.6 on Basic benchmarks is a 33 min video where relevant benchmarks content is only ~5 min. The rest are talking about a Computer Science college lesson about why bubble sort is a poor algorithm in terms of time complexity. In addition, there is a lot of information about the benchmarks which is not covered at all, e.g., how can we run them in parallel, with different CPUs, how can I use these results to fail my tests in case of execution time too high... In conclusion, this course time with the current content may be reduced by ~4. There is a lot of missing information about the testing in this course content.
Alexei
April 20, 2022
Seems a bit outdated (go 1.12) course overwhelmed by redundant (topics not related directly to the go testing) and repetitive information (sometimes same information was repeated many times in row); Met problems with library https://github.com/mercadolibre/golang-restclient . Would be great to see the solution in course - https://github.com/mercadolibre/golang-restclient/pull/2; Sometimes keyboard is to loud; In lesson 7 we see an assertions but no explanations where they came from (they appear in one of the next lessons); Anyway, nice work. Thank you for the course!
Price
April 7, 2022
Great, great knowledgeable and approachable teacher. Hope to shake your hand one day because you’re content is immensely helpful in all the different ways.
Sekiranda
January 4, 2022
Well explained concepts, and pace of the course is slow, which is a good thing for beginners, but for experienced developers you need to watch the video in x2 speed.
Egor
July 28, 2021
not structured content. it based on 3rd party brewed libraries which pushed to be explored and used in projects.
Luís
July 26, 2021
The videos could be shorter. I didn't finished the course yet, but usually the "new thing to learn" is in the first 5 minutes. But overall I think everything to learn is in there and you show deep knowledge in the area. Keep going !! ??
Antonio
July 4, 2021
The instructor is awesome. The videos could use some editing, but it's. I wish that there were really no dependecies used in this course
Nicholas
July 2, 2021
The content being covered so far has been great, Federico covers both how to test but why. The only thing I would point out is the keyboard sounds is a bit distracting from the presentation.
Venkata
June 20, 2021
Course is good. But it could be better if external libraries are also used while writing tests. And i feel even test suites in stretchr/testify library should be covered
Heath
June 10, 2021
Very good explinations, learned a lot about testing theory and practical examples, even learned about some coding practices that make your app better.
Henrik
June 8, 2021
Talked about not relying on dependencies, proceeded to use dependencies to test REST applications, which would've been fun to see how to do from scratch. Aside from that I definitely got what I wanted from this course

Charts

Price

Unit, integration and functional Testing in Golang (Go) - Price chart

Rating

Unit, integration and functional Testing in Golang (Go) - Ratings chart

Enrollment distribution

Unit, integration and functional Testing in Golang (Go) - Distribution chart
2558896
udemy ID
9/14/2019
course created date
2/8/2020
course indexed date
Bot
course submited by