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

Fault Injection in Network Namespace and Veth Environments

Prelude This is a followup from my previous post and a sort of continuation on the series of the topic, where we are exploring ways to make our test system more “unreliable” in order to observe if our applications behave nicely under challenging and not-ideal environments. In this article we are going to explore some linux technologies: Network Namespaces (netns) Virtual Ethernet Devices (veth) Network Emulation (netem) scheduling policy The goal is to setup a virtual network link inside our system, make the two network devices talk each other and then simulate a bad/slow/glitchy/flaky communication to test how applications behave under difficult conditions....

January 6, 2024 · Andrea Manzini

Expect the unexpected

“You sound like a broken record” Is something we complain when someone repeats again and again the same concepts. But even broken disks can sometime be useful DISCLAIMER: No filesystem or device were harmed in the making of this experiment 😉 Image credits: Mick Haupt In this article I would like to explore the powerful tools we have in Linux to simulate dealing with broken disks, that is, drives that more or less randomly report errors....

November 19, 2023 · 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....

August 17, 2023 · Andrea Manzini