hn.today

GIMP now has UI tests

gimp.org161 points141 comments
Screenshot of GIMP now has UI tests

GIMP has introduced automated tests that exercise its actual graphical interface, addressing a gap in existing checks. Unit tests can verify individual code components, while older GUI-related tests often interacted directly with internal code; neither reliably caught problems such as a dialog failing to open or a menu command not doing what users expect. The new tests launch GIMP and carry out small tasks through the interface, helping detect regressions whenever contributor changes are merged. The initial suite contains 13 checks: opening the main window and Welcome dialog, creating and exporting images, changing colors, adding and deleting layers, undoing and redoing, zooming, selecting and using a tool, saving a preference, and flattening an image.

The tests run without a physical display by creating a temporary hidden desktop, making them suitable for continuous-integration servers. Rather than identifying controls from screen pixels, they use accessibility information - the same kind of information used by screen readers. This approach can improve accessibility as well as testability. The tests are built with the Python tool dogtail, and a needed feature for screenless operation was contributed to dogtail for use by other projects. For now, the suite runs only on Linux, under X11 or Wayland, because dogtail lacks Windows and macOS support. The small suite already provides confidence in builds and validates the testing setup; contributors are encouraged to add tests for other tools and dialogs.

Read on gimp.org141 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.