Giter Club home page Giter Club logo

kiso-testing's Introduction

PyKiso

Introduction

Pykiso is an integration test framework that is used by kiso to ensure that all provided kiso features will always work. Pykiso can nevertheless be used as stand-alone to test any features in an embedded device.

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

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]

  Embedded Integration Test Framework

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.
  --help                          Show this message and exit.

Suitable config files are available in the test-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.
  • 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).
  • Host it on pypi.

kiso-testing's People

Contributors

sebastianpfischer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.