· via Hacker News – Front Page (native)
GIMP adds automated GUI tests that run the real app headless in CI
GIMP's new GUI testing platform launches the real application in a hidden desktop, clicks through menus and dialogs, and verifies results on every merge — starting with 13 tests driven by accessibility data.

GIMP now tests its own interface
GIMP has introduced an automated GUI testing platform that starts the actual application, drives its menus and dialogs, and checks whether the expected outcome occurred. According to the project's announcement, which surfaced on the front page of Hacker News, the suite runs automatically every time contributor changes are merged.
The motivation is straightforward: GIMP's interface consists of many interdependent menus, dialogs and tools, so altering one part can silently break another. The team notes such breakage sometimes goes unnoticed until a user files a report.
Why the existing tests fell short
GIMP already had unit tests, which validate small pieces of code in isolation — for example, how the application reads an XCF file. But as the announcement explains, those tests never opened a real window, so they could not confirm that a dialog actually appears or that a menu item performs its intended job.
The project also had older tests aimed at GUI code, usually by hooking directly into internal code and occasionally by simulating input events such as pointer movement, clicks and drags. The team says this approach carried its own problems: those tests failed often for reasons unrelated to real bugs, while still missing entire categories of defects. The new suite instead exercises the program end to end, the way an actual user would.
What the 13 initial tests check
Each test launches a real GIMP instance, performs one small task, and reads the result back from the application. If the outcome is wrong, the test fails and reports what went astray. Thirteen tests exist today, covering:
- GIMP starts and displays its main window.
- The Welcome dialog opens on the right tab and stays hidden when "Show on Start" is disabled.
- File > New creates an image with the dimensions the user set.
- File > Export As writes a valid PNG file.
- Tools > Swap Colors exchanges the foreground and background colors.
- A new foreground color can be typed into the Colors dialog.
- Layers can be added and deleted.
- Undo and Redo behave correctly.
- Zoom In changes the zoom level.
- Clicking a tool button in the toolbox selects that tool, after which the Bucket Fill tool is used on the canvas.
- A change made in Preferences is persisted when the user clicks OK.
- The Image > Flatten Image command does its job.
Headless execution built on accessibility data
The tests need no physical display. Each one spins up a small, hidden desktop environment, runs GIMP inside it, and tears it down afterward — which is what allows the suite to execute on CI servers where no monitor exists.
Rather than inspecting on-screen pixels to locate buttons and menus, the tests rely on the accessibility information GIMP exposes to assistive tools like screen readers. The team points out a welcome side effect: work that makes GIMP easier to test also makes it easier to use with a screen reader, improving overall accessibility.
The implementation uses dogtail, a Python tool for UI testing. Getting GIMP to run on a headless server required a new dogtail capability, which the team contributed upstream to dogtail itself so other projects can take advantage of it. For now the tests run only on Linux, under both X11 and Wayland, because dogtail does not support Windows or macOS.
Harsh Verma wrote the UI tests and the new dogtail feature; Jehan reviewed the UI tests and Michal Odehnal reviewed the dogtail change. The complete change is available in merge request !2909.
A call for contributors
The team frames thirteen tests as a solid start rather than a finish line, since GIMP contains far more dialogs and tools than the suite currently covers. Volunteers are encouraged to write a test for whichever part of GIMP they use most, with a guide on writing new tests and diagnosing failures published on the project's developer documentation site.
Why it matters
Interface regressions are a chronic weak spot for large desktop applications, because unit tests rarely validate what users actually see and click. Wiring real-window, end-to-end checks into the merge pipeline gives GIMP's volunteer maintainers an automated safety net between releases, and the team reports that even this small initial set already increases confidence that builds work.
Two broader effects stand out. Anchoring the tests to accessibility data rather than screen pixels turns test infrastructure into a concrete accessibility investment, pushing GIMP toward better screen-reader support as coverage grows. And the upstream dogtail contribution means the headless-testing technique is now available to other Linux projects that face the same regression problem.
- #gimp
- #gui-testing
- #open-source
- #testing
- #linux
- #accessibility