May 5th, 2008
You have someone else’s code. You have to use it. To use it you have to learn it. If the code had automated unit tests you could read the unit tests to see how the code behaves. But, it probably does not have unit tests. So, you read the documentation. The documentation usually leaves some room for interpretation in the best case. It lies and misleads in the worst case. What do you do? You read the code.
Read the rest of this entry »
Tags: Learning Tests, TDD, Test Driven Development
Posted in Test Driven Development, Uncategorized | No Comments »
April 21st, 2008
I’ve been talking Agile at the Embedded Systems Conference. Last week was my 7th year of participation. A few common questions usually come up. I’ll paraphrase the questions and answers.
Read the rest of this entry »
Tags: Agile Embedded, Embedded Software
Posted in Agile Embedded | No Comments »
March 26th, 2008
Like I said in my previous blog, doing all this embedded C makes me miss constructors. I’ve got a three step plan to make the lack of constructors less painful. In the previous article, we discussed the problem of duplicate setup data, and all the duplicate effort to go along with it. In this article I’ll tell you what we’re doing about it.
Read the rest of this entry »
Tags: C, CppUTest, Embedded TDD, TDD C, Test Driven Development, Test Driven Development C
Posted in Embedded TDD, Test Driven Development | No Comments »
March 13th, 2008
I’m working with a few teams evolving a large complex legacy embedded C application. (Whoa! That is a lot of modifiers on application.) We are trying to get unit tests in place. I think there is some 20 year old code here. And this application is not going away anytime soon. So adding tests is critical to keeping the application running and making it more maintainable for the years to come. The biggest challenge (so far) is getting the setup and initialization code together to allow a unit test to run. The first test is a bear. Once we get one going its much easier to get others going in the same area.
Read the rest of this entry »
Tags: C, CppUTest, Embedded TDD, TDD C, Test Driven Development, Test Driven Development C
Posted in Embedded TDD, Test Driven Development | No Comments »
March 6th, 2008
In the last article, I added tests to existing code. So I did not really do Test Driven Development. I did Test After Development. Let’s do some TDD now and design the block erase function. I’ll go from the spec, to the test to the code.
Read the rest of this entry »
Tags: Embedded, Embedded Agile, Embedded TDD, TDD, TDD Device Driver, Test Driven Development
Posted in Embedded TDD, Test Driven Development | No Comments »
February 17th, 2008
I keep hearing that you can’t write unit tests for device drivers. I don’t believe that’s true. To disprove this claim, I thought I would find a device driver and write some unit tests for it. This blog posting shows what device driver unit tests look line.
Read the rest of this entry »
Tags: Embedded, Embedded Agile, Embedded TDD, TDD, TDD Device Driver, Test Driven Development
Posted in Agile Embedded, Embedded TDD, Test Driven Development | 1 Comment »