Skip to main content

Continuous Integration for Embedded Hardware

Project description

BenchCI

Documentation PyPI Early Access Hardware CI Embedded License

Continuous Integration for real embedded hardware.

Build firmware in CI, flash a real device, run hardware tests, and get structured logs, failure explanations, and evidence reports back automatically.


🎥 Demo

Watch BenchCI run real hardware tests directly from CI:

BenchCI Demo

STM32 + Raspberry Pi + GitHub Actions
No simulation. Real device.


🧪 What this demo shows

  • CI pipeline builds firmware
  • BenchCI schedules a real hardware bench
  • Device is flashed automatically
  • Tests run on actual hardware
  • Results, logs, artifacts, and evidence are returned to CI/dashboard

👉 No simulation. No mocks. Real hardware in the loop.


Why BenchCI?

Most embedded testing still looks like this:

  1. build firmware
  2. flash the board manually
  3. open a serial terminal
  4. send a command
  5. read logs by hand
  6. copy results into a ticket or release note
  7. repeat after every change

That works for one engineer at one desk.

It breaks when you need repeatable validation, shared benches, CI pipelines, release gates, traceable evidence, or remote teams.

BenchCI turns real hardware into a CI-executable test target.


Quickstart

pip install benchci
benchci login
benchci doctor
benchci run -b bench.yaml -s suite.yaml -a build/fw.elf

BenchCI will:

  • flash firmware
  • execute your test suite on real hardware
  • validate device behavior
  • explain common failures with structured context
  • generate structured results, logs, and evidence artifacts

Create or access your workspace from:

https://app.benchci.dev

Read the docs:

https://docs.benchci.dev

The core idea

BenchCI separates the physical bench from the test logic:

bench.yaml  -> hardware setup
suite.yaml  -> test steps and optional traceability
benchci run -> real hardware execution

A run produces artifacts such as:

results.json
evidence.json
evidence.html
metadata.json
inputs/bench.yaml
inputs/suite.yaml
flash logs
transport logs
GPIO/power logs

What BenchCI can automate

BenchCI can:

  • flash firmware with OpenOCD, STM32CubeProgrammer, J-Link, or esptool
  • talk to devices over UART, Modbus RTU/TCP, and CAN
  • control GPIO locally or through a remote Agent
  • control relay-backed power workflows
  • run local tests on a hardware-connected machine
  • run remote tests through a customer-managed Agent
  • run cloud-scheduled tests through BenchCI Cloud
  • return artifacts, logs, structured results, and evidence reports to CI
  • show run history, failure context, traceability, and evidence in the dashboard

Better failure output

BenchCI does not only return “failed.”

When possible, failures include:

category
title
message
explanation
suggested checks
failed step
related artifacts
raw error

Example:

UART expectation failed
BenchCI did not observe the expected UART output.

Suggested checks:
- Check the UART port in bench.yaml.
- Check baud rate, TX/RX wiring, and common ground.
- Confirm the firmware prints the expected text.
- Open the transport log artifact.

This makes hardware CI failures easier to debug from the CLI, artifacts, and dashboard.


Evidence reports and traceability

Every run can generate structured evidence for QA, release, and audit-friendly workflows.

Evidence includes:

  • firmware filename and SHA256
  • bench configuration hash
  • suite hash
  • Git commit, branch, remote, and dirty state
  • CI provider and CI job URL when available
  • run status and summary
  • structured failure details
  • input snapshots
  • artifact list

Suites can optionally include traceability metadata:

version: "1"

suite:
  name: firmware_smoke
  version: "1.0.0"
  release_id: "fw-0.3.5"
  requirement_ids:
    - REQ-BOOT-001
  risk_ids:
    - RISK-BOOT-001
  tags:
    - smoke
    - hardware

tests:
  - name: boot_ok
    test_case_id: TC-BOOT-001
    requirement_ids:
      - REQ-BOOT-001
    risk_ids:
      - RISK-BOOT-001
    tags:
      - uart
    steps:
      - expect_uart:
          node: dut
          transport: console
          contains: "[BOOT] OK"
          within_ms: 3000

This creates a practical chain:

requirement -> test case -> real hardware run -> evidence artifact

BenchCI helps produce structured verification evidence. It does not by itself certify a product or replace your company’s compliance process.


