Fundraising September 15, 2024 – October 1, 2024 About fundraising

Test-Driven Development in Go

Test-Driven Development in Go

Adelina Simion
0 / 5.0
0 comments
How much do you like this book?
What’s the quality of the file?
Download the book for quality assessment
What’s the quality of the downloaded files?

Experienced developers understand the importance of designing a comprehensive testing strategy to ensure efficient shipping and maintaining services in production. This book shows you how to utilize test-driven development (TDD), a widely adopted industry practice, for testing your Go apps at different levels. You'll also explore challenges faced in testing concurrent code, and learn how to leverage generics and write fuzz tests.

The book begins by teaching you how to use TDD to tackle various problems, from simple mathematical functions to web apps. You'll then learn how to structure and run your unit tests using Go's standard testing library, and explore two popular testing frameworks, Testify and Ginkgo. You'll also implement test suites using table-driven testing, a popular Go technique. As you advance, you'll write and run behavior-driven development (BDD) tests using Ginkgo and Godog. Finally, you'll explore the tricky aspects of implementing and testing TDD in production, such as refactoring your code and testing microservices architecture with contract testing implemented with Pact. All these techniques will be demonstrated using an example REST API, as well as smaller bespoke code examples.

By the end of this book, you'll have learned how to design and implement a comprehensive testing strategy for your Go applications and microservices architecture.

...

At the beginning of my career as a software engineer, I was focused on understanding technical concepts and delivering functionality as fast as I could. As I advanced in my career and matured my code-writing craft, I started to understand the importance of code quality and maintainability. This is especially important for Go developers since the language is designed around the values of efficiency, simplicity, and safety.

This book aims to provide you with all the tools you need to elevate the quality of your own Go code, through the industry-standard development methodology of Test-Driven Development

Year:
2023
Publisher:
Packt Publishing Limited
Language:
english
Pages:
304
ISBN:
4A4A0BDF-0F4B-4DB8-84C6-8CA5DB59B909
File:
MOBI , 9.45 MB
IPFS:
CID , CID Blake2b
english, 2023
This book isn't available for download due to the complaint of the copyright holder

Beware of he who would deny you access to information, for in his heart he dreams himself your master

Pravin Lal

Most frequently terms