Название: The Power of Go: Tests (Go 1.24 edition)
Автор: John Arundel
Издательство: Bitfield Consulting
Год: 2025
Страниц: 278
Язык: английский
Формат: pdf (true), epub
Размер: 10.2 MB
What does it mean to program with confidence? How do you build self-testing software? What even is a test, anyway? Welcome to the thrilling world of fuzzy mutants and spies, guerilla testing, mocks and crocks, design smells, mirage tests, deep abstractions, exploding pointers, sentinels and six-year-old astronauts, coverage ratchets and golden files, singletons and walking skeletons, canaries and smelly suites, flaky tests and concurrent callbacks, fakes, CRUD methods, infinite defects, brittle tests, wibbly-wobby timey-wimey stuff, adapters and ambassadors, tests that fail only at midnight, and gremlins that steal from the player during the hours of darkness. Go’s built-in support for testing puts tests front and centre of any software project, from command-line tools to sophisticated backend servers and APIs. This book introduces you to all Go’s testing facilities, shows you how to use them to write tests for the trickiest things, and distils the collected wisdom of the Go community on best practices for testing Go programs. Crammed with hundreds of code examples, the book uses real tests and real problems to show you exactly what to do, step by step.