GIMP Adds Automated UI Testing for Linux X11 and Wayland

GIMP adds automated UI tests covering image creation, PNG exports, layers, zoom controls, and other common operations.

GIMP has introduced a new automated GUI testing system to catch bugs and regressions before they reach users. The infrastructure allows developers to test actual interactions with the application, including menus, dialogs, buttons, and common image-editing operations.

Until now, GIMP relied on unit tests and other methods that interact with its internal code. According to the devs, while useful for checking individual components, these approaches cannot always detect problems that appear when users interact with the graphical interface.

To address this, the development team implemented a system that launches a real GIMP instance, performs specific actions through its interface, and checks whether the results match expectations. The initial implementation includes 13 automated tests covering essential operations.

These verify that GIMP starts correctly, the Welcome dialog behaves as expected, new images are created with specified dimensions, and PNG files are exported properly. Other tests check foreground and background color swapping, layer creation and deletion, Undo and Redo functionality, zoom controls, and image flattening.

The tests can run without a physical display (launching GIMP inside a temporary hidden desktop session) and verify toolbox interactions, including selecting and using the Bucket Fill tool, and whether changes made in the Preferences dialog are correctly saved.

The system uses dogtail, a Python-based GUI testing framework. Rather than examining screen pixels, it identifies and interacts with interface elements through accessibility information, the same data used by assistive technologies such as screen readers.

For now, the automated GUI tests are supported only on Linux, covering both X11 and Wayland sessions. Windows and macOS are currently excluded because dogtail does not support those platforms.

More information is available in the official announcement.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *