Code Coverage’s Mixed Message
I’m in agreement with Robert Glass when he says “100% test coverage is insufficient. 35% of the faults are missing logic paths.” It’s not controversial, but I’d like to give my perspective on it. If...
View ArticleUnit testing RTOS dependent code – RTOS Test-Double
When you’ve got legacy code that depends on the Real-time Operating System, you have a challenge to get your code off the target for unit testing. If you want to test with the concurrency provided by...
View ArticleUnit testing RTOS dependent code – RTOS Test-Double – Part 2
In the last article, the OSSemPend() test-double was coded to handle a specific OSSemPend() application and test need. The semaphore was being used to signal when there is a message to process. It was...
View ArticleTDD and the Real-World
One of the attendees of my training objected to TDD stating “TDD does not resolve the real-world (temperature, pressure, timing, noisy signals, etc.) issues that my project is encountering.” You are...
View Article“TDD ignores the design” “No it doesn’t” “Yes it does” – Part 2
This is the second article addressing the misconception that TDD ignores design. In the previous article, I explained how TDD acts as a design rot radar. In this article, I’ll explain why I think TDD...
View ArticleAccessing static Data and Functions in Legacy C — Part 1
And a Happy Leap Year Bug It’s a new year; last year was a leap year; so the quadrennial reports of leap year bugs are coming in. Apologies are in the press from Apple, TomTom, and Microsoft. Trains...
View ArticleAccessing static Data and Functions in Legacy C — Part 2
Maybe you read Part 1 of this article. If you did you’ll know it concerns adding tests to legacy code (legacy code is code without tests). You will also know that the code has file scope functions and...
View ArticleSeeking the Light – A question from a recent TDD training attendee
Here is a good question, and my reply, from a recent attendee of my Test-Driven Development for Embedded C training. Hi James, As I work more with TDD, one of the concepts I am still struggling to...
View ArticleI’ve got integration and system tests, why do I need unit tests?
Kent Beck told me years ago, if the code does not need to work, then there is no need to test it. He continued and observed, why bother writing it if it does not need to work. Since hearing that and...
View ArticleReport from the field on TDD in embedded development
Thanks James. Upper management actually asked me to share my TDD experience as well & so I just published an article internally to our Embedded Software newsletter describing how TDD helped my...
View Article