pytest-embedded
A pytest plugin that designed for embedded testing.
Decision gist · record as of 2026-08-14
Yes, if you are testing embedded systems or microcontroller firmware. Low install friction, active maintenance, permissive license, and no known vulnerabilities make it a safe choice. The plugin integrates cleanly with pytest and offers both basic serial interaction and advanced services for specialized workflows. Not relevant for non-embedded testing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; some services (serial, esp, idf, jtag, qemu, arduino, wokwi, nuttx) require optional dependencies installed separately.
- Low friction install with only three runtime dependencies (pytest, pexpect, filelock).
- Actively maintained with a recent release 59 days ago and ongoing repository activity.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) means you can use this freely in commercial and private projects with minimal restrictions.
last release 2026-06-16 (59 days) · last repo commit 2026-08-10 · 151 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 88,855 downloads/mo, #13,698 on PyPI
Alternatives
Verify before relying
pip install pytest-embedded
from pytest_embedded import Dut
def test_basic(dut: Dut):
dut.expect('expected_output')
dut.expect_exact('exact_match')- Whether optional service dependencies are automatically installed or must be added manually.
- Performance characteristics when running large test suites or interacting with slow serial devices.
- Compatibility with non-Espressif embedded platforms beyond the documented services.
- Specific target platforms and microcontroller families supported by the esp and idf services.
What it is and what it does
pytest-embedded is a pytest plugin designed to simplify testing of embedded systems and microcontroller projects. It provides a Dut (Device Under Test) fixture that wraps interaction with embedded devices, offering expect-style pattern matching (exact matches, regex patterns) and output redirection. The plugin integrates with pytest's test discovery and reporting, letting you write embedded tests as ordinary pytest functions.
The plugin ships with a core set of fixtures and can be extended via optional services—serial port utilities, device auto-detection, integration with build systems, JTAG/GDB support, and simulation backends like QEMU and Wokwi. Services are activated via command-line flags and require their corresponding optional dependencies. It targets modern Python (3.10+) and is actively maintained.
Use it for
- Test firmware by flashing binaries and validating serial output patterns with expect-style matching.
- Automate interaction with embedded devices over serial ports using exact and regex pattern matching.
- Run embedded test suites in CI/CD pipelines with QEMU or Wokwi simulation instead of physical hardware.
- Validate firmware behavior across multiple target platforms with a unified test interface.
- Capture and assert on device output in real time during development and regression testing.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are testing embedded systems or microcontroller firmware.
Low install friction, active maintenance, permissive license, and no known vulnerabilities make it a safe choice. The plugin integrates cleanly with pytest and offers both basic serial interaction and advanced services for specialized workflows. Not relevant for non-embedded testing.
Install
pytest-embedded on PyPI
Before you install
Low friction install with only three runtime dependencies (pytest, pexpect, filelock). Actively maintained with a recent release 59 days ago and ongoing repository activity.
Requires Python 3.10 or later; some services (serial, esp, idf, jtag, qemu, arduino, wokwi, nuttx) require optional dependencies installed separately.
License in practice
MIT license (permissive) means you can use this freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pytest-embedded
from pytest_embedded import Dut
def test_basic(dut: Dut):
dut.expect('expected_output')
dut.expect_exact('exact_match')
Verify before relying
- Whether optional service dependencies are automatically installed or must be added manually.
- Performance characteristics when running large test suites or interacting with slow serial devices.
- Compatibility with non-Espressif embedded platforms beyond the documented services.
- Specific target platforms and microcontroller families supported by the esp and idf services.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespytestpexpectfilelock |
| Maintenance | Actively maintained 59 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 88,855 / month, #13,698 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Testing |
Evidence: pytest_embedded-2.8.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “device interaction testing”
- pytest-embeddedA pytest plugin that provides fixtures and services for testing…
- pytest-embedded-serialA pytest plugin that enables serial port testing for embedded…
- uiautomatorPython wrapper for Android's uiautomator testing framework that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pytest-embedded-qemu · pytest-embedded-serial · pytest-embedded-jtag · pytest-embedded-serial-esp · pytest-embedded-idf · pytest-deadfixtures · esptool · imgtool · esp-idf-monitor · pioarduino