Simple suite.yaml

Traceability is optional. A minimal suite can stay simple:

version: "1"

suite:
  name: firmware_smoke

tests:
  - name: boot_ok
    steps:
      - expect_uart:
          node: dut
          transport: console
          contains: "[BOOT] OK"
          within_ms: 3000

  - name: ping
    steps:
      - send_uart:
          node: dut
          transport: console
          data: "PING\n"

      - expect_uart:
          node: dut
          transport: console
          contains: "PONG"
          within_ms: 1000

Run it:

benchci run -b bench.yaml -s suite.yaml -a build/fw.elf

Diagnostics

Use benchci doctor before running on hardware:

benchci doctor
benchci doctor --ports
benchci doctor --usb
benchci doctor --tools
benchci doctor --bench bench.yaml

Doctor helps identify:

  • available serial ports
  • USB devices such as ST-Link, USB-UART, USB-RS485, and relays
  • GPIO chips on Linux machines
  • missing tools such as OpenOCD, J-Link, STM32CubeProgrammer, or esptool
  • bench.yaml references that do not match the local machine

This is especially useful when creating or debugging bench.yaml.


CI example

benchci run --cloud --bench-id my-bench --suite suite.yaml --artifact build/fw.elf --verbose

Typical flow:

GitHub Actions / GitLab CI
        ↓
BenchCI CLI
        ↓
BenchCI Cloud
        ↓
Cloud-connected Agent
        ↓
Real hardware
        ↓
Results + logs + evidence

Cloud runs can be inspected from:

https://app.benchci.dev

The dashboard shows:

  • workspace health
  • online/offline benches
  • queued/running runs
  • recent failures
  • run timeline
  • structured failure context
  • evidence summary
  • requirement/test/risk traceability
  • artifact download

Examples

The public examples are designed to be mixed:

  • simple examples for learning the basic model
  • moderate examples for realistic hardware flows
  • traceability examples for evidence-oriented workflows

Current example folders:

examples/
├── 01-esp32-esptool-uart-traceable
├── 02-modbus-rtu-plc-simple
├── 03-modbus-tcp-gateway-traceable
├── 04-gateway-jlink-provisioning-moderate
├── 05-local-gpio-reset-ready-advanced
├── 06-multi-node-uart-simple
├── 07-remote-gpio-power-cycle-moderate
├── 08-can-ecu-handshake-simple
└── 09-stm32wl-boot-validation-traceable

Each folder contains:

bench.yaml
suite.yaml

Use them as templates and replace hardware-specific values such as ports, IP addresses, GPIO lines, probe serials, and firmware paths.


Documentation path

Start here:

  1. Installation
  2. Quickstart
  3. End-to-End Example
  4. Evidence Reports
  5. GitHub Actions
  6. GitLab CI

Then use the reference docs for bench.yaml, suite.yaml, CLI commands, Agent, Cloud Mode, GPIO, architecture, dashboard, examples, and security.


Early access

BenchCI is currently in early access.

For onboarding, pilots, or managed hardware demos:

tech@benchci.dev

No simulation. Real device.

BenchCI is for teams that want automated validation on the hardware they actually ship.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

benchci-0.5.0.tar.gz (97.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

benchci-0.5.0-py3-none-any.whl (110.8 kB view details)

Uploaded Python 3

File details

Details for the file benchci-0.5.0.tar.gz.

File metadata

  • Download URL: benchci-0.5.0.tar.gz
  • Upload date:
  • Size: 97.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for benchci-0.5.0.tar.gz
Algorithm Hash digest
SHA256 f3a1ce1d9f3ff850d420aec3b2de81412cbd38c239a5f13cfc6ade9c41790669
MD5 26a4db17f1504ab6f9b465ec7613199a
BLAKE2b-256 cbdf2dc4158508da6d7e1ca6d2b73c64dfbe8012d6555c1ee5ef6ad5f2ac3f4c

See more details on using hashes here.

File details

Details for the file benchci-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: benchci-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 110.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for benchci-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a590772af810a1af21e59f8e1758cc8dabaca378668d333dc94d5f420b323e3b
MD5 723571a5856ecbe5ee65da490a7c4168
BLAKE2b-256 53f0466b8a3ff08763f23dcd3d5eeda38d54166937c3d38d225b261a1c3d289d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page