Skip to main content

Make pytest-embedded plugin work with the Wokwi CLI.

Project description

pytest-embedded-wokwi

pytest-embedded service for running tests on Wokwi instead of the real target.

Wokwi supports most ESP32 targets, including: esp32, esp32s2, esp32s3, esp32c3, esp32c6, and esp32h2. In addition, it supports a wide range of peripherals, including sensors, displays, motors, and debugging tools.

Running the tests with Wokwi requires an internet connection. Your firmware is uploaded to the Wokwi server for the duration of the simulation, but it is not saved on the server. On-premises Wokwi installations are available for enterprise customers.

Wokwi CLI installation

The Wokwi plugin uses the Wokwi CLI to interact with the wokwi simulation server. You can download the precompiled CLI binaries from the releases page. Alternatively, on Linux or Mac OS, you can install the CLI using the following command:

curl -L https://wokwi.com/ci/install.sh | sh

And on Windows:

iwr https://wokwi.com/ci/install.ps1 -useb | iex

Wokwi API Tokens

Before using this plugin, you need to create a free Wokwi account and generate an API key. You can then set the WOKWI_CLI_TOKEN environment variable to the API key.

Linux / Mac OS / WSL:

export WOKWI_CLI_TOKEN="your-api-key"

Windows PowerShell:

$env:WOKWI_CLI_TOKEN="your-api-key"

Usage

To run your tests with Wokwi, make sure to specify the wokwi service when running pytest, e.g.:

pytest --embedded-services idf,wokwi

To limit the amount of simulation time, use the --wokwi-timeout flag. For example, to set the simulation time limit to 60 seconds (60000 milliseconds):

pytest --embedded-services idf,wokwi --wokwi-timeout=60000

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_embedded_wokwi-1.16.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

pytest_embedded_wokwi-1.16.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file pytest_embedded_wokwi-1.16.2.tar.gz.

File metadata

  • Download URL: pytest_embedded_wokwi-1.16.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for pytest_embedded_wokwi-1.16.2.tar.gz
Algorithm Hash digest
SHA256 db97d0da98dd0c571f52a739f2e65782caa890f5ea62de8e7c310e673fd24e91
MD5 173f2efe201ec295a341642a7d03c638
BLAKE2b-256 98faa78c04a60c76e3ea8c6717ea8c7cb791c7bf1d1211bb0a765b29e4e16068

See more details on using hashes here.

File details

Details for the file pytest_embedded_wokwi-1.16.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_embedded_wokwi-1.16.2-py3-none-any.whl
Algorithm Hash digest
SHA256 22ef604df83e5823a4c0bc984f660077a4bb3b464d81a3d62ff6105a6842ddbf
MD5 790d7d88379fb310c41328d49bdd33c3
BLAKE2b-256 761d7f2c1e423c890435be97100947ad3064fc614935fa5f25066f1e89ed1cdd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page