Udemyintermediateen

Introduction to Testing in Go (Golang)

Master Go testing! Learn to write unit & integration tests for robust web apps and REST APIs. Improve code quality & reliability.

4.7(766)
8,433students
12h 17m
Certificate
Trevor Sawler
Trevor SawlerPh.D.

Course Content

Introduction to Testing in Go (Golang) is an intermediate-level Udemy course taught by Trevor Sawler. It runs 12h 17m, is taught in English, and includes a certificate of completion. Learners rate it 4.7 out of 5 from 766 reviews, with 8,433 students enrolled. It is a paid course, last updated June 2024.

Master Go Testing: Unit & Integration Tests for Robust Applications

Are you building software and worried about unexpected bugs in production? Many developers find unit testing and integration testing to be overlooked, leading to the dreaded "it works on my computer!" scenario. This course equips you with the skills to write effective tests in Go, ensuring your applications are reliable, maintainable, and performant.

Learn how to proactively identify and fix issues early in the development lifecycle, ultimately reducing development time and minimizing downtime. Well-tested code requires less maintenance and delivers a superior user experience.

Why Go for Testing?

Go is a modern, type-safe, compiled language known for its speed and efficiency. It's perfectly suited for building scalable and fast web applications, and boasts powerful built-in testing tools. This course leverages these tools to provide a comprehensive understanding of Go testing.

What You'll Build & Test:

Through hands-on projects, you'll gain practical experience writing unit and integration tests for real-world applications:

  • Command Line Interface (CLI): Develop and thoroughly test a CLI application that determines if a number is prime.
  • Simple Web Application: Build a basic web application with user login and profile picture uploads, with comprehensive test coverage.
  • REST API with JWT Authentication: Create a REST API using the same codebase, implementing authentication with JWT tokens and a Postgres database. We'll cover the entire authentication flow, including refresh tokens, and rigorously test all aspects.
  • Single Page Application (SPA) with JWT: Learn to integrate JWT and refresh tokens into a Vanilla JavaScript SPA and test the functionality effectively.

Key Testing Concepts Covered:

This course delves into essential testing techniques, including:

  • Application Routes: Testing the functionality of your application's routes.
  • Application Handlers: Testing the logic within your application handlers.
  • Table-Driven Tests: Efficiently testing multiple scenarios with concise table tests.
  • Database Operations (Repository Pattern): Testing interactions with your database using the Repository pattern.
  • Application Middleware: Testing middleware components.
  • User Authentication (Sessions): Testing user authentication using sessions.
  • User Authentication (JWT Tokens): Implementing and testing user authentication with JWT tokens.
  • JWT Token Generation & Validation: Testing the generation and validation of JWT tokens.
  • Refresh Token Generation & Validation: Testing the generation and validation of refresh tokens.
  • Testing User Input: Validating and testing user input.
  • Terminal Output Testing: Testing output to the terminal.
  • Cookies in Requests & Responses: Testing the handling of cookies.

By the end of this course, you'll be able to:

  • Write effective tests for Go applications.
  • Understand how to write testable code.
  • Implement robust unit testing and integration testing strategies.

Prerequisites:

This course requires you to download Docker Desktop. (Udemy Business users, please consult your employer before downloading.)

$ whoami — the devs behind tutorialsearch.io

Need a web app built? Hire the team behind TutorialSearch.io

We ship fast, production-grade full-stack apps (Next.js, React, edge infra) — the same stack that powers this site.

ISTQB® CTFL: Static Testing

by Andrejs Doronins

5.0
42m
beginner
pluralsight
5.0(21)
49m
beginner