Skip to main content
Use Embedder to add tests that prove a requirement, then rerun them the same way every time. Use your project’s existing test framework for logic. Add a hardware check when the result depends on the target, timing, power, or an electrical interface.

Choose the test

Record each test command and its expected result in EMBEDDER.md. Embedder reuses them in later requests.

Add a regression test

In Act mode, name the failure the test covers, the suite it belongs to, and what to run afterward:
Keep each test tied to a failure or a requirement. If a static analyzer is configured, ask Embedder to run it as well. See Static analysis.

Add a board smoke test

Name the board, the port or probe, the power setup, and the pass condition:
Programming and runtime are separate results. A missing marker is a failure, even when programming succeeded. See Flashing for the flash command and boot-capture limits, and UART for port settings.

Save a hardware script

A hardware script is a Python file under .embedder/hardware/ that you can rerun without starting a chat. Ask for setup, a bounded measurement, pass criteria, and cleanup:
Run the saved script from any of these places: embedder script takes a path relative to .embedder/hardware/. These options help in a test workflow: The command exits with 0 when the script passes, 1 when it fails, and 2 for a usage error. A script that exits normally without printing a result line also exits with 0, so print the result line in every test script.
If a run needs to install Python packages, the terminal asks you to confirm. When the command can’t ask, for example because another program started it, the install is refused and the run fails. Run each script once from an interactive terminal first.
See Hardware scripts for profiles, instrument helpers, and hardware cases.

Add instrument evidence

Give the channel assignments, sample rate, duration, trigger, and tolerance:
Follow the instrument’s guide for channel numbering, voltage limits, and trigger support: logic analyzer, oscilloscope, or power analyzer. Hardware scripts, including instrument captures, run in Act or Debug mode. Switch to Debug mode when the test needs GDB to inspect target state. For ETM instruction trace or source coverage, see Coverage and trace.

Run checks in the background or from scripts

  • From your own scripts: run embedder script <name>.py --json on the computer connected to the hardware. Check the exit code and parse the JSON result.
  • From GitHub or Slack: ask for builds, tests, and hardware checks through automation. The machine that runs the daemon needs the project’s toolchain, and any board the check uses must be connected to that machine.
  • Soak tests and long captures: ask Embedder to run the script in the background. The chat stays available while it runs. See Run longer checks.
A bounded loop started with /loop can’t run shell commands, builds, flashing, live captures, or GDB. With the Observe hardware workload, it can only read hardware status and serial output that is already buffered or saved. Use a hardware script for a repeated hardware sequence.

Review failures

For each failure, keep the command, firmware artifact, target, observed output, and the condition that failed. Fix the setup or the implementation, then repeat the same check. Ask Embedder to report skipped or unavailable tests explicitly, so a gap doesn’t read as a pass.
Last modified on November 13, 2026