How to add integration tests for the gTile extension

I’d like recommendations for how we can add tests to the gTile extension to ensure the extension will function as expected. We have unit tests now but nothing that runs the extension in a real gnome instance.

Any code pointers to examples of this type of testing would be helpful. Thanks.

1 Like

I am maintaining a set of container images which can be used to run GNOME Shell as part of the CI pipeline on GitHub. Here they are: GitHub - Schneegans/gnome-shell-pod: A Podman container which runs GNOME Shell in xvfb

The basic idea is to install your extension in the container, run GNOME Shell, and then do whatever you want :slight_smile:. You can for instance fake user input using xdotool, take screenshots and compare them to reference images, or add a test dbus API to your extension and call its methods.

I also wrote a small guide on how-to use them to set up some CI tests: GNOME Shell Extensions & CI: Part III | Simon Schneegans’ Blog

I use this in my own extensions. You can have a look at the test scripts, but you can be very creative and do much more, if you want:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.