Test-Driven Development in Go: A practical guide to writing idiomatic and efficient Go tests through real-world examples
Language: English
Published by Packt Publishing, Limited, 2023
- Softcover
- New

Seller: Biblios, frankfurt am main, hessen, GermanyBiblios
AbeBooks seller since September 10, 2024
Condition: New
£ 63.19
Quantity: 4 available
Add to basketItem description from seller
PRINT ON DEMAND.
Seller Inventory # 18395953365
- Title
- Test-Driven Development in Go: A practical guide to writing idiomatic and efficient Go tests through real-world examples
- Author
- Adelina Simion
- Publisher
- Packt Publishing, Limited
- Publication year
- 2023
- Condition
- New
- Binding
- Soft cover
- Language
- English
- ISBN 10
- 1803247878
- ISBN 13
- 9781803247878
Explore Go testing techniques and leverage TDD to deliver and maintain microservices architecture, including contract, end-to-end, and unit testing
Purchase of the print or Kindle book includes a free PDF eBook
Key Features
- Write Go test suites using popular mocking and testing frameworks
- Leverage TDD to implement testing at all levels of web applications and microservices architecture
- Master the art of writing tests that cover edge cases and concurrent code
Book Description
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.
What you will learn
- 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
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
- Getting to Grips with Test-Driven Development
- Unit Testing Essentials
- Mocking and Assertion Frameworks
- Building Efficient Test Suites
- Performing End-to-End Testing
- End-to-End Testing the BookSwap Web Application
- Refactoring in Go
- Testing Microservice Architectures
- Challenges of Testing Concurrent Code
- Testing Edge Cases
- Working with Generics
"Synopsis" may belong to another edition of this title.
About 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.
"About the title" may belong to another edition of this title.
Biblios
frankfurt am main, hessen, Germany
AbeBooks seller since September 10, 2024
Shipping rates from Germany to U.S.A.
| Item | 25 to 45 business days | 8 to 14 business days |
|---|---|---|
| First item | £ 8.42 | £ 15.83 |
Payment methods
Store description
We carry a wide selection of books from South Asia, United States, UK.
Specialty
new books imported from india, uk, usaSeller's business information
Readingos GmbH
Kaiserstraße 47
Frankfurt am Main, Germany 60329
Terms of sale
We ship from Frankfurt
Right of withdrawal
If you are a consumer you can withdraw from the contract in accordance with the following. Consumer means any natural person who is acting for purposes which are outside his trade, business, craft or profession.
Information regarding the right of withdrawal
Statutory right to withdraw
You have the right to withdraw from this contract within 14 days without giving any reason.
The withdrawal period will expire after 14 days from the day on which you acquire, or a third party other than the carrier and indicated by you acquires, physical possession of the last good or the last lot or piece.
To exercise the right of withdrawal, electronically fill in and submit a clear statement on our website, under "My Purchases" in "My Account". We will communicate to you an acknowledgement of receipt of such a withdrawal on a durable medium (e.g. by e-mail) without delay.
To meet the withdrawal deadline, it is sufficient for you to send your communication concerning your exercise of the right of withdrawal before the withdrawal period has expired.
Effects of withdrawal
If you withdraw from this contract, we will reimburse to you all payments received from you, including the costs of delivery (except for the supplementary costs arising if you chose a type of delivery other than the least expensive type of standard delivery offered by us).
We may make a deduction from the reimbursement for loss in value of any goods supplied, if the loss is the result of unnecessary handling by you.
We will make the reimbursement without undue delay, and not later than 14 days after the day on which we are informed about your decision to withdraw from this contract.
We will make the reimbursement using the same means of payment as you used for the initial transaction, unless you have expressly agreed otherwise; in any event, you will not incur any fees as a result of such reimbursement.
We may withhold reimbursement until we have received the goods back, or you have supplied evidence of having sent back the goods, whichever is the earliest.
You shall send back the goods or hand them over to Biblios, frankfurt am main, Germany, without undue delay and in any event not later than 14 days from the day on which you communicate your withdrawal from this contract to us. The deadline is met if you send back the goods before the period of 14 days has expired. You will have to bear the direct cost of returning the goods. You are only liable for any diminished value of the goods resulting from the handling other than what is necessary to establish the nature, characteristics and functioning of the goods.
Exceptions to the right of withdrawal
The right of withdrawal does not apply to:
- The delivery of newspapers, journals or magazines with the exception of subscription contracts; and
- The supply of digital content which is not supplied on a tangible medium (e.g. on a CD or DVD) if you accepted when you placed your order that we could start to deliver it, and that you could not withdraw once delivery had started.