All Projects → espressif → pytest-embedded

espressif / pytest-embedded

Licence: MIT license
A pytest plugin that designed for embedded testing

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to pytest-embedded

Pytest Clarity
A plugin to improve the output of pytest with colourful unified diffs
Stars: ✭ 209 (+422.5%)
Mutual labels:  pytest
pytest-playwright
Pytest plugin to write Playwright tests with ease. Provides fixtures to have a page instance for each individual test and helpful CLI options for headless browsers.
Stars: ✭ 14 (-65%)
Mutual labels:  pytest
pytest-kind
Mirror of pytest-kind: Test your Python Kubernetes app/operator end-to-end with kind and pytest
Stars: ✭ 16 (-60%)
Mutual labels:  pytest
Httprunner
One-stop solution for HTTP(S) testing, written in Python.
Stars: ✭ 2,628 (+6470%)
Mutual labels:  pytest
agent-python-pytest
Framework integration with PyTest
Stars: ✭ 86 (+115%)
Mutual labels:  pytest
web-ui
python+selenium+pytest+allure UI 自动化框架
Stars: ✭ 199 (+397.5%)
Mutual labels:  pytest
Pytest Chinese Doc
pytest 官方文档的中文翻译,但不仅仅是单纯的翻译,也包含自己的理解和实践。
Stars: ✭ 192 (+380%)
Mutual labels:  pytest
flask for startups
Flask boilerplate using a services oriented structure
Stars: ✭ 210 (+425%)
Mutual labels:  pytest
stock reminder bot
A twitter bot that reminds you of stock and crypto predictions
Stars: ✭ 25 (-37.5%)
Mutual labels:  pytest
pylint-pytest
A Pylint plugin to suppress pytest-related false positives.
Stars: ✭ 2 (-95%)
Mutual labels:  pytest
Pytest Selenium
Plugin for running Selenium with pytest
Stars: ✭ 246 (+515%)
Mutual labels:  pytest
ci-testing-python
Sample Microservice App in Python for Testing using pytest, uber/doubles, tox on CI servers like Jenkins and Travis CI using Docker + Docker-Compose for test environment.
Stars: ✭ 37 (-7.5%)
Mutual labels:  pytest
Semantic-Textual-Similarity
Natural Language Processing using NLTK and Spacy
Stars: ✭ 30 (-25%)
Mutual labels:  pytest
Pytest Qt
pytest plugin for Qt (PyQt4, PyQt5 and PySide) application testing
Stars: ✭ 210 (+425%)
Mutual labels:  pytest
pytest-reverse
Pytest plugin to reverse test order.
Stars: ✭ 20 (-50%)
Mutual labels:  pytest
Cookiecutter Cms
Python-centric Cookiecutter for Molecular Computational Chemistry Packages
Stars: ✭ 197 (+392.5%)
Mutual labels:  pytest
pytest-neo
Matrix has you...
Stars: ✭ 44 (+10%)
Mutual labels:  pytest
universe-topology
A universal computer knowledge topology for all the programmers worldwide.
Stars: ✭ 47 (+17.5%)
Mutual labels:  pytest
pytest-envvars
Pytest plugin to validate use of envvars on your tests
Stars: ✭ 21 (-47.5%)
Mutual labels:  pytest
overhave
Web-framework for BDD: scalable, configurable, easy to use, based on Flask Admin and Pydantic.
Stars: ✭ 61 (+52.5%)
Mutual labels:  pytest

pytest-embedded Documentation Status Python 3.7+

A pytest plugin that has multiple services available for various functionalities. Designed for embedded testing.

Installation

All packages are published to PyPI. Please install them via pip.

pytest-embedded pytest-embedded-serial pytest-embedded-serial-esp pytest-embedded-idf pytest-embedded-qemu pytest-embedded-arduino

Quick Example

  • pip install pytest-embedded
  • Create a file test_basic.py
from pytest_embedded import Dut


def test_basic_expect(redirect, dut: Dut):
    with redirect():
        print('this would be redirected')
  
    dut.expect('this')
    dut.expect_exact('would')
    dut.expect('[be]{2}')
    dut.expect_exact('redirected')
  • Run the test with pytest, the result would be like:
collected 1 item

test_basic.py .                                                        [100%]

============================= 1 passed in 0.01s =============================
  • if run with pytest -s, the output would be as follows:
collected 1 item                                                                                                  

test_basic.py 2022-01-01 12:34:56 this would be redirected
.

============================= 1 passed in 0.01s =============================

The print line is also duplicated to console output.

Extra Services

You can activate more services with pytest --embedded-services service[, service] to enable extra fixtures and functionalities. These services are provided by several optional dependencies. You can install them via pip as well.

Available services:

  • serial: serial port utilities.
  • esp: auto-detect target/port by esptool.
  • idf: auto-detect more app info with ESP-IDF specific rules, auto-flash the binary into the target.
  • jtag: openocd/gdb utilities
  • qemu: running test cases on QEMU instead of the real target.
  • arduino: auto-detect more app info with arduino specific rules, auto-flash the binary into the target.

Resources

Versioning

Packages under this repo mainly use semantic versioning. Sometimes a bug fix version may contain some non-breaking new features as well. It is recommended to use pytest-embdded~=1.0 to get rid of breaking changes, and use the latest new features.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].