Are there any good existing example for CI infrastructure for GUI apps? Like, a way to test GUI’s? I know you really should be testing the internal logic alone. But still.
@notgull GTK stuff has some tests both based on taking screenshots and diffing the resulting image and using accessibility APIs for ~interactive tests.
@notgull I don't have details on how you actually write the tests, but I've noticed `wlheadless-run` from https://gitlab.freedesktop.org/ofourdan/xwayland-run being used to run GUI tests in a headless environment.
Olivier Fourdan / xwayland-run · GitLab

freedesktop.org GitLab login

GitLab

@notgull egui has a library that hooks into the accessibility tools to interact with the UI programmatically, and renders screenshots that you can commit to the repo to do regression tests in CI.

https://github.com/emilk/egui/tree/main/crates/egui_kittest

#egui #rustlang #accessibility