pytest-embedded-serial-esp
Make pytest-embedded plugin work with Espressif target boards.
What it is and what it does
pytest-embedded-serial-esp is a pytest plugin that extends pytest with fixtures and services designed for testing embedded systems, particularly Espressif target boards. It provides a Dut (Device Under Test) fixture that allows you to interact with connected devices via serial communication, send commands, and verify output using pattern matching with exact strings or regex patterns. The plugin integrates with esptool for automatic target and port detection, streamlining the setup process for embedded test workflows.
The package is part of a larger pytest-embedded ecosystem that supports multiple services (serial, ESP-IDF, JTAG, QEMU, and others) via optional dependencies. It's actively maintained, supports modern Python versions (3.10 through 3.14), and is classified as production-stable. The low install friction and permissive MIT license make it accessible for both open-source and commercial embedded testing projects.
Use it for:
- Automated testing of firmware running on Espressif target boards with serial output verification
- Integration testing that validates device behavior by sending commands and checking responses over serial
- CI/CD pipelines for embedded projects that need to run tests on real hardware or emulated targets
- Regression testing of embedded applications by capturing and pattern-matching device console output
- Multi-device testing scenarios where you need to coordinate tests across several connected boards
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that provides fixtures and services for testing embedded systems, particularly Espressif target boards, with serial port communication and device detection via esptool.
Yes, if you are testing Espressif embedded systems. The plugin is actively maintained, has no known vulnerabilities, installs with low friction, and provides a mature pytest integration (Production/Stable status) specifically designed for this use case. The permissive MIT license and support for current Python versions make it a solid choice for embedded test automation.
Install
pytest-embedded-serial-esp on PyPI
pip
pip install pytest-embedded-serial-espuv
uv add pytest-embedded-serial-esppoetry
poetry add pytest-embedded-serial-espInstalling pytest-embedded-serial-esp
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release and active repository status.
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-serial-esp
from pytest_embedded import Dut
def test_device(dut: Dut):
dut.expect('expected_output')
Requires Python 3.10 or later. Runtime dependencies pytest-embedded-serial and esptool must be installed.
Verify before relying
- Whether serial port hardware or a virtual serial device is required for tests to run
- Compatibility with different operating systems beyond the 'OS Independent' classifier claim
- Performance characteristics when running tests on multiple devices simultaneously
- Specific microcontroller models supported beyond Espressif devices
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pytest-embedded-serial, esptool |
| Maintenance | actively maintained — 59 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 127,201/month — #11,751 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_embedded_serial_esp-2.8.1-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-embedded-idfA pytest plugin that integrates ESP-IDF…
permissive · top 15,000 on PyPI
pytest-embedded-serialA pytest plugin that enables serial port…
permissive · top 15,000 on PyPI
pytest-embedded-qemuA pytest plugin that runs embedded system tests…
permissive · top 15,000 on PyPI
esptoolesptool is a serial utility for flashing,…
copyleft · top 5,000 on PyPI
pytest-embeddedA pytest plugin that provides fixtures and…
permissive · top 15,000 on PyPI
pytest-embedded-jtagAdds JTAG debugging utilities to…
permissive · top 15,000 on PyPI
esp-pylibProvides shared logging, error handling,…
permissive · top 15,000 on PyPI
pytest-deadfixturesA pytest plugin that identifies unused and…
permissive · top 5,000 on PyPI
esp-idf-monitorProvides serial communication monitoring and…
permissive · top 15,000 on PyPI
esp-coredumpRetrieves and analyzes core dumps from ESP32…
permissive · top 5,000 on PyPI