Testing multi-os python software (froscon2023)

Published: Aug. 6, 2023, 9:15 a.m.

b'Automated testing is relevant for every major software project. This talk will showcase two unit-testing frameworks for python - `pytest` and `hypothesis`.\\nIn case of multi-os applications testing should be done on different platforms with something collecting the overall results. This talk demonstrates how\\nto 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.\\n\\n\\nSoftware testing is important.\\nHaving a high test coverage may not guarantee having bug-free code, but it helps eliminating the easier problems.\\nMore importantly it allows to restructure the code without fear of breaking basic mechanics.\\n\\nThis presentation starts with giving a brief overview over two important (unit-) testing frameworks for python - `pytest` and `hypothesis`.\\nI will talk about how and when to use them and give a few brief examples.\\n\\nUnit-tests can only check in the context of the underlying platform.\\nParts of multi-os applications tend to behave slightly differently depending on the OS (especially for mechanics that are "close to the machine").\\nThat is why they should be tested on different platforms with something collecting results in the end.\\n\\nSo 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.\\nThe results are collected by a final job, which evaluates the outcome (pass or fail), prints a summary and generates a coverage file.\\n\\nIn 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.\\nabout this event: https://programm.froscon.org/2023/events/2894.html'