30: Eventually Lightning Strikes

Embedded.fm · 11 Dec 2013 · 56m

What this episode covers

James Grenning, author of 'Test Driven Development for Embedded C' and founder of Renaissance Software, explains how TDD reduces bugs and improves design in embedded systems. He argues that manual testing is unsustainable because the cost of retesting grows exponentially, leading to hidden defects that cause late-stage failures. Grenning advocates for getting code off the target hardware to run on PCs using mocks and fakes, which forces modularity and allows engineers to build confidence before hardware is available. He emphasizes that TDD is not just about testing but about driving SOLID design principles, such as single responsibility, by making complex code difficult to test.

Mentioned

Companies
Renaissance Software
Products
Test Driven Development for Embedded C
Also
GitHub, SOLID

Other shows on the same ground, closest first.

  • The Pragmatic Embedded Podcast · 36m

    Development is Better when it's Test-Driven

    Jeff Gable, an embedded software consultant, explains his practice of Test-Driven Development (TDD) to host Luca Ingianni, arguing that writing failing unit tests before application code forces good architecture and high coverage. Gable details how this discipline decouples embedded application logic from hardware-specific drivers, allowing tests to run on the host machine for rapid feedback rather than slow target flashing. He addresses the common industry resistance to TDD in embedded systems, citing the initial learning curve and the need for coaching, while recommending resources like the 'Throw the Switch' video courses and tools such as Unity, CMock, and Ceedling. The conversation concludes by framing TDD as an artistic craft of storytelling through code, emphasizing that the practice builds confidence and prevents regressions in production-quality software.

  • The Pragmatic Embedded Podcast · 1h 01m

    James Grenning on TDD

    James Grenning, author of 'Test-Driven Development for Embedded C' and creator of a new self-paced online course, discusses the evolution and practical application of TDD in embedded systems. He explains the ZOMBIE acronym for deriving test cases, the importance of 'tracer bullets' to address project risks early, and why mocking should be used sparingly to avoid brittle tests. Grenning also reflects on the shift from Extreme Programming to Scrum, arguing that the latter often alienates engineers by ignoring core technical practices.

  • The Pragmatic Embedded Podcast · 36m

    Writing Firmware without Hardware (featuring Matt Chernosky)

    Matt Chernosky, author of 'A Field Manual for Ceedling', explains how to write and test embedded C firmware on a host PC using Ceedling, Unity, and CMock to enable rapid Test-Driven Development (TDD). He argues that removing hardware dependencies allows for instant feedback loops, better architecture through hardware abstraction layers, and easier continuous integration. The discussion covers strategies for introducing TDD to legacy codebases, the role of automated unit tests in medical device compliance, and the importance of testing high-risk, changing code rather than aiming for 100% coverage.

  • The Pragmatic Embedded Podcast · 42m

    TDD for UI

    Jeff Gable and Luca discuss how to apply Test Driven Development (TDD) to user interfaces for embedded systems, specifically addressing a listener's struggle with the GTKmm framework in a medical device context. They argue that UI frameworks should be treated like hardware—abstracted away via thin shim layers—so that business logic remains unit-testable. The hosts advise against automating UI tests due to brittleness, recommending instead a combination of rigorous unit testing for logic, automated integration tests via serial interfaces, and periodic manual exploratory testing for the UI.

  • The Pragmatic Embedded Podcast · 55m

    BDD with Steve Branam

    Steve Branam, an embedded software veteran with 40 years of experience including work on iRobot Roombas and automotive systems, explains how Behavior Driven Development (BDD) provides a disciplined layer on top of Test Driven Development (TDD) to avoid brittle tests. He details the Given-When-Then structure, the use of spies and test doubles to handle hardware interactions off-target, and strategies for testing state machines and system-level behaviors. Branam argues that BDD is applicable at all levels of embedded development, from unit tests to system integration, by using abstraction layers to isolate business logic from hardware dependencies.

The summary, chapters and topics are generated from the episode’s audio by this directory, not written by Embedded.fm. The episode itself belongs to its publisher.