Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Embedded Testing Awesome

Tools, frameworks, and resources for testing embedded and low-level software, covering unit testing, mocking, hardware simulation, static and dynamic analysis, continuous integration, and hardware-in-the-loop automation.

Awesome Embedded Testing logo

Contents

Test Frameworks

Rust Test Frameworks

  • embedded-test - Rust test harness and runner for embedded devices.
  • defmt-test - Rust test harness that lets you write and run unit tests on your device as if using the built-in #[test] attribute.

General Embedded Testing Frameworks

  • Ceedling/Unity - Popular C-based unit testing and build framework, great for small to medium-sized embedded projects.
  • GoogleTest - Widely used and highly customizable C++ testing framework, commonly adopted in embedded C++ projects.
  • CppUTest - C and C++ testing framework tailored specifically to embedded software, emphasizing memory safety and simplicity.
  • Catch2 - Modern C++ testing framework known for ease of use and expressive assertions, lightweight enough for embedded targets.

Mocking and Hardware Simulation

  • CMock - Generates mock objects automatically for C, ideal for testing interactions with hardware-dependent code.
  • Fake Function Framework (FFF) - Lightweight, simple mocking framework for C-based embedded software.
  • Renode - Multi-architecture framework for hardware simulation and testing, allowing execution and debugging of embedded binaries without actual hardware.
  • QEMU - Widely adopted open-source emulator, very useful for full-system simulation of embedded platforms during testing.
  • embedded-hal-mock - Mocks for testing Rust embedded-hal based drivers without hardware access.

Continuous Integration

  • PlatformIO - Cross-platform build tool and package manager, ideal for automating builds and tests for embedded projects.
  • Embench - Open-source benchmarking suite specifically targeting IoT-class embedded systems.
  • Robot Framework - Generic Python-based acceptance-test automation framework, commonly used for higher-level integration and system tests.

Static and Dynamic Analysis

  • Cppcheck - Popular static analysis tool specifically tailored for C and C++ codebases.
  • Valgrind - Dynamic analysis tool useful for memory leak detection and error tracking.
  • Clang Sanitizers - Effective runtime debugging tools for detecting memory safety errors in embedded C and C++ applications.

Embedded-Specific Techniques and Tools

  • Embedded Artistry's Embedded Resources - Curated resources and examples for best practices in embedded software testing.
  • Tracealyzer - Real-time trace visualization for debugging and performance analysis of embedded systems (commercial with free tiers).

Test Automation and Hardware-in-the-Loop

  • Labgrid - Python-based automation framework for hardware-in-the-loop testing, integrates smoothly with continuous integration.
  • OpenHTF - Python hardware testing framework from Google designed for automated manufacturing tests and hardware-in-the-loop testing.
  • OnMCU - CLI for remote MCU development, flashing, and testing on real hardware hosted on the OnMCU platform.
  • SiliconRig - CLI, Python SDK, and GitHub Action for flashing and testing firmware on real boards (ESP32-S3, STM32, RP2350) hosted on the SiliconRig platform.

Examples and Reference Projects

  • NASA JPL's F Prime - NASA's open-source C++ flight software framework, extensively tested and validated.
  • LVGL - Embedded GUI library written in C, extensively using unit tests and automated integration testing.