skillfed

pytest-embedded-qemu

Make pytest-embedded plugin work with QEMU.

pytest-embedded-qemu v2.8.1 143.3K downloads/30d#11,181 on PyPI151
Permissive license Active released

What it is and what it does

pytest-embedded-qemu is a pytest plugin that extends pytest-embedded to run embedded system tests on QEMU emulation instead of physical target hardware. It provides a qemu fixture that manages the emulated environment and duplicates output to pexpect_proc for test assertion. When pytest-embedded-idf is also installed, the plugin can automatically generate bootable QEMU images from built binaries, streamlining the test setup workflow.

The package targets developers testing embedded firmware and bootloader code who want to avoid hardware dependencies during development and CI/CD. It sits between pytest-embedded and qemu.qmp, handling the glue logic to make QEMU behave as a pytest fixture. With active maintenance and support for modern Python versions, it's designed for teams building embedded systems.

Use it for:

  • Run firmware unit tests in CI/CD pipelines without requiring physical hardware boards
  • Develop and test bootloader code locally using QEMU before flashing to real devices
  • Automate integration tests for embedded applications with reproducible QEMU environments
  • Generate bootable QEMU images automatically from build artifacts when using pytest-embedded-idf
  • Debug embedded code interactively by capturing QEMU output in pytest assertions

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A pytest plugin that runs embedded system tests on QEMU instead of physical hardware, with optional integration for building bootable images when pytest-embedded-idf is available.

Yes, if you're testing embedded systems with pytest and want to avoid hardware dependencies. The package is actively maintained, has low install friction, uses a permissive license, and integrates cleanly with pytest-embedded. Install only if you have QEMU available on your system and are already using or planning to adopt pytest-embedded for your test suite.

Install

pytest-embedded-qemu on PyPI

pip

pip install pytest-embedded-qemu

uv

uv add pytest-embedded-qemu

poetry

poetry add pytest-embedded-qemu

Installing pytest-embedded-qemu

Before you install

Low friction install with active maintenance. Last commit 2026-08-10, released 59 days ago. Supports modern Python versions with only two runtime dependencies.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install pytest-embedded-qemu

import pytest

@pytest.mark.usefixtures('qemu')
def test_on_qemu(qemu):
    # Test runs on QEMU instance
    pass

Requires Python 3.10 or later. QEMU must be installed on the system for the fixture to function.

Verify before relying

  • Whether pytest-embedded-idf integration is required or optional for most use cases
  • How the pexpect_proc duplication affects test output and debugging workflows
  • Performance characteristics and typical test execution time overhead versus real hardware

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, qemu.qmp
Maintenance actively maintained — 59 days since the last release
Last repo commit
First released
Downloads 143,293/month — #11,181 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytest_embedded_qemu-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 qemu testingembedded system testing qemupytest fixture qemu emulationhardware testing without deviceqemu bootable image testing
embedded-systemsqemu-testingci-cd

More Testing packages