Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Workshop exploring the features of Go's package `testing`.

alexrios/testing-workshop

Repository files navigation

Go Testing Workshop

A comprehensive, hands-on workshop for mastering testing in Go, from basics to advanced techniques.

🎯 Workshop Overview

Learn testing in Go through 38 progressive, hands-on lessons covering:

  • Basic Testing - Write your first tests
  • Table-Driven Tests - Scale your test coverage
  • Benchmarking - Measure performance
  • Fuzzing - Find edge cases automatically
  • Coverage Analysis - Ensure thorough testing
  • Property-Based Testing - Test invariants
  • I/O & Filesystem Testing - Test external interactions
  • Time Testing - Control time in tests
  • Integration Testing - Test complete systems

Before You Begin

Install the workshop CLI

go install github.com/alexrios/workshop-cli/cmd/workshop@latest

The workshop CLI helps you set up lessons and manage your workspace.

🚀 Quick Start

workshop setup 01 1.1
cd module01/lesson1.1/work
go test -v

🗂️ Workshop Structure

moduleXX/lessonX.X/
├── starter/          # Your starting point (TODO comments)
├── solution/         # Complete reference implementation
├── work/             # Your workspace (created by setup)
├── LESSON.md         # Theory and concepts
└── EXERCISE.md       # Hands-on tasks

📖 Modules

# Module Lessons Topics
01 Basic Testing 4 Test functions, assertions, organization
02 Advanced Patterns 5 Subtests, parallel tests, helpers, lifecycle
03 Benchmarking 8 Performance measurement, profiling
04 Fuzzing 5 Automated input generation, edge cases
05 Example Tests 1 Documentation through examples
06 Coverage 3 Code coverage analysis and gaps
07 Property Testing 2 Invariant-based testing
08 Standard Library Testing 6 I/O testing, filesystem testing, logging
09 Concurrent Testing 3 synctest, time control, goroutine coordination
10 HTTP Testing 1 Testing HTTP handlers and servers

Total: 38 hands-on lessons

For detailed curriculum with learning objectives, see SYLLABUS.md.

🎓 Learning Path

Beginner Track

Start here if you're new to Go testing:

  • Module 01: Basic Testing
  • Module 02: Advanced Patterns
  • Module 05: Example Tests
  • Module 06: Coverage

Intermediate Track

Build on your testing knowledge:

  • Module 03: Benchmarking
  • Module 04: Fuzzing
  • Module 08: Standard Library Testing (I/O, filesystem, logging)

Advanced Track

Master sophisticated testing techniques:

  • Module 07: Property-Based Testing
  • Module 09: Concurrent Testing with synctest
  • Module 10: HTTP Testing

🔧 Requirements

Go 1.23+ (includes testing/synctest and modern features)


Ready to become a Go testing expert? Start with:

# Start first lesson
workshop setup 01 1.1

Happy Testing! 🎯

About

Workshop exploring the features of Go's package `testing`.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages