Feature #12213: Wayland in Tails 5.0 (Bullseye)
Investigate Dogtail's long-term viability
Part of the "Make test suite survive tech changes" roadmap item.
We have multiple concerns about the long-term viability of using Dogtail:
- intrigeri heard a GUADEC speaker mention that dogtail does not work on Wayland. If that's indeed the case, then we should look into this problem before we keep porting tons of tests to dogtail: it would be a waste of time to do so only to have to port them to another technology again a year later. See https://gitlab.com/dogtail/dogtail/issues/3.
- The package is orphaned in Debian and was of course not updated to the latest upstream release.
- Fedora (and Redhat in general?) now uses openQA, which only supports image-based testing.
- Dogtail development has slowed down considerably since we adopted it. Here's the a number of commits per year breakdown:
2011: 4 2012: 52 2013: 25 2014: 27 2015: 13 2016: 41 2017: 9
#2 Updated by anonym about 1 year ago
- Type of work changed from Code to Communicate
Fuck. I'll try to get a clarification about
dogtail's status from the upstream (it seems they've moved from Fedora's infra to GitLab), and what the plans for Wayland are. Until then I'll suspend all my Dogtail work. :_(
- intrigeri heard a GUADEC speaker mention that dogtail does not work on Wayland.
I see that dogtail uses pyatspi to generate mouse and keyboard events so I've followed the suggestions on https://www.freedesktop.org/wiki/Accessibility/AT-SPI2/ and did that:
export GTK_MODULES=gail:atk-bridge export OOO_FORCE_DESKTOP=gnome export GNOME_ACCESSIBILITY=1 export QT_ACCESSIBILITY=1
gsettings set org.gnome.desktop.interface toolkit-accessibility true which is a pre-requisite anyway.
I've tried on my own GNOME + Wayland session (sid), that has XWayland, and while dogtail can definitely query info about GUIs, I could not manage to make it interact with gedit (that seems to run as a native Wayland app): Dogtail thinks it has successfully clicked around but nothing visible happens in the app. So indeed, dogtail is currently broken for native Wayland apps.
import dogtail import dogtail.tree dogtail.tree.root.application('gedit').window('Untitled Document 1 - gedit').button('Save').click()
Now, if I start gedit with
GDK_BACKEND=x11 gedit (XWayland) then things work again as in the good old days… without the security benefits of Wayland. But that gives us one potential option: we could use the x11 backend in the test suite for the apps we want to test with Dogtail, but not in a real Tails. The main problem with this option is of course that we might miss some Wayland-specific issues. I would have been concerned with that a couple years ago but it's been a year or so since the last time I noticed such a problem on my own system: things have been fixed.
#21 Updated by intrigeri about 2 months ago
- Status changed from In Progress to Resolved
- Assignee deleted (
- % Done changed from 10 to 100
tl;dr: let's invest as little as we can into Dogtail but for now, we can use it.
It's hard to tell about long-term but so far:
- It does not seem unreasonable to keep using Dogtail and even to port specific tests to it when it gives us substantial benefits. But let's not port tests to Dogtail just for fun (anyway, as I've learned the hard way when writing the VeraCrypt tests, Dogtail does not deliver the expected robustness, and sometimes Sikuli works much better).
- A workaround is available for the lack of Wayland support (which is really not a problem in Dogtail itself, but rather missing a11y APIs in Wayland).
Now, we should start contributing to the maintenance of the package in Debian, so we get Python 3 and Unicode support; I'll report this on #12185.