Quantcast
Channel: James Grenning's Blog » Unit Testing
Browsing all 13 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Manual Test is Unsustainable

Creating automated tests can be very difficult, especially when the code has gotten long in the tooth and was not created with automated tests to begin with. Many product development teams don’t...

View Article



Image may be NSFW.
Clik here to view.

#include Test Double

It’s day one of adding tests to your legacy C code. You get stopped dead when the compiler announces that the code you are coaxing into the test harness can’t be compiled on this machine. You are...

View Article

Image may be NSFW.
Clik here to view.

Hiding Non-standard C Keywords for Off-Target Testing

Some silicon vendors extend the C language so the programmers can easily interact with the silicon. Using these extensions tie production code to the silicon vendors compiler and consequently the code...

View Article

Image may be NSFW.
Clik here to view.

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 Article

Image may be NSFW.
Clik here to view.

Unit 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 Article


Image may be NSFW.
Clik here to view.

Unit 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 Article

Image may be NSFW.
Clik here to view.

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...

View Article

Image may be NSFW.
Clik here to view.

“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 Article


Image may be NSFW.
Clik here to view.

Accessing 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 Article


Image may be NSFW.
Clik here to view.

Accessing 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 Article

Image may be NSFW.
Clik here to view.

Seeking 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 Article

Image may be NSFW.
Clik here to view.

I’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 Article

Image may be NSFW.
Clik here to view.

Report 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

Browsing all 13 articles
Browse latest View live




Latest Images