Technology1 min read

GIMP now has UI tests

By · Published by Everything Blog

In short

The new testing setup currently executes 13 automated checks covering fundamental tasks like application startup, layer management, and file exports. Powered by the Python-based dogtail tool, the system interacts with interface elements via accessibility trees rather than raw pixel matching. This accessibility-driven approach ensures features work properly while actively improving navigation for screen-reader users. However, platform limitations in the underlying tooling restrict these automated checks strictly to Linux environments across X11 and Wayland.

Key points

  • Automated interface testing runs on temporary virtual desktops whenever new contributor c…: Automated interface testing runs on temporary virtual desktops whenever new contributor changes are merged.
  • Relying on accessibility tree data to locate interface components directly benefits users…: Relying on accessibility tree data to locate interface components directly benefits users who depend on screen readers.
  • The test suite is currently restricted to Linux systems because dogtail lacks support for…: The test suite is currently restricted to Linux systems because dogtail lacks support for Windows and macOS.

Sources checked by our analysis pipeline: 1

GIMP has a lot of intertwined menus, dialogs and tools. When we change a part of the interface, another may stop working and sometimes, the problem can be missed until a user reports it.

To find these problems early, a new GUI testing platform was implemented. A typical GUI test starts GIMP, clicks menus and buttons, and then checks the result. These tests run automatically each time we merge contributor changes.

Why we need them

GIMP already has unit tests. A unit test checks one small part of the code, for example how GIMP reads an XCF file. But our unit tests were not opening a real window. So it coult not tell us if a dialog opens, or if a menu item did its job.

Note that GIMP already had tests of GUI code, usually interacting directly with the core code, and sometimes even simulating input devices’ events (pointer movements, clicks, drags…). But nothing can beat interacting with the real interface. Furthermore such legacy tests directly hijacking core code come with their own problems, such as breaking all too…

Technology