Get Free Shipping on orders over $79
Test-Driven Development in Go : A practical guide to writing idiomatic and efficient Go tests through real-world examples - Adelina Simion

Test-Driven Development in Go

A practical guide to writing idiomatic and efficient Go tests through real-world examples

By: Adelina Simion

eText | 28 April 2023 | Edition Number 1

At a Glance

eText


$49.49

or 4 interest-free payments of $12.37 with

 or 

Instant online reading in your Booktopia eTextbook Library *

Why choose an eTextbook?

Instant Access *

Purchase and read your book immediately

Read Aloud

Listen and follow along as Bookshelf reads to you

Study Tools

Built-in study tools like highlights and more

* eTextbooks are not downloadable to your eReader or an app and can be accessed via web browsers only. You must be connected to the internet and have no technical issues with your device or browser that could prevent the eTextbook from operating.

Learn about the Go testing fundamentals and techniques to leverage Test-Driven Development, (TDD) for delivering and maintaining microservice architectures, including unit testing, end-to-end testing, and contract testing.

Key Features

  • Write Go test suites using popular mocking and assertion frameworks
  • Leverage TDD to implement end-to-end testing of HTTP web applications and microservice architectures
  • Master testing and debugging techniques for suites that cover edge cases and concurrent code

Book Description

Experienced developers know that designing a comprehensive testing strategy is vital to shipping and maintaining services in production. This book teaches you to leverage TDD, which is already an industry practice, for testing your Go applications at different levels. In addition, one chapter discusses the challenges and approaches of testing concurrent code, which requires different techniques for testing and profiling.

You'll use TDD to solve and test a variety of problems, from simple mathematical functions to web applications. You'll learn how to structure and run your unit tests, and what assertion frameworks are available for you to use. You'll implement test suites using table-driven testing, which is a common technique used in Go. Then, you'll write and run Behavior-Driven Development (BDD) style tests. You'll learn more complex topics that require end-to-end testing with mocking and contract testing via practical examples. Finally, you'll explore the difficult aspects of implementing and running TDD in production. You'll come across the challenges of testing concurrent code and fuzzing.

By the end of this book, you'll design and implement a comprehensive testing strategy for your Go applications and microservice architectures.

What you will learn

  • Understand the benefits and techniques of TDD
  • Create practical Go unit tests using mocks and assertions
  • Build table-driven test suites for HTTP web applications
  • Use Cucumber to reliably test web applications end-to-end
  • Verify microservice architectures using contract testing
  • Write and test Go concurrency mechanisms efficiently
  • Develop useful tests that cover edge cases using property testing and fuzzing
  • Learn effective debugging strategies for non-deterministic test failures

Who This Book Is For

If you are an intermediate-level developer or software testing professional who knows Go fundamentals and is looking to deliver projects with Go, then this book is for you. Knowledge of Go syntax, structs, functions, and interfaces will help you get the most out of this book.

Table of Contents

  1. Getting to Grips with Test-Driven Development
  2. Unit Testing Essentials
  3. Mocking and assertion frameworks
  4. Building efficient test suites
  5. Performing End-to-end testing
  6. Testing the book swap web application
  7. Refactoring in Go
  8. Testing microservice architectures
  9. Challenges of testing concurrent code
  10. Testing edge cases
  11. Working with Generic test utilities
  12. Debugging intermittent test failures
on
Desktop
Tablet
Mobile

More in Programming & Scripting Languages

Forty-Four Esolangs : The Art of Esoteric Code - Daniel Temkin

eBOOK

Agile Web Development with Rails 8 - Sam Ruby

eBOOK

RRP $97.96

$78.99

19%
OFF
Investing for Programmers - Stefan Papp

eBOOK