Book description
Another day without Test-Driven Development means more time wasted chasing bugs and watching your code deteriorate. You thought TDD was for someone else, but it's not! It's for you, the embedded C programmer. TDD helps you prevent defects and build software with a long useful life. This is the first book to teach the hows and whys of TDD for C programmers.
TDD is a modern programming practice C developers need to know. It's a different way to program---unit tests are written in a tight feedback loop with the production code, assuring your code does what you think. You get valuable feedback every few minutes. You find mistakes before they become bugs. You get early warning of design problems. You get immediate notification of side effect defects. You get to spend more time adding valuable features to your product.
James is one of the few experts in applying TDD to embedded C. With his 1.5 decades of training,coaching, and practicing TDD in C, C++, Java, and C# he will lead you from being a novice in TDD to using the techniques that few have mastered.
This book is full of code written for embedded C programmers. You don't just see the end product, you see code and tests evolve. James leads you through the thought process and decisions made each step of the way. You'll learn techniques for test-driving code right nextto the hardware, and you'll learn design principles and how to apply them to C to keep your code clean and flexible.
To run the examples in this book, you will need a C/C++ development environment on your machine, and the GNU GCC tool chain or Microsoft Visual Studio for C++ (some project conversion may be needed).
Publisher resources
Table of contents
- Test-Driven Development for Embedded C
- For the Best Reading Experience...
-
- Table of Contents
- What People Are Saying About Test-Driven Development for Embedded C
- Foreword by Jack Ganssle
- Foreword by Robert C. Martin
- Acknowledgments
- Preface
- Chapter 1: Test-Driven Development
- Part 1: Getting Started
- Chapter 2: Test-Driving Tools and Conventions
- Chapter 3: Starting a C Module
- Chapter 4: Testing Your Way to Done
- Chapter 5: Embedded TDD Strategy
-
Chapter 6: Yeah, but...
- We Don’t Have Time
- Why Not Write Tests After the Code?
- We’ll Have to Maintain the Tests
- Unit Tests Don’t Find All the Bugs
- We Have a Long Build Time
- We Have Existing Code
- We Have Constrained Memory
- We Have to Interact with Hardware
- Why a C++ Test Harness for Testing C?
- Where Are We?
- Put the Knowledge to Work
- Part 2: Testing Modules with Collaborators
- Chapter 7: Introducing Test Doubles
- Chapter 8: Spying on the Production Code
- Chapter 9: Runtime-Bound Test Doubles
- Chapter 10: The Mock Object
- Part 3: Design and Continuous Improvement
- Chapter 11: SOLID, Flexible, and Testable Designs
- Chapter 12: Refactoring
- Chapter 13: Adding Tests to Legacy Code
- Chapter 14: Test Patterns and Antipatterns
- Chapter 15: Closing Thoughts
- Part 4: Appendixes
- Appendix 1: Development System Test Environment
- Appendix 2: Unity Quick Reference
- Appendix 3: CppUTest Quick Reference
- Appendix 4: LedDriver After Getting Started
- Appendix 5: Example OS Isolation Layer
- Appendix 6: Bibliography
Product information
- Title: Test Driven Development for Embedded C
- Author(s):
- Release date: April 2011
- Publisher(s): Pragmatic Bookshelf
- ISBN: 9781680504880
You might also like
video
Test Driven Development, Refactoring and Pair Programming
Overview Offering more than 4 hours of instruction, this fast-paced and engaging video course recorded as …
book
Design Patterns for Embedded Systems in C
A recent survey stated that 52% of embedded projects are late by 4-5 months. This book …
video
Secure Programming with C
Secure coding with C is a top concern. Although the C programming language, which is commonly …
book
Hands-On Network Programming with C
A comprehensive guide to programming with network sockets, implementing internet protocols, designing IoT devices, and much …