وب سایت تخصصی شرکت فرین
دسته بندی دوره ها

Introduction to Testing in Go (Golang)

سرفصل های دوره

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


1. Introduction
  • 1. Introduction
  • 2. About me
  • 3. Asking for help
  • 4. Mistakes. We all make them.

  • 2. Setting up our Development Environment
  • 1. What well cover in this section
  • 2.1 Go.html
  • 2. Installing Go
  • 3.1 Download VS Code.html
  • 3. Installing an IDE
  • 4.1 Docker.html
  • 4. Installing Docker

  • 3. Simple Testing
  • 1. What well cover in this section
  • 2.1 primeapp.zip
  • 2. Creating a simple command line application
  • 3.1 primeapp.zip
  • 3. Writing a test for the isPrime() function
  • 4.1 primeapp.zip
  • 4. Improving our test with table tests
  • 5. Checking test coverage
  • 6.1 primeapp.zip
  • 6. Completing our table tests
  • 7.1 primeapp.zip
  • 7. Improving our program to allow for user entered information
  • 8.1 primeapp.zip
  • 8. Writing a test for the prompt() function
  • 9.1 primeapp.zip
  • 9. Writing a test for the intro() function
  • 10.1 primeapp.zip
  • 10. Testing user input - writing a test for the checkNumbers() function
  • 11.1 primeapp.zip
  • 11. Updating readUserInput to make it testable, and then testing it

  • 4. An Aside Running individual tests & Test Suites
  • 1. What well cover in this section
  • 2. Running a single test
  • 3. Running groups of tests (test suites)

  • 5. Testing Web Applications
  • 1. What well cover in this section
  • 2.1 webapp.zip
  • 2. Creating a simple web app
  • 3.1 webapp.zip
  • 3. Setting up a route and handler for the home page
  • 4.1 webapp.zip
  • 4. Testing our application routes
  • 5.1 webapp.zip
  • 5. Testing Handlers the Home handler
  • 6.1 webapp.zip
  • 6. Setting up some simple middleware
  • 7.1 webapp.zip
  • 7. Trying out our new addIPToContext middleware
  • 8.1 webapp.zip
  • 8. Testing our middleware
  • 9.1 webapp.zip
  • 9. Testing ipFromContext
  • 10.1 webapp.zip
  • 10. Creating a login form
  • 11.1 webapp.zip
  • 11. Setting up a route and stub handler for the login form

  • 6. Testing Validation
  • 1. What well cover in this section
  • 2.1 webapp.zip
  • 2. Setting up validation logic
  • 3.1 webapp.zip
  • 3. Testing validation logic
  • 4.1 webapp.zip
  • 4. Completing the tests for our validation logic
  • 5.1 webapp.zip
  • 5. Trying out validation with our login form

  • 7. Testing Sessions
  • 1. What well cover in this section
  • 2.1 webapp.zip
  • 2. Setting up a test enviroment with testing.M
  • 3.1 webapp.zip
  • 3. Simplifying our templates using a layout
  • 4.1 scs on GitHub.html
  • 4.2 webapp.zip
  • 4. Installing a sessions package
  • 5.1 webapp.zip
  • 5. Adding session to App config, and creating a SessionManager
  • 6.1 webapp.zip
  • 6. Trying out our sessions
  • 7.1 webapp.zip
  • 7. Updating our tests
  • 8.1 webapp.zip
  • 8. Improving our test for the Home handler
  • 9.1 webapp.zip
  • 9. Testing the render function with a bad template

  • 8. Testing POST handlers
  • 1. What well cover in this section
  • 2.1 Beekeeper Studio.html
  • 2.2 docker.zip
  • 2. Installing postgres with Docker
  • 3.1 jackpgx.html
  • 3.2 webapp.zip
  • 3. Setting up a database connection
  • 4.1 pkg.zip
  • 4.2 webapp.zip
  • 4. Adding the data package for models and db package for database access
  • 5.1 webapp.zip
  • 5. Making sure our web app can connect to our database
  • 6.1 webapp.zip
  • 6. Closing our database pool gracefully, and resetting template path in tests
  • 7.1 webapp.zip
  • 7. Creating a stub profile page
  • 8.1 webapp.zip
  • 8. Adding messages to our template data and template files
  • 9.1 webapp.zip
  • 9. Adding true authenication to the Login handler
  • 10.1 webapp.zip
  • 10. Testing the Login handler
  • 11.1 webapp.zip
  • 11. Adding Auth middleware
  • 12.1 webapp.zip
  • 12. Testing Auth middleware
  • 13.1 webapp.zip
  • 13. Updating routes & end-to-end tests
  • 14.1 webapp.zip
  • 14. Problems with our Login handler test

  • 9. The Repository Pattern
  • 1. What well cover in this section
  • 2.1 webapp.zip
  • 2. Defining an interface type for our repository
  • 3.1 webapp.zip
  • 3. Moving our database functions into a repository
  • 4.1 webapp.zip
  • 4. Updating application config to use the database repository
  • 5.1 webapp.zip
  • 5. Creating a testdb repository
  • 6.1 webapp.zip
  • 6. Updating setup_test.go to use the test repository
  • 7.1 webapp.zip
  • 7. Updating our tests to use the testdb repository

  • 10. Testing the database with Integration tests
  • 1. What well cover in this section
  • 2.1 dockertest on GitHub.html
  • 2.2 webapp.zip
  • 2. Getting started with testing our database
  • 3.1 webapp.zip
  • 3. Getting our tests to spin up a docker image with Postgres
  • 4.1 webapp.zip
  • 4. Populating our test database with empty tables
  • 5.1 webapp.zip
  • 5. Testing InsertUser
  • 6.1 webapp.zip
  • 6. Testing AllUsers
  • 7.1 webapp.zip
  • 7. Testing GetUser and GetUserByEmail
  • 8.1 webapp.zip
  • 8. Testing UpdateUser
  • 9.1 webapp.zip
  • 9. Testing DeleteUser
  • 10.1 webapp.zip
  • 10. Testing ResetUserPassword
  • 11.1 webapp.zip
  • 11. Testing InsertUserImage
  • 12.1 webapp.zip
  • 12. Using build tags to separate our integration tests

  • 11. Testing File Uploads
  • 1. What well cover in this section
  • 2.1 webapp.zip
  • 2. Adding a form to the Profile page
  • 3.1 webapp.zip
  • 3. Adding the UserImage type to the User type
  • 4.1 webapp.zip
  • 4. Updating the profile.page.gohtml file to look for a profile image
  • 5.1 webapp.zip
  • 5. Writing a stub handler and a function to process profile image uploads
  • 6.1 webapp.zip
  • 6. Implementing the UploadProfilePic handler
  • 7.1 webapp.zip
  • 7. Trying things out
  • 8.1 img.png.zip
  • 8.2 webapp.zip
  • 8. Testing image uploads
  • 9.1 webapp.zip
  • 9. Testing our upload handler, with an alternative approach

  • 12. Testing REST APIs
  • 1. What well cover in this section
  • 2.1 webapp.zip
  • 2. Setting up an api with our existing code base
  • 3.1 webapp.zip
  • 3. Adding stub handlers (endpoints) for our API
  • 4.1 utilities.go.zip
  • 4.2 webapp.zip
  • 4. Trying out our REST API to make sure things work
  • 5.1 webapp.zip
  • 5. Getting started with JWT Authentication
  • 6.1 webapp.zip
  • 6. Generating token pairs
  • 7.1 webapp.zip
  • 7. Implementing the authenticate handler
  • 8.1 curl-command.txt.zip
  • 8. Trying out the authentication handler
  • 9.1 webapp.zip
  • 9. Testing our authentication handler
  • 10.1 main.go.zip
  • 10.2 webapp.zip
  • 10. Setting up a simple program to generate tokens for testing
  • 11.1 webapp.zip
  • 11. Testing generating and validating tokens
  • 12.1 webapp.zip
  • 12. Setting up our application middleware
  • 13.1 webapp.zip
  • 13. Testing our CORS middleware
  • 14.1 webapp.zip
  • 14. Testing our authRequired middleware
  • 15.1 webapp.zip
  • 15. Add middleware to routes
  • 16.1 webapp.zip
  • 16. Testing API routes
  • 17.1 webapp.zip
  • 17. Implementing the handler to refresh tokens
  • 18.1 webapp.zip
  • 18. Testing refreshing tokens
  • 19.1 webapp.zip
  • 19. Completing the handlers that interact with the User type
  • 20.1 webapp.zip
  • 20. Testing the handlers that interact with the User type
  • 21.1 webapp.zip
  • 21. Finishing up testing handlers that interact with the data.User type

  • 13. Testing an API for a Single Page Application (SPA)
  • 1. What well cover in this section
  • 2.1 index.html.zip
  • 2.2 webapp.zip
  • 2. Serving HTML for our SPA
  • 3.1 webapp.zip
  • 3. Authenticating users with our SPA
  • 4.1 webapp.zip
  • 4. Setting a refresh token cookie when authenticating
  • 5.1 webapp.zip
  • 5. Allowing users to refresh tokens using a cookie
  • 6.1 webapp.zip
  • 6. Automatically refreshing tokens while the user is logged in
  • 7.1 webapp.zip
  • 7. Getting a user from our simple SPA with the Get User button
  • 8.1 webapp.zip
  • 8. Logging web users out
  • 9.1 webapp.zip
  • 9. Testing refreshing tokens for Single Page Apps
  • 10.1 webapp.zip
  • 10. Testing logging users out of our SPA
  • 139,000 تومان
    بیش از یک محصول به صورت دانلودی میخواهید؟ محصول را به سبد خرید اضافه کنید.
    خرید دانلودی فوری

    در این روش نیاز به افزودن محصول به سبد خرید و تکمیل اطلاعات نیست و شما پس از وارد کردن ایمیل خود و طی کردن مراحل پرداخت لینک های دریافت محصولات را در ایمیل خود دریافت خواهید کرد.

    ایمیل شما:
    تولید کننده:
    مدرس:
    شناسه: 1418
    حجم: 4366 مگابایت
    مدت زمان: 736 دقیقه
    تاریخ انتشار: 26 دی 1401
    طراحی سایت و خدمات سئو

    139,000 تومان
    افزودن به سبد خرید