MCPcopy Index your code
hub / github.com/PacktPublishing/Test-Driven-Development-in-Go

github.com/PacktPublishing/Test-Driven-Development-in-Go @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
748 symbols 3,275 edges 190 files 384 documented · 51%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Test-Driven Development in Go

Test_Driven Development In Go

This is the code repository for Test-Driven Development in Go, published by Packt.

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

What is this book about?

This book covers the following exciting features: * Create practical Go unit tests using mocks and assertions with Testify * Build table-driven test suites for HTTP web applications * Write BDD-style tests using the Ginkgo testing framework * Use the Godog testing framework to reliably test web applications * Verify microservices architecture using Pact contract testing * Develop tests that cover edge cases using property testing and fuzzing

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

func(e *Engine) Add(x, y float64) float64{
 return x + y
}

Following is what you need for this book: 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.

With the following software and hardware list you can run all code files present in the book (Chapter 1-11).

Software and Hardware List

Chapter Software required OS required
1-11 Go 1.19 Windows, Mac OS X, and Linux (Any)
6-11 PostgreSQL 15 Windows, Mac OS X, and Linux (Any)
6-11 Docker Desktop 4.17 Windows, Mac OS X, and Linux (Any)
(optional) Postman 10 Windows, Mac OS X, and Linux (Any)

For instructions on how to run code locally from Chapter01 to Chapter03, please refer to RUN_CALCULATOR_LOCALLY.md

For instructions on how to run code locally from Chapter04 onwards, please refer to RUN_BOOKSWAP_LOCALLY.md

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Related products

Get to Know the Author

Adelina Simion is a technology evangelist at Form3. She is a polyglot engineer and developer relations professional, with a decade of technical experience at multiple start-ups in London. She started her career as a Java backend engineer, converted later to Go, and then transitioned to a full-time developer relations role. She has published multiple online courses about Go on the LinkedIn Learning platform, helping thousands of developers upskill with Go. She has a passion for public speaking, having presented on cloud architectures at major European conferences. Adelina holds an M.Sc. in mathematical modeling and computing.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 339
Method 241
Struct 109
Interface 48
TypeAlias 11

Languages

Go100%

Modules by API surface

chapter11/handlers/handlers.go13 symbols
chapter11/db/user_service.go11 symbols
chapter11/handlers/handlers_test.go10 symbols
chapter03-solution/calculator/engine.go10 symbols
chapter10/handlers/handlers.go9 symbols
chapter09/handlers/handlers.go9 symbols
chapter08/handlers/handlers.go9 symbols
chapter07/handlers/handlers.go9 symbols
chapter06/handlers/handlers.go9 symbols
chapter05/handlers/handlers.go9 symbols
chapter04/handlers/handlers.go9 symbols
chapter03/di/wire/calculator.go9 symbols

Datastores touched

booksDatabase · 1 repos

For agents

$ claude mcp add Test-Driven-Development-in-Go \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page