Version 0.18 m. d. B. u. Ktn. u. z. w. V.
Lecture: Testing multi-os python software
Automated testing is relevant for every major software project. This talk will showcase two unit-testing frameworks for python - `pytest` and `hypothesis`.
In case of multi-os applications testing should be done on different platforms with something collecting the overall results. This talk demonstrates how
to use gitlab-ci pipeline jobs to accomplish that. The final part discusses some best practices for writing clean code, having good testability and maintaining a ready-for-release git-repository.
Software testing is important.
Having a high test coverage may not guarantee having bug-free code, but it helps eliminating the easier problems.
More importantly it allows to restructure the code without fear of breaking basic mechanics.
This presentation starts with giving a brief overview over two important (unit-) testing frameworks for python - `pytest` and `hypothesis`.
I will talk about how and when to use them and give a few brief examples.
Unit-tests can only check in the context of the underlying platform.
Parts of multi-os applications tend to behave slightly differently depending on the OS (especially for mechanics that are "close to the machine").
That is why they should be tested on different platforms with something collecting results in the end.
So the second part of this talk discusses an approach for using a gitlab-ci pipline containing different jobs, each running tests on a different platform.
The results are collected by a final job, which evaluates the outcome (pass or fail), prints a summary and generates a coverage file.
In the end I will wrap up with a few best practices for writing clean code, having good testability and maintaining a ready-for-release git-repository.