GIMP Adds 13 Automated UI Tests to Continuous Integration
GIMP now runs 13 automated tests on its user interface every time a contributor’s change is merged, El Ecosistema Startup reported.
The tests launch the real application, click through menus and buttons, and check the result. If something breaks, the failure surfaces before the code reaches users.
The change matters for a specific reason. GIMP already had unit tests, which verify small pieces of code such as how the program reads an XCF file. What those tests could not do was open a real window: they could not tell whether a dialog appears on screen or whether a menu item actually did its job.
Why the old tests fell short
The project also carried older interface code tests that interacted directly with the core and sometimes simulated input events — pointer movements, clicks, drags. According to the team, nothing replaces working with the real interface. Those legacy tests, which hooked into the core code, brought their own problems: they broke too often, and not because they had caught a bug. Whole categories of errors stayed invisible to them.
The new UI tests check the program as a whole, the way a person uses it. For software with many interconnected screens — editors, panels, setup wizards — that is where breakage tends to happen: a change to one dialog can leave an untouched menu non-functional.
How the tests run without a screen
No monitor is involved. Each test spins up a small, hidden desktop, runs GIMP inside it, and tears the desktop down when the test ends. That is what allows the suite to run on the project’s continuous integration servers, where no display exists.
To find a button or a menu, the tests do not read pixels. They use the accessibility information GIMP exposes to tools such as screen readers. The tooling behind the suite is dogtail, a Python project for UI testing. Running GIMP on a headless server required a new feature in dogtail, and the team contributed it upstream so other projects can use it as well.
There is an explicit limit: the tests run only on Linux, under both X11 and Wayland, because dogtail does not support Windows or macOS.
What the 13 tests cover
The current suite verifies, among other flows, per the team’s account:
- That GIMP starts and shows its main window.
- That the welcome dialog opens on the correct tab, and stays hidden when "Show at startup" is switched off.
- That File > New creates an image at the requested size.
- That File > Export As writes a valid PNG file.
- That Tools > Swap Colors exchanges foreground and background colors.
- That a new foreground color can be typed into the Colors dialog.
- That a layer can be added and removed.
- That Undo and Redo work.
- That Zoom In changes the zoom level.
- That clicking a tool in the toolbox selects it, and that the tool — the bucket fill, for example — then works on the canvas.
- That a change in Preferences is saved when OK is clicked.
- That a menu action such as Image > Flatten Image does its job.
The team’s own summary is measured: adding even this small set of simple tests considerably raises confidence that a GIMP build works, and it demonstrates that the testing infrastructure functions.
Accessibility as a byproduct
Choosing the accessibility layer as the selector, rather than screen coordinates or pixels, makes the tests more stable. A button that shifts a few pixels does not break a test; a button that loses its accessible label does.
That discipline pushes the project to keep its interface properly labeled — and a well-labeled interface is, by that same token, one a screen reader can navigate. The team frames it as a two-for-one effect: software that is easier to test is also easier to use with assistive technology.
The next step
GIMP has published a guide on writing new UI tests and diagnosing failures, and the project is inviting contributors to write a test for the part of GIMP they use most.
- Wisconsin Attorney General Josh Kaul Sues TikTok Over Addictive Features Targeting Children
- KDE Kwi Terminal Reaches v0.1: Ghostty-Based GPU Acceleration, Claims 35x Faster Than Konsole
- Cleveland Clinic Tests Virtual Reality for Cancer Distress (newsdirectory3.com)
- Svalbard Experiences Months of Continuous Daylight and Polar Night (newsy-today.com)