Can TDD Help Reduce Integration Time?

A recent TDD for Embedded C attendee asks me “TDD does not help reduce the time I spend in the lab during system integration testing”

(This is asked in the context of embedded development. But the answer is half applicable to any development where there is integration.)

TDD should definitely help reduce the time you spend in integration. How does it do that? It helps you eliminate the non-integration problems before you get to the integration lab. An honest appraisal of what you do in integration may reveal that during integration you are finding problems you could have discovered before integration. It would help reduced integration time if you find fewer problems during integration. Don’t you think?

This cause/effect diagram helps to visualize the relationship of TDD to time spend in integration.


Continue reading

TDD 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 right! I’ll add TDD does not resolve anything. TDD is not a magic incantation that solves any problem the embedded developer may encounter. From discussions at your company, I think you realize this. But it does not change the fact that you have to spend a lot of time chasing these kinds of problems. So let’s see how TDD can support this activity.
Continue reading

Unit testing RTOS dependent code – RTOS Test-Double – Part 3

I’m going to bend the example a little, and look at how to write tests that interact with an interrupt service routine and again with a semaphore. I’ll also get some help with the tedious parts of building fakes by using Mike Long’s Fake Function Framework. (BTW: I am using a beta version, that has changes the released version does not yet have.)

This figure shows the concurrent runtime relationship between the MessageProcessor and its SerialDriver.


Continue reading