• No hay productos en el carrito.

Inicio / Cursos / Introduction to Testing in Go (Golang)
Impartido por Trevor SawlerPago único de $2,800 MXN · acceso por 12 meses

Introduction to Testing in Go (Golang)

Learn how to write effective unit and integration tests in Go, for web applications and REST APIs

Certificado oficial emitido por la SEPA través del Gobierno del Estado de México
12 meses de acceso En línea · 60 h 13 unidades Nivel intermedio
Qué aprenderás

Lo que serás capaz de hacer

Writing unit tests and integration tests is one of the most-neglected aspects of software development. All too often, a developer will find him or herself say "but it works on my computer!" when a project is presumed finished, only to discover that once taken out of the development environment, things don't work as expected. Well written unit tests and integration tests help to solve this problem, and in fact almost without exception will reduce overall development time, rather than adding to it. In addition, well-tested code almost always requires less maintenance, and the end product will have less down time. This course is focused on writing unit and integration tests in Go, a modern, type safe, compiled, and extremely fast programming language. It it is ideally suited for building safe, scalable, incredibly fast web applications, and it has powerful testing tools built right in. In this course, we will build four simple applications, and thoroughly test them: A command line application (CLI) that tries to determine if a user-entered number is prime or not; A simple web application that allows a user to log in and upload a profile picture; A simple REST API built on the same code base as the web application which allows users to authenticate using JWT tokens and perform operations against a Postgres database. We'll go through the entire authentication process, including using refresh tokens, and thoroughly test all aspects of the code. A simple Single Page Web Application (SPA), written in Vanilla JavaScript, that demonstrates how to use JWT and Refresh Tokens with a SPA, and how to test that functionality. For each of these projects, we will learn how to write unit tests for all functionality. We will learn how to test (among other things): Application routes Application handlers How to test multiple scenarios by writing and using table tests Database operations (using the Repository pattern) Application middleware User authentication (with sessions) User authentication (with JWT tokens) JWT token generation and validation Refresh token generation and validation Testing user input Writing to the terminal Adding cookies to a request Reading cookies from a response By the end of this course, you will have a solid understanding of how to write effective tests, and how to write testable code. Please note that this course requires you to download Docker Desktop from Docker. If you are a Udemy Business user, please check with your employer before downloading software.

  • Learn how to write unit tests in Go
  • Learn how to write integration tests in Go, and simplify them using Docker
  • Learn how to create test suites in Go
  • Learn how to create a simple web application and test handlers, middleware, database, and more
  • Learn how to create a simple REST API in Go and test its endpoints
  • Learn to to authenticate using JWT Tokens (and refresh tokens) and completely test all functionality

Temario

UNIDAD 1 - Introduction · 4 lecciones

UNIDAD 1 - Introduction

  • IntroductionVideo · 6 min
  • About meVideo · 1 min
  • Asking for helpVideo · 1 min
  • Mistakes: we all make them.Video · 1 min
UNIDAD 2 - Setting up our Development Environment · 4 lecciones

UNIDAD 2 - Setting up our Development Environment

  • What we'll cover in this sectionVideo · 0 min
  • Installing GoVideo · 2 min
  • Installing an IDEVideo · 3 min
  • Installing DockerVideo · 1 min
UNIDAD 3 - Simple Testing · 11 lecciones

UNIDAD 3 - Simple Testing

  • What we'll cover in this sectionVideo · 1 min
  • Creating a simple command line applicationVideo · 6 min
  • Writing a our first test for the isPrime() functionVideo · 8 min
  • Improving our test with table testsVideo · 7 min
  • Checking test coverageVideo · 2 min
  • Completing our table testsVideo · 3 min
  • Improving our program to allow for user entered informationVideo · 11 min
  • Writing a test for the prompt() functionVideo · 7 min
  • Writing a test for the intro() functionVideo · 2 min
  • Testing user input - writing a test for the checkNumbers() functionVideo · 14 min
  • Updating readUserInput to make it testable, and then testing itVideo · 6 min
UNIDAD 4 - An Aside: Running individual tests & Test Suites · 3 lecciones

UNIDAD 4 - An Aside: Running individual tests & Test Suites

  • What we'll cover in this sectionVideo · 1 min
  • Running a single testVideo · 2 min
  • Running groups of tests (test suites)Video · 2 min
UNIDAD 5 - Testing Web Applications · 11 lecciones

UNIDAD 5 - Testing Web Applications

  • What we'll cover in this sectionVideo · 1 min
  • Creating a simple web appVideo · 10 min
  • Setting up a route and handler for the home pageVideo · 12 min
  • Testing our application routesVideo · 11 min
  • Testing Handlers: the Home handlerVideo · 10 min
  • Setting up some simple middlewareVideo · 12 min
  • Trying out our new addIPToContext middlewareVideo · 3 min
  • Testing our middlewareVideo · 12 min
  • Testing ipFromContextVideo · 4 min
  • Creating a login formVideo · 3 min
  • Setting up a route and stub handler for the login formVideo · 5 min
