Table of Contents
Preface
Part 1: The Big Picture
1
Getting to Grips with Test-Driven Development
Exploring the world of TDD
Introduction to the Agile methodology
Types of automated tests
The iterative approach of TDD
TDD best practices
Understanding the benefits and use of TDD
Pros and cons of using TDD
Use case – the simple terminal calculator
Alternatives to TDD
Waterfall testing
Acceptance Test-Driven Development
Understanding test metrics
Important test metrics
Code coverage
Summary
Questions
Further reading
Answers
2
Unit Testing Essentials
Technical requirements
The unit under test
Modules and packages
The power of Go packages
Test file naming and placement
Additional test packages
Working with the testing package
The testing package ...
Get Test-Driven Development in Go now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.