Test-Driven Development in Go

Golden Member
Joined
May 24, 2024
Messages
264
Reaction score
355
Points
43
ce15f43aad5aeba7af0fa2a80a35098c.png



This book shows how to use test-driven development (TDD), a common industry practice, to test Go applications at different levels. You'll also explore the challenges that arise when testing parallel code and learn how to use generics and write fuzzy tests. The book begins by teaching you how to use TDD to solve problems ranging from simple mathematical functions to web applications. Next, you'll learn how to structure and run unit tests using Go's standard testing library and explore two popular testing frameworks, Testify and Ginkgo. Using table-based testing, a popular Go technique, you'll also implement test suites. As you progress, you will write and run Behavior Driven Development (BDD) tests using Ginkgo and Godog. Finally, you'll learn the complex aspects of implementing and testing TDD in a production environment, such as refactoring your code and testing your microservices architecture using contract testing implemented with Pact. All of these techniques will be demonstrated using a sample REST API as well as small custom code samples. By the end of this book, you will learn how to design and implement a comprehensive testing strategy for your Go applications and microservices architecture.



To see this hidden content, you must reply and react with one of the following reactions : Like Like, Love Love, Haha Haha, Wow Wow
 
  • Tags
    development
  • Top