https://github.com/islandcontroller/cutest
C Unit-Testing Framework for Embedded Applications
https://github.com/islandcontroller/cutest
cutest docker-image eclipse-cdt embedded-c unit-testing
Last synced: about 2 months ago
JSON representation
C Unit-Testing Framework for Embedded Applications
- Host: GitHub
- URL: https://github.com/islandcontroller/cutest
- Owner: islandcontroller
- License: mit
- Created: 2023-04-22T17:15:50.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-02T20:46:06.000Z (almost 3 years ago)
- Last Synced: 2025-06-13T10:51:51.361Z (about 1 year ago)
- Topics: cutest, docker-image, eclipse-cdt, embedded-c, unit-testing
- Language: C
- Homepage: https://hub.docker.com/r/islandc/cutest
- Size: 41 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cutest
[](LICENSE) [](https://github.com/islandcontroller/cutest) [](https://hub.docker.com/r/islandc/cutest) 
*A lightweight C Unit-Testing Framework for Embedded Applications.*
This framework targets 32-bit, MCU-based embedded application projects written in native C, which already use the *Eclipse Embedded CDT* in their development workflow. It is a powerful tool for test-driven design and other *testing-while-coding* workflows.
> Testing code *right in the process of writing it* will not only reassure developers of their code "*actually working*", but will also decrease the chance of obscure, difficult-to-reproduce bugs finding their way into a finished product undetected.
Have a look at the [**Example Project**](https://github.com/islandcontroller/cutest-example) to get started, and use the provided [**Template Project**](https://github.com/islandcontroller/cutest-template) for setting up new test projects.
### Highlighted Features
* Pure C implementation
* 32-bit MCU target architecture
* Test-cases inlined with application source code
* Super fast test-runs, directly from within Eclipse
* Error-parser compatible failure reporting
* Can be configured to run-on-save
* Simple HTML report for documentation
## System requirements
* Docker Engine (running on WSL2, see [notes](#notes) below)
* Eclipse Embedded CDT (Version 11.0 or newer) with Docker Tooling
## Notes
* For running Docker Engine on WSL2, make sure to add the project drive letter as a path mapping to the build configuration, e.g.: `C:|/mnt/c/`. This is already prepared in the template.
* Sometimes Eclipse will not automatically update the header file cache from the Docker container. Usually this is noticed by syntax error markup on all test case and module definitions. To fix this, temporarily de-select "Build inside Docker Image" in project properties. Apply changes, re-enable the container build and apply again.
* Use `#include ".c"` at the top of your test modules to avoid duplicating application source files into the testing project.
* Define stub interfaces for your instrumented modules to simplify testing of dependent modules. Use `#include .inc` to inline the stub source with the test module.
## Acknowledgements
This implementation originates from a heavily customized fork of Asim Jalis' [CuTest](https://cutest.sourceforge.net/), which had proven itself very useful in my development workflow.
## Licensing
Unless stated otherwise, the contents of this project are licensed under the MIT License. The full license text is provided in the [`LICENSE`](LICENSE) file.
SPDX-License-Identifier: MIT