UNIDAD 6 - Testing Validation · 5 lecciones

UNIDAD 6 - Testing Validation

  • What we'll cover in this sectionVideo · 1 min
  • Setting up validation logicVideo · 10 min
  • Testing validation logicVideo · 8 min
  • Completing the tests for our validation logicVideo · 5 min
  • Trying out validation with our login formVideo · 3 min
UNIDAD 7 - Testing Sessions · 9 lecciones

UNIDAD 7 - Testing Sessions

  • What we'll cover in this sectionVideo · 1 min
  • Setting up a test enviroment with testing.MVideo · 4 min
  • Simplifying our templates using a layoutVideo · 4 min
  • Installing a sessions packageVideo · 2 min
  • Adding session to App config, and creating a SessionManagerVideo · 4 min
  • Trying out our sessionsVideo · 8 min
  • Updating our testsVideo · 12 min
  • Improving our test for the Home handlerVideo · 6 min
  • Testing the render function with a bad templateVideo · 8 min
UNIDAD 8 - Testing POST handlers · 14 lecciones

UNIDAD 8 - Testing POST handlers

  • What we'll cover in this sectionVideo · 1 min
  • Installing postgres with DockerVideo · 6 min
  • Setting up a database connectionVideo · 10 min
  • Adding the data package for models and db package for database accessVideo · 4 min
  • Making sure our web app can connect to our databaseVideo · 4 min
  • Closing our database pool gracefully, and resetting template path in testsVideo · 2 min
  • Creating a stub profile pageVideo · 8 min
  • Adding messages to our template data and template filesVideo · 7 min
  • Adding true authentication to the Login handlerVideo · 6 min
  • Testing the Login handlerVideo · 19 min
  • Adding Auth middlewareVideo · 4 min
  • Testing Auth middlewareVideo · 7 min
  • Updating routes & end-to-end testsVideo · 9 min
  • Problems with our Login handler testVideo · 2 min
UNIDAD 9 - The Repository Pattern · 7 lecciones

UNIDAD 9 - The Repository Pattern

  • What we'll cover in this sectionVideo · 2 min
  • Defining an interface type for our repositoryVideo · 3 min
  • Moving our database functions into a repositoryVideo · 5 min
  • Updating application config to use the database repositoryVideo · 2 min
  • Creating a testdb repositoryVideo · 6 min
  • Updating setup_test.go to use the test repositoryVideo · 2 min
  • Updating our tests to use the testdb repositoryVideo · 5 min
UNIDAD 10 - Testing the database with Integration tests · 12 lecciones

UNIDAD 10 - Testing the database with Integration tests

  • What we'll cover in this sectionVideo · 1 min
  • Getting started with testing our databaseVideo · 8 min
  • Getting our tests to spin up a docker image with PostgresVideo · 11 min
  • Populating our test database with empty tablesVideo · 9 min
  • Testing InsertUserVideo · 6 min
  • Testing AllUsersVideo · 4 min
  • Testing GetUser and GetUserByEmailVideo · 5 min
  • Testing UpdateUserVideo · 4 min
  • Testing DeleteUserVideo · 3 min
  • Testing ResetUserPasswordVideo · 4 min
  • Testing InsertUserImageVideo · 7 min
  • Using build tags to separate our integration testsVideo · 3 min
UNIDAD 11 - Testing File Uploads · 9 lecciones

UNIDAD 11 - Testing File Uploads

  • What we'll cover in this sectionVideo · 1 min
  • Adding a form to the Profile pageVideo · 6 min
  • Adding the UserImage type to the User typeVideo · 6 min
  • Updating the profile.page.gohtml file to look for a profile imageVideo · 7 min
  • Writing a stub handler and a function to process profile image uploadsVideo · 14 min
  • Implementing the UploadProfilePic handlerVideo · 5 min
  • Trying things outVideo · 4 min
  • Testing image uploadsVideo · 15 min
  • Testing our upload handler, with an alternative approachVideo · 10 min
UNIDAD 12 - Testing REST APIs · 21 lecciones

