Headless Testing of PySide/PyQt GUI Applications with pytest-qt

🤓 Intro Manual testing of GUI applications can become tedious and error-prone as features and complexity increase. Headless testing offers a solution by automating UI interactions without the need for a physical display. This approach allows for faster test execution, improved repeatability, and seamless integration with continuous integration and continuous delivery (CI/CD) pipelines. In this post, we’ll explore how to leverage pytest-qt, a powerful framework for headless testing of PySide/PyQt applications. ...

May 22, 2024 · Andrea Manzini

Using containers for unit testing of bash functions

Intro Unit testing of Bash functions involves the process of systematically verifying the correctness and reliability of individual functions within a Bash script. While Bash is primarily used for scripting and automation, it’s important to ensure that the functions within your scripts work as expected, especially as scripts become more complex. Unit testing in Bash can help catch bugs and prevent unexpected behavior. Fixing bugs Working on a bugfix for an internal shell script, I wanted to add some unit tests to ensure correctness. After a quick search, I found this single-file “framework” (thanks, Ryan) that provides xUnit-style assertions. So we can use it as a starting point. ...

August 17, 2023 · Andrea Manzini