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.