UNIDAD 12 - Testing REST APIs

  • What we'll cover in this sectionVideo · 1 min
  • Setting up an api with our existing code baseVideo · 10 min
  • Adding stub handlers (endpoints) for our APIVideo · 6 min
  • Trying out our REST API to make sure things workVideo · 5 min
  • Getting started with JWT AuthenticationVideo · 19 min
  • Generating token pairsVideo · 11 min
  • Implementing the authenticate handlerVideo · 5 min
  • Trying out the authentication handlerVideo · 5 min
  • Testing our authentication handlerVideo · 11 min
  • Setting up a simple program to generate tokens for testingVideo · 3 min
  • Testing generating and validating tokensVideo · 16 min
  • Setting up our application middlewareVideo · 7 min
  • Testing our CORS middlewareVideo · 7 min
  • Testing our authRequired middlewareVideo · 8 min
  • Add middleware to routesVideo · 2 min
  • Testing API routesVideo · 4 min
  • Implementing the handler to refresh tokensVideo · 10 min
  • Testing refreshing tokensVideo · 13 min
  • Completing the handlers that interact with the User typeVideo · 7 min
  • Testing the handlers that interact with the User typeVideo · 12 min
  • Finishing up testing handlers that interact with the data.User typeVideo · 9 min
UNIDAD 13 - Testing an API for a Single Page Application (SPA) · 10 lecciones

UNIDAD 13 - Testing an API for a Single Page Application (SPA)

  • What we'll cover in this sectionVideo · 1 min
  • Serving HTML for our SPAVideo · 5 min
  • Authenticating users with our SPAVideo · 16 min
  • Setting a refresh token cookie when authenticatingVideo · 9 min
  • Allowing users to refresh tokens using a cookieVideo · 6 min
  • Automatically refreshing tokens while the user is logged inVideo · 6 min
  • Getting a user from our simple SPA with the "Get User" buttonVideo · 5 min
  • Logging web users outVideo · 6 min
  • Testing refreshing tokens for Single Page AppsVideo · 9 min
  • Testing logging users out of our SPAVideo · 7 min
Certificado oficial

Tu certificado lo emite la SEP, no solo una plataforma

Al demostrar la competencia recibes un certificado emitido por la Secretaría de Educación Pública a través del Gobierno del Estado de México: un documento oficial que puedes presentar con confianza ante cualquier empleador o institución.

Tu certificado con INEC

  • Lo emite la Secretaría de Educación Pública (SEP), a través del Gobierno del Estado de México
  • Documento oficial con folio verificable en línea
  • Lo otorga la Universidad Tecnológica Fidel Velázquez

Otras plataformas en línea

  • Constancia privada emitida por la misma plataforma
  • Solo acredita horas cursadas o asistencia
  • Sin respaldo de una autoridad educativa
Cómo funciona

Tu itinerario, de la inscripción al certificado

  1. 1

    Inscripción con pago único

    Pagas $2,800 MXN una sola vez y entras de inmediato al curso.

  2. 2

    Estudias a tu ritmo

    13 unidades con videos, lecturas y actividades, disponibles 24/7 durante 12 meses.

  3. 3

    Cuestionarios por unidad

    Cuestionarios para comprobar lo aprendido.

  4. 4

    Certificado

    Emitido por la SEP a través del Gobierno del Estado de México, con folio verificable.

Lo que obtienes

Un certificado oficial de la SEP

Muestra del certificado: Introduction to Testing in Go (Golang)

Muestra · verificable por folio y QR

  • Emitido por la Secretaría de Educación Pública (SEP), a través del Gobierno del Estado de México. No es una constancia privada: es un documento oficial, y ese respaldo marca la diferencia frente a otras plataformas en línea.
  • Contenido impartido por Trevor Sawler.
  • Folio y QR verificables para compartirlo con quien te contrate.
Medios que necesitas
Equipo de cómputo Conexión estable a internet
Pago único

Empieza hoy, a tu ritmo

Un solo pago y acceso inmediato al curso completo durante 12 meses.

  • 13 unidades · 120 lecciones · 60 h
  • 12 meses de acceso
  • Certificado emitido por la SEP (Gob. del Estado de México) con folio verificable
Pago único
$2,800MXN
Acceso por 12 meses
Inscribirme Hablar con un asesor
Preguntas frecuentes

Sobre tu inscripción

¿Cómo es el pago?

Un solo pago de $2,800 MXN. No hay mensualidades ni cargos recurrentes.

¿Cuánto tiempo tengo acceso?

12 meses desde tu inscripción, 24/7, para avanzar a tu ritmo.

¿Quién imparte el contenido?

El curso es impartido por Trevor Sawler; INEC gestiona tu inscripción, evaluación y certificado.

¿Qué pasa cuando vence mi acceso?

Puedes renovar tu cuenta tú mismo desde la plataforma, sin trámites ni esperas.

Certificado emitido por la SEP a través del Gobierno del Estado de México · Introduction to Testing in Go (Golang)

Inscribirme
  INEC es una Marca de SalesPartners Ciudad de México S de RL de CV. Template Design © Learnify LMS. All rights reserved. Terminos y Condiciones Aviso de Privacidad Politica de Devolución
Hide picture