There is a common adage on software testing that reads: "all software is guilty until proven innocent". This saying is a testament to how delicate applications can get, especially as they grow. Testing is a crucial part of the software development lifecycle to ensure that our apps instead stay strong as they grow.
In fact, testing is so important that some codebases have more test code than production code, and at times, many developers spend more time building and running tests than they do writing production code.
This chapter covers testing from front to back. It starts with the basics of the built-in testing libraries that come with the Go language, and moves on to more complex use cases and third-party libraries. It then dives into advanced topics like performance profiling and nested tests.
After this chapter, you'll know both the basics and advanced topics to write better, more effective tests with less code and effort.
* There are many less well known test features behind the scenes or buried in documentation. I recommend watching this chapter in full before writing your next test suite to learn how to use Go's test facilities properly
- Title: Advanced Testing and Debugging in Go
- Release date: May 2020
- Publisher(s): Aaron Schlesinger
- ISBN: None
You might also like
Go in Action Video Edition
"A concise and comprehensive guide to exploring, learning, and using Go." From the Foreword by Steve …
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
Microservices designs require you to change how you build and deploy applications. Instead of creating a …
Go: Design Patterns for Real-World Projects
An insightful guide to learning the Go programming language About This Book Get insightful coverage of …