ceedling, unity and cmock logo

ceedling, unity and cmock

Free

Unit testing, mocking and build framework written in C with ruby for generating and building.

FreeFree tier
Type
Open Source

About ceedling, unity and cmock

Throw The Switch is a community for C developers offering open source testing tools: Unity (unit testing framework), CMock (mock and stub framework), and Ceedling (build/test automation). Unity is a powerful collection of functions and macros for unit testing in C, suitable for projects from tiny embedded microcontrollers to 64-bit systems. CMock automatically generates mocks from header files for interaction testing. Ceedling integrates these tools, automating test and release builds, collecting results, and connecting to quality tools. The community provides forums, documentation, GitHub issues, books, articles, and professional support through an online course and ThingamaByte consulting.

Key Features

Unity: a lightweight unit testing framework for C with a rich set of macros and functions
CMock: automatic mock/stub generation from C header files for interaction testing
Ceedling: build and test automation tool that integrates Unity and CMock
Supports a wide range of platforms from embedded microcontrollers to 64-bit systems
Open source and free to use
Community support via forums, documentation, and GitHub issues
Professional support and online course available

Pros & Cons

Pros
  • Free and open source
  • Lightweight: Unity consists of a single C file and two headers
  • Works across platforms from tiny embedded to 64-bit
  • Seamless integration of testing and build automation
  • Active community with forums and documentation
  • Professional support and training available for teams
Cons
  • Primarily designed for C language (not C++)
  • Ceedling requires Ruby runtime for build automation

Best For

Unit testing C code in embedded systemsTest-driven development (TDD) for C projectsCreating mock objects for dependency injection in CAutomating test builds and continuous integration pipelinesTesting on diverse platforms including microcontrollers and desktop systems

FAQ

What is Unity?
Unity is a unit testing framework for C, consisting of a single C file and headers, suitable for embedded to 64-bit systems.
What is CMock?
CMock is a mock and stub framework that automatically generates mock interfaces from C header files for interaction testing.
What is Ceedling?
Ceedling is a build and test automation tool that integrates Unity and CMock, automates test/release builds, collects results, and connects to quality tools.
How can I get started with these tools?
Visit the ThrowTheSwitch website for getting started guides for Unity, CMock, and Ceedling. The community forums and documentation provide additional support.
Is professional support available?
Yes, there is an online course for TDD with these tools, and ThingamaByte offers professional consulting for setup, best practices, and plugin development.