Skip to main content

PyKiso

Optional Text

Introduction

pykiso is an integration test framework. With it, it is possible to write

  • Whitebox integration tests directly on my target device
  • Graybox integration tests to make sure the communication-link with my target device is working as expected
  • Blackbox integration tests to make sure my external device interfaces are working as expected

The project will contain:

  • The core python framework (this repository)
  • Framework plugins that are generic enough to be integrated as "native" (this repository)
  • Additional "testApps" for different targets platforms (e.g. stm32, ...) or languages (C, C++, ...) . It could be pure SW or also HW (other repositories)

Requirements

  • Python 3.6+
  • pip/pipenv (used to get the rest of the requirements)

Install

cd kiso-testing
pip install .

Pipenv is more appropriate for developers as it automatically creates virtual environments.

cd kiso-testing
pipenv install --dev
pipenv shell

Pre-Commit

To improve code-quality, a configuration of pre-commit hooks are available. The following pre-commit hooks are used:

  • black
  • trailing-whitespace
  • end-of-file-fixer
  • check-docstring-first
  • check-json
  • check-added-large-files
  • check-yaml
  • debug-statements
  • flake8
  • isort

If you don't have pre-commit installed, you can get it using pip:

pip install pre-commit

Start using the hooks with

pre-commit install

Usage

Once installed the application is bound to pykiso, it can be called with the following arguments:

Usage: pykiso [OPTIONS] [PATTERN]

  Embedded Integration Test Framework - CLI Entry Point.

  PATTERN: overwrite the test filter pattern from the YAML file (optional)

Options:
  -c, --test-configuration-file FILE
                                  path to the test configuration file (in YAML
                                  format)  [required]

  -l, --log-path PATH             path to log-file or folder. If not set will
                                  log to STDOUT

  --log-level [DEBUG|INFO|WARNING|ERROR]
                                  set the verbosity of the logging
  --version                       Show the version and exit.
  -h, --help                          Show this message and exit.
  --variant                       allow the user to execute a subset of tests
                                  based on variants
  --branch-level                  allow the user to execute a subset of tests
                                  based on branch levels
  --junit                         enables the generation of a junit report
  --text                          default, test results are only displayed in
                                  the console

Suitable config files are available in the examples folder.

Demo using example config

invoke run

Running the Tests

invoke test

or

pytest

List of limitations / todos for the python side

  • When the auxiliary does not answer (ping or else), GenericTest.BasicTest.cleanup_and_skip() call will result in a lock and break the framework.
  • No test-section will be executed, needs to be removed later.
  • test configuration files need to be reworked
  • Names & configurations in the cfg file json are character precise class names & associated parameters.
  • Spelling mistakes need to be fixed! ongoing
  • Add verbosity parameters to pass to the unittest framework to get more details about the test.
  • Add result parsing for Jenkins (see: https://stackoverflow.com/questions/11241781/python-unittests-in-jenkins).
  • Create a python package
  • and host it on pip.

Release files for pykiso 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pykiso 0.14.0
File Size Uploaded
pykiso-0.14.0.tar.gz 87.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pykiso 0.14.0
File Interpreter ABI Platform
pykiso-0.14.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size:221.9 kB

Release files / pykiso-0.14.0.tar.gz

Download URL pykiso-0.14.0.tar.gz
Size 87.5 kB
Tags Source
SHA-256 checksum
How to use checksums
82a964d5473c89e6bcfeea062f1165ce710137f8ec71ac10797ba1d6feb47b78
BLAKE2b-256 checksum
How to use checksums
8f0b41c7440ee1606c3f8532dd2ac912103ce7ac681f8c314f99e141c074dec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

Release files / pykiso-0.14.0-py2.py3-none-any.whl

Download URL pykiso-0.14.0-py2.py3-none-any.whl
Size 134.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f858e01e4f47703aef5b44afc95f0ad6b0d6b8c8aface3e5141823f4edff31a4
BLAKE2b-256 checksum
How to use checksums
3bfd8c02cd0f0cc2fa36ac8a4a8b1dd40c9d21f181093695b44298abc1e3af1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

Release history Release notifications | RSS feed

1.7.0

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.31.3

2 release files

0.31.2

2 release files

0.31.1

2 release files

0.31.0

2 release files

0.29.4

2 release files

0.29.3

2 release files

0.29.0

2 release files

0.28.1

2 release files

0.28.0

2 release files

0.25.1

2 release files

0.25.0

2 release files

0.24.0

2 release files

0.22.2

2 release files

0.22.1

2 release files

0.22.0

2 release files

0.21.1

2 release files

0.21.0

2 release files

0.20.2

2 release files

0.20.1

2 release files

0.20.0

2 release files

0.19.3

2 release files

0.19.2

2 release files

0.19.0

2 release files

0.16.0

2 release files

0.15.1

2 release files

0.15.0

2 release files

This release

0.14.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page