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 next to 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).
Working at a place without any formal testing process I picked up this book to learn more about testing. Book is not only about testing it has great tips about software engineering in general. I plan on returning to this book when I start my next project.
Easily one of my best 5 books on C. The title is slightly misleading; it's true that the author discusses some aspects of embedded development, but the lessons learned in this book are far more applicable than just the embedded world. It's basically a how-to manual for doing TDD in C, including discussions on design best practices.
I would have appreciated some detailed instructions on how to setup the CppUTest unit-testing framework, all the more so since the official documentation is very spartan. It took our team a couple of days to understand how to use it. But ever since then, we can state that all our new production code gets written tests for it first, and that's thanks to this book.
Awesome read, a real eye-opener for me and probably one of the best introductions to the subject. I really like how James Grenning sticks with the TDD cycle. It feels weird at first but the implications on your code design become obvious and the reader is amply rewarded in the later chapters. I'd love to know the author's opinion on other test frameworks like google test, though.
Old time practitioner of TDD for application as well as embedded/dedicated systems but for some reason never got around to reading this book until now, some 10+ years after publication. If you're an application level programmer getting into embedded this book will contain a lot of repetition but the examples and descriptions of how to deal with test doubles/mocks etc for embedded and legacy embedded code is worth the read. If you are embedded programmer not used to TDD this book is a gem. Th only thing I would have liked to see more of is discussion about hard hard to test embedded stuff like interrupt and concurrency. Overall, absolute gem of a book. The compact description/summary of Michael Feathers work on legacy code is brilliant. I think everyone should read Feathers but if you don't have the time, Grenning's book contains a nice summary.
Final thoughts, if you read this one - also check out Grenning's ZOMBIES acronym for unit test
A structured and concrete introduction and tour of Test-Driven Development for embedded systems and programming in general.
The author manages to demonstrate the benefits of a TDD approach to implementing embedded systems. This turns out to be especially relevant, since embedded systems typically have a special toolchains and only target specific platforms; TDD (at least the approach) forces the software engineer to make a slightly more abstract and device independent implementation. The benefit, which is then clearly demonstrated is that testing in the manner needed for TDD can more fully explore the failure modes of production code: how can peripherals and random events be tested?
The argument is that TDD forces the programmer to implement the necessary abstractions which allow for testability and this in turn increases the confidence in the program code.
This book accomplishes exactly what it sets out to. I already have a fair bit of exposure to TDD but nevertheless found this to be an enjoyable read full of good reminders. It reinforced the importance of the 4-phase test pattern, and I especially liked the discussion around TDD and design patterns - code has to be somewhat modular in order to be easily testable.
Reading this also reminded me how fortunate I am to be able to work with C++. Hah! It was a bit painful being reminded of all the hoops you have to jump through to try mimicking object-oriented programming in C.
Grenning presents a unit testing methodology of programming in this book that is tailored towards embedded development. The first part of the book was the most valuable, with an overview of what test-driven development (TDD) is and why he considers TDD to be of value in software development. He covers some of the unique challenges of using TDD with the C language and work arounds for these issues. Overall, this is a great reference with plenty of examples on how to begin using TDD.
An excellent book for embedded developers, not just for the TDD and unit testing concepts, but also for the good design practices. Very practical and easy to read.
A good intro to the technique, which I was looking for. I already practiced several examples. Written in a good manner. Clear descriptions and examples of frameworks. But the reader needs to have basic awareness of FW development in TDD to apply it to his problems.
Excellent work. One of the best titles in the pragmatic programmer series. It is very well written, easy to read and strikes the right balance between theory and practice. It made me change the way I work and I recommend it to embedded software engineers and their management chains.