Test-Driven Development for Embedded C/C++

Embedded TDD C++

Test-Driven Development is an important design and problem solving technique that helps software developers improve product quality and the quality of their life. How? By preventing defects and by giving you warning when your design starts to deteriorate.

This tutorial describes the problems addressed by TDD, as well as the additional challenges and benefits of applying TDD to C, C++ and embedded software. This class is not just a show and tell. Bring your laptop with wifi access and a web browser. You will code.

You will experience the cadence of Test-Driven Development. You will see how it makes sure you know what your code is doing. We'll explore the benefits of test-driving your code. You will test-drive code with dependencies using open source tools CppUTest and CppUMock.

If you've heard of TDD and not tried it, this tutorial is a great place to discover what it is and how it can help you . Exercises are done on a custom version of cyber-dojo.org hosted in the cloud. No computer setup is needed.

Audience
Embedded Software Developers
Software Developers
Technical team leaders
Managers that want to know more about the technology they manage (and ready to have some fun coding)

Prerequisites
Some knowledge of C or C++
Bring a computer with a modern web browser
Exercises are done on a custom version of cyber-dojo

Course Outline

  • Test Driven Development
    • Why Test Driven Development?
    • What is Test Driven Development?
    • The Microcycle
    • Exercise
  • Adapting TDD to Embedded Software Development
    • Leveraging the Development System
    • Risks of Development System Unit Testing
    • Embedded TDD Cycle
    • Hardware/Platform Independence
  • Testable Designs
    • Object Oriented Principles Applied to C
    • TDD and Collaborating Modules - testing the code in the middle
  • Test Fakes, Stubs, Doubles, Mocks
    • Spying on the Hardware
    • Faking the Time
    • Link-time Fake
    • Exercise
  • Keeping Tests Clean
    • Test Smells
    • Tests as Detailed Documentation
    • Exercise
  • Test-Driving Next to the Silicon With Mock Objects
    • The Problem Solved by Mock Objects
    • TDD One Instruction Away from the Hardware
    • Exercise
  • Test-Driving With Mock Objects
    • The Problem Solved by Mock Objects
    • Setting Expectations
    • Exercise

Tid

09:00 - 17:00