skillfed

pytest-embedded-serial-esp

Make pytest-embedded plugin work with Espressif target boards.

pytest-embedded-serial-esp v2.8.1 127.2K downloads/30d#11,751 on PyPI151
Permissive license Active released

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-esp

uv

uv add pytest-embedded-serial-esp

poetry

poetry add pytest-embedded-serial-esp

Installing 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

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

Tags

pytest embedded testingespressif board testingserial port pytestembedded systems testingesp device testingpytest fixtures embeddeddevice communication testing
embedded-systemsespressifhardware-testing

More Testing packages