A comprehensive, hands-on workshop for mastering testing in Go, from basics to advanced techniques.
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
Install the workshop CLI
go install github.com/alexrios/workshop-cli/cmd/workshop@latestThe workshop CLI helps you set up lessons and manage your workspace.
workshop setup 01 1.1
cd module01/lesson1.1/work
go test -vmoduleXX/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
| # | 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.
Start here if you're new to Go testing:
- Module 01: Basic Testing
- Module 02: Advanced Patterns
- Module 05: Example Tests
- Module 06: Coverage
Build on your testing knowledge:
- Module 03: Benchmarking
- Module 04: Fuzzing
- Module 08: Standard Library Testing (I/O, filesystem, logging)
Master sophisticated testing techniques:
- Module 07: Property-Based Testing
- Module 09: Concurrent Testing with synctest
- Module 10: HTTP Testing
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.1Happy Testing! 🎯