search the lab

Embedded Testing with Unity & CMock (by Mark)

Embedded Testing with Unity & CMock

James Grenning's book (features Unity)

Test Driven Development for Embedded C


Entries in Unit (1)


Comparing Unit Test Frameworks

Our goal is to help you find the right fit for your needs. If that's not our particular tools, it does neither of us any good for us to try to oversell our goods. Here's a comparison to other frameworks that seem popular. If there are any errors or omissions that are noteworthy, just let us know:

FeatureUnityCppUTestGoogle TestCuTestCheckMinUnitCMockery
Can MockC(1)CC++nononoC
Auto Runners(2)YESnoYESnononoYES
Type-Specific Asserts?YESnoYESnononono
Memory Leak Detect?noYESYESnononoYES


  • (1) via CMock.
  • (2) frameworks without this feature require you to manually add each test to some sort of central list or function. Each time you forget, a test gets missed.
  • (3) relies on posix forking, making it unsuitable for many embedded targets.
  • (4) uses C++, but still intended to test C.