Introduction to Unit Testing in Embedded Software

Unit testing is known as one of the most effective software practices. Developers who write unit tests have less bugs, fix those bugs faster, and speed up development as a whole. In embedded software, with limited resources, and complex tools, unit testing becomes even more important.

This course will introduce unit testing tools in the embedded C/C++ environment. Attendees will practice the needed techniques to start testing both new and existing code.

The course is intended for: C/C++ developers and team leaders.

Course goals

Following the workshop, attendees will be able to:

  • Use unit testing tools with existing dev tools
  • Write unit tests in C/C++
  • Refactor code to make it more testable
  • Mock different kinds dependencies
  • Include tests in automated builds

Course agenda

  • What are unit tests and how they compare to other types of tests
  • Pros and cons
  • C/C++ unit testing frameworks (GoogleTest and others)
  • Manual mocking
  • C/C++ mocking frameworks (FakeIt and others)
  • Using unit tests in automated builds
  • Unit testing in an embedded environment best practices
  • Introduction to Test Driven Development