Package: pykiso
PyKisoIntroductionpykisois an integration test framework. With it, it is possible to writeWhitebox integration tests directly on my target deviceGraybox integration tests to make sure the communication-link with my target device is working as expectedBlackbox integration tests to make sure my external device interfaces are working as expectedThe 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)Link to Eclipse Projecthttps://projects.eclipse.org/projects/iot.kiso-testingRequirementsPython 3.7+pip/poetry (used to get the rest of the requirements)Installpipinstallpykiso# Core frameworkpipinstallpykiso[plugins]# For installing all pluginspipinstallpykiso[all]# For installing all what we have to offerPoetryis more appropriate for developers as it automatically creates virtual environments.cdkiso-testing
poetryinstall--all-extras
poetryshellPre-CommitTo improve code-quality, a configuration ofpre-commithooks are available.
The following pre-commit hooks are used:ruff-formatflake8isorttrailing-whitespaceend-of-file-fixercheck-docstring-firstcheck-jsoncheck-added-large-filescheck-yamldebug-statementsIf you don't have pre-commit installed, you can get it using pip:pipinstallpre-commitStart using the hooks withpre-commitinstallCommit message conventionCommits are sorted into multiple categories based on keywords that can occur at any position as part of the commit message.
[Category] Keywords[BREAKING CHANGES] BREAKING CHANGE[Features] feat:[Fixes] fix:[Docs] docs:[Styles] style:[Refactors] refactor!:[Performances] perf:[Tests] test:[Build] build:[Ci] ci:
Each commit is considered only once according to the order of the categories listed above. Merge commits are ignored.The tool commitizen can help you to create commits which follows these standards.# if not yet installed:pipinstall-Ucommitizen==2.20.4# helps you to create a commit:czcommit# or use equivalent short variant:czcGenerate ChangelogAfter you installed the dev dependencies from the pipfile you are able to
autogenerate the Changelog.invokechangelogUsageOnce installed the application is bound topykiso, it can be called with the following arguments:Usage:pykiso[OPTIONS]EmbeddedIntegrationTestFramework-CLIEntryPoint.TAGFilters:anyadditionaloptiontobepassedtothetestastagthroughthepykisocall.Multiplevaluesmustbeseparatedwithacomma.Forexample:pykiso-cyour_config.yaml--branch-leveldev,master--variantdelta

Options:-c,--test-configuration-fileFILEpathtothetestconfigurationfile(inYAMLformat)[required]-l,--log-pathPATHpathtolog-fileorfolder.IfnotsetwilllogtoSTDOUT--log-level[DEBUG|INFO|WARNING|ERROR]settheverbosityofthelogging--junitenablesthegenerationofajunitreport--textdefault,testresultsareonlydisplayedintheconsole--step-reportPATHgeneratethestepreportatthespecifiedpath--failfaststopthetestrunonthefirsterrororfailure-v,--verboseactivatetheinternalframeworklogs-p,--patternTEXTtestfilterpattern,e.g.'test_suite_1.py'or'test_*.py'.Orevenmoregranularly'test_suite_1.py::test_class::test_name'--versionShowtheversionandexit.-h,--helpShowthismessageandexit.--loggerChangetheloggerclassusedinpykiso,valueistheimportpathtotheloggerclass,example'logging.Logger'Suitable config files are available in theexamplesfolder.Demo using example configinvokerunRunning the Testsinvoketestorpytest