Pytest Tests in Twister
summary
Adds a pytest executor plugin to Twister that actually runs pytest subprocesses, flashes or connects to targets, and returns results as junit XML so Twister parses them like other tests. Implements a device adapter abstraction so the same device-type agnostic tests run on hardware, QEMU or native POSIX. Ships fixtures for shell I/O, an MCU-based bootloader downgrade check using MCU manager, and a full LwM2M end‑to‑end interop case using a Docker server; the integration is working but adoption and multi-image/multi-device reuse remain limited.
AI-written summary · about
chapters (20)
- 0:00pytest in Twister intro
- 1:02Integrating pytest with Twister
- 3:08pytest framework features
- 4:56Fixtures as core building blocks
- 6:44pytest-Twister integration
- 9:16Device adapters for hardware
- 11:44pytest fixtures examples
- 14:13Shell test demo
- 16:27MCU boot test with downgrade
- 20:46LWM2M interoperability test
- 25:27Future plans and challenges
- 27:32Summary of integration
- 29:38Q&A reliability testing
- 31:26Q&A simulation and shell backends
- 33:36Q&A stress and hardware testing
- 35:02Q&A server setup and cellular devices
- 36:51Q&A hardware execution and sequencing
- 39:39Q&A pytest execution and flashing
- 41:04Q&A extending device adapter
- 42:31Closing remarks
related talks
43mPytest Tests in Twister
35mTwister: A Test Utility for Contributors
23mTwister V2: New Framework for Testing Based on Pytest. Overview & Current Status
49mHarnessing the Twister: Zephyr Data-Driven Testing and Insights
49mHarnessing the Twister: Zephyr Data-Driven Testing and Insights
20mIntroduction To Twister and Adding Support for Hardware Runners
35mTesting: Choose Your Weapons
44mTest Strategy for Zephyr
