{"library":"pytest-embedded-qemu","title":"Pytest Embedded QEMU Plugin","description":"pytest-embedded-qemu is a plugin for the pytest-embedded framework that enables running embedded tests on QEMU instead of actual hardware targets. It extends pytest-embedded with QEMU-specific functionalities, allowing for automated creation of QEMU bootable images and handling device output. It is currently at version 2.7.0 and is actively maintained with a regular release cadence as part of the broader `pytest-embedded` ecosystem by Espressif Systems.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install pytest-embedded-qemu","pip install -U 'pytest-embedded~=2.0' pytest-embedded-qemu"],"cli":null},"imports":["from pytest_embedded import Dut","from pytest_embedded_qemu.qemu import Qemu","from pytest_embedded_qemu.app import QemuApp"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pytest\nfrom pytest_embedded import Dut\n\ndef test_qemu_basic(dut: Dut):\n    # This test requires QEMU to be running the target application.\n    # The 'dut' fixture provides access to the QEMU's console output.\n    # Run with: pytest --embedded-services qemu\n    print(f\"QEMU DUT received: {dut.read_until_timeout(1)}\")\n    dut.write(\"hello from pytest\\n\")\n    dut.expect_exact(\"hello from pytest\")\n    print(\"Successfully communicated with QEMU DUT\")","lang":"python","description":"This quickstart demonstrates a basic test using the `dut` fixture provided by `pytest-embedded`, configured to interact with a QEMU instance. To run this test, save it as a Python file (e.g., `test_qemu.py`) and execute `pytest --embedded-services qemu` in your terminal. You will also need a QEMU-compatible application to run in the simulated environment.